Merge "Add options to dev-rebuild-ndk.sh and scripts to customize NDK build"
diff --git a/build/core/add-application.mk b/build/core/add-application.mk
index c1e6c55..a89a91d 100644
--- a/build/core/add-application.mk
+++ b/build/core/add-application.mk
@@ -93,29 +93,32 @@
 
 # SPECIAL CASES:
 # 1) android-6 and android-7 are the same thing as android-5
-# 2) android-10 and 11 are the same thing as android-9
-# 3) android-20 and up are the same thing as android-20
+# 2) android-10 and android-11 are the same thing as android-9
+# 3) android-20 and up are the same thing as android-19
 #
 APP_PLATFORM_LEVEL := $(strip $(subst android-,,$(APP_PLATFORM)))
+ifneq ($(APP_PLATFORM_LEVEL),$(NDK_PREVIEW_LEVEL))
+
 ifneq (,$(filter 6 7,$(APP_PLATFORM_LEVEL)))
     override APP_PLATFORM := android-5
 endif
 ifneq (,$(filter 10 11,$(APP_PLATFORM_LEVEL)))
     override APP_PLATFORM := android-9
 endif
-ifneq (,$(call gt,$(APP_PLATFORM_LEVEL),20))
-    override APP_PLATFORM := android-20
+ifneq (,$(call gt,$(APP_PLATFORM_LEVEL),19))
+    override APP_PLATFORM := android-19
 endif
-ifneq ($(APP_PLATFORM),android-$(APP_PLATFORM_LEVEL))
+
+ifneq ($(strip $(subst android-,,$(APP_PLATFORM))),$(APP_PLATFORM_LEVEL))
     $(call ndk_log,  Adjusting APP_PLATFORM android-$(APP_PLATFORM_LEVEL) to $(APP_PLATFORM))
 endif
 
-# If APP_PIE isn't defined, set it to true for android-16 and above
+# If APP_PIE isn't defined, set it to true for android-$(NDK_PIE_PLATFORM_LEVEL) and above
 #
 APP_PIE := $(strip $(APP_PIE))
 $(call ndk_log,  APP_PIE is $(APP_PIE))
 ifndef APP_PIE
-    ifneq (,$(call gte,$(APP_PLATFORM_LEVEL),16))
+    ifneq (,$(call gte,$(APP_PLATFORM_LEVEL),$(NDK_PIE_PLATFORM_LEVEL)))
         APP_PIE := true
         $(call ndk_log,  Enabling -fPIE)
     else
@@ -134,6 +137,7 @@
 endif
 
 ifneq (null,$(APP_PROJECT_PATH))
+ifneq ($(APP_PLATFORM),android-$(NDK_PREVIEW_LEVEL))
 
 # Check platform level (after adjustment) against android:minSdkVersion in AndroidManifest.xml
 #
@@ -147,9 +151,14 @@
     endif
   endif
 endif
+endif
 
 endif # APP_PROJECT_PATH == null
 
+else
+# $(APP_PLATFORM_LEVEL) = $(NDK_PREVIEW_LEVEL)
+  APP_PIE := true
+endif # $(APP_PLATFORM_LEVEL) != $(NDK_PREVIEW_LEVEL)
 
 # Check that the value of APP_ABI corresponds to known ABIs
 # 'all' is a special case that means 'all supported ABIs'
diff --git a/build/core/build-binary.mk b/build/core/build-binary.mk
index ebf8781..e159265 100644
--- a/build/core/build-binary.mk
+++ b/build/core/build-binary.mk
@@ -145,14 +145,6 @@
 #
 LOCAL_CFLAGS := -DANDROID $(LOCAL_CFLAGS)
 
-# enable PIE for executable beyond certain API level
-ifeq ($(NDK_APP_PIE),true)
-  ifeq ($(call module-get-class,$(LOCAL_MODULE)),EXECUTABLE)
-    LOCAL_CFLAGS += -fPIE
-    LOCAL_LDFLAGS += -fPIE -pie
-  endif
-endif
-
 #
 # Add the default system shared libraries to the build
 #
@@ -213,6 +205,16 @@
   LOCAL_CFLAGS += $($(my)FORMAT_STRING_CFLAGS)
 endif
 
+# enable PIE for executable beyond certain API level, unless "-static"
+ifneq (,$(filter true,$(NDK_APP_PIE) $(TARGET_PIE)))
+  ifeq ($(call module-get-class,$(LOCAL_MODULE)),EXECUTABLE)
+    ifeq (,$(filter -static,$(TARGET_LDFLAGS) $(LOCAL_LDFLAGS) $(NDK_APP_LDFLAGS)))
+      LOCAL_CFLAGS += -fPIE
+      LOCAL_LDFLAGS += -fPIE -pie
+    endif
+  endif
+endif
+
 #
 # The original Android build system allows you to use the .arm prefix
 # to a source file name to indicate that it should be defined in either
@@ -266,12 +268,16 @@
 endif
 ifeq ($(LOCAL_ARM_NEON),true)
   neon_sources += $(LOCAL_SRC_FILES:%.neon=%)
+  # tag the precompiled header with 'neon' tag if it exists
+  ifneq (,$(LOCAL_PCH))
+    $(call tag-src-files,$(LOCAL_PCH),neon)
+  endif
 endif
 
 neon_sources := $(strip $(neon_sources))
 ifdef neon_sources
-  ifeq ($(filter $(TARGET_ARCH_ABI), armeabi-v7a armeabi-v7a-hard),)
-    $(call __ndk_info,NEON support is only possible for armeabi-v7a ABI and its variant armeabi-v7a-hard)
+  ifeq ($(filter $(TARGET_ARCH_ABI), armeabi-v7a armeabi-v7a-hard x86),)
+    $(call __ndk_info,NEON support is only possible for armeabi-v7a ABI, its variant armeabi-v7a-hard and x86 ABI)
     $(call __ndk_info,Please add checks against TARGET_ARCH_ABI in $(LOCAL_MAKEFILE))
     $(call __ndk_error,Aborting)
   endif
@@ -290,6 +296,10 @@
 
 ifeq ($(LOCAL_ARM_MODE),arm)
     arm_sources := $(LOCAL_SRC_FILES)
+    # tag the precompiled header with 'arm' tag if it exists
+    ifneq (,$(LOCAL_PCH))
+        $(call tag-src-files,$(LOCAL_PCH),arm)
+    endif
 endif
 ifeq ($(LOCAL_ARM_MODE),thumb)
     arm_sources := $(empty)
@@ -300,6 +310,14 @@
 #
 ifeq ($(APP_OPTIM),debug)
     $(call tag-src-files,$(LOCAL_SRC_FILES),debug)
+    ifneq (,$(LOCAL_PCH))
+        $(call tag-src-files,$(LOCAL_PCH),debug)
+    endif
+endif
+
+# add PCH to LOCAL_SRC_FILES so that TARGET-process-src-files-tags could process it
+ifneq (,$(LOCAL_PCH))
+    LOCAL_SRC_FILES += $(LOCAL_PCH)
 endif
 
 # Process all source file tags to determine toolchain-specific
@@ -307,6 +325,12 @@
 #
 $(call TARGET-process-src-files-tags)
 
+# now remove PCH from LOCAL_SRC_FILES to prevent getting NDK warning about
+# unsupported source file extensions
+ifneq (,$(LOCAL_PCH))
+    LOCAL_SRC_FILES := $(filter-out $(LOCAL_PCH),$(LOCAL_SRC_FILES))
+endif
+
 # only call dump-src-file-tags during debugging
 #$(dump-src-file-tags)
 
@@ -385,6 +409,37 @@
     RS_COMPAT := true
 endif
 
+
+# Build PCH
+
+get-pch-name = $(strip \
+    $(subst ../,__/,\
+        $(eval __pch := $1)\
+        $(eval __pch := $(__pch:%.h=%.precompiled.h))\
+        $(__pch)\
+    ))
+
+ifneq (,$(LOCAL_PCH))
+    # Build PCH into obj directory
+    LOCAL_BUILT_PCH := $(call get-pch-name,$(LOCAL_PCH))
+
+    # Build PCH
+    $(call compile-cpp-source,$(LOCAL_PCH),$(LOCAL_BUILT_PCH).gch)
+
+    # All obj files are dependent on the PCH
+    $(foreach src,$(filter $(all_cpp_patterns),$(LOCAL_SRC_FILES)),\
+        $(eval $(LOCAL_OBJS_DIR)/$(call get-object-name,$(src)) : $(LOCAL_OBJS_DIR)/$(LOCAL_BUILT_PCH).gch)\
+    )
+
+    # Files from now on build with PCH
+    LOCAL_CPPFLAGS += -Winvalid-pch -include $(LOCAL_BUILT_PCH)
+
+    # Insert PCH dir at beginning of include search path
+    LOCAL_C_INCLUDES := \
+        $(LOCAL_OBJS_DIR) \
+        $(LOCAL_C_INCLUDES)
+endif
+
 # Build the sources to object files
 #
 
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 5e88475..086c28b 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -407,6 +407,7 @@
     SHORT_COMMANDS \
     BUILT_MODULE_NOT_COPIED \
     THIN_ARCHIVE \
+    PCH \
     RENDERSCRIPT_INCLUDES \
     RENDERSCRIPT_INCLUDES_OVERRIDE \
     RENDERSCRIPT_FLAGS \
diff --git a/build/core/init.mk b/build/core/init.mk
index 3d4bd40..1880318 100644
--- a/build/core/init.mk
+++ b/build/core/init.mk
@@ -488,14 +488,21 @@
 
 # we're going to find the maximum platform number of the form android-<number>
 # ignore others, which could correspond to special and experimental cases
+NDK_PREVIEW_LEVEL := L
 NDK_ALL_PLATFORM_LEVELS := $(filter android-%,$(NDK_ALL_PLATFORMS))
 NDK_ALL_PLATFORM_LEVELS := $(patsubst android-%,%,$(NDK_ALL_PLATFORM_LEVELS))
 $(call ndk_log,Found stable platform levels: $(NDK_ALL_PLATFORM_LEVELS))
 
+# Hack to pull $(NDK_PREVIEW_LEVEL) ahead of all (numeric) level
 NDK_MAX_PLATFORM_LEVEL := 3
+_max_theoretical_api_level := 99
 $(foreach level,$(NDK_ALL_PLATFORM_LEVELS),\
-  $(eval NDK_MAX_PLATFORM_LEVEL := $$(call max,$$(NDK_MAX_PLATFORM_LEVEL),$$(level)))\
+  $(eval NDK_MAX_PLATFORM_LEVEL := $$(if $$(subst $$(NDK_PREVIEW_LEVEL),,$$(level)),$$(call max,$$(NDK_MAX_PLATFORM_LEVEL),$$(level)),$(_max_theoretical_api_level)))\
 )
+ifeq ($(NDK_MAX_PLATFORM_LEVEL),$(_max_theoretical_api_level))
+NDK_MAX_PLATFORM_LEVEL := $(NDK_PREVIEW_LEVEL)
+endif
+
 $(call ndk_log,Found max platform level: $(NDK_MAX_PLATFORM_LEVEL))
 
 # ====================================================================
@@ -528,11 +535,26 @@
 NDK_FOUND_ARCHS    := $(_archs:arch-%=%)
 
 # the list of abis 'APP_ABI=all' is expanded to
-ifeq ($(_NDK_TESTING_ALL_),yes)
+ifneq (,$(filter yes all all32 all64,$(_NDK_TESTING_ALL_)))
 NDK_APP_ABI_ALL_EXPANDED := $(NDK_KNOWN_ABIS)
+NDK_APP_ABI_ALL32_EXPANDED := $(NDK_KNOWN_ABI32S)
 else
 NDK_APP_ABI_ALL_EXPANDED := $(NDK_KNOWN_DEVICE_ABIS)
+NDK_APP_ABI_ALL32_EXPANDED := $(NDK_KNOWN_DEVICE_ABI32S)
 endif
+NDK_APP_ABI_ALL64_EXPANDED := $(NDK_KNOWN_DEVICE_ABI64S)
+
+# For testing purpose
+ifeq ($(_NDK_TESTING_ALL_),all32)
+NDK_APP_ABI_ALL_EXPANDED := $(NDK_APP_ABI_ALL32_EXPANDED)
+else
+ifeq ($(_NDK_TESTING_ALL_),all64)
+NDK_APP_ABI_ALL_EXPANDED := $(NDK_APP_ABI_ALL64_EXPANDED)
+endif
+endif
+
+# The first API level ndk-build enforces -fPIE for executable
+NDK_PIE_PLATFORM_LEVEL := 16
 
 # the list of all toolchains in this NDK
 NDK_ALL_TOOLCHAINS :=
diff --git a/build/core/setup-abi.mk b/build/core/setup-abi.mk
index 2fb06bb..930e644 100644
--- a/build/core/setup-abi.mk
+++ b/build/core/setup-abi.mk
@@ -36,13 +36,25 @@
 )
 endif
 
-# The minimal platform for 64-bit ABIs is android-20
-ifneq ($(filter %arm64-v8a %x86_64 %mips64,$(TARGET_ARCH_ABI)),)
-$(foreach _plat,3 4 5 8 9 10 11 12 13 14 15 16 17 18 19,\
-    $(eval TARGET_PLATFORM := $$(subst android-$(_plat),android-20,$$(TARGET_PLATFORM)))\
+# The first platform for 64-bit ABIs is android-$(NDK_PREVIEW_LEVEL)
+ifneq ($(filter $(NDK_KNOWN_DEVICE_ABI64S),$(TARGET_ARCH_ABI)),)
+$(foreach _plat,3 4 5 8 9 10 11 12 13 14 15 16 17 18 19 20 21,\
+    $(eval TARGET_PLATFORM := $$(subst android-$(_plat),android-$(NDK_PREVIEW_LEVEL),$$(TARGET_PLATFORM)))\
 )
 endif
 
+TARGET_PLATFORM_LEVEL := $(strip $(subst android-,,$(TARGET_PLATFORM)))
+ifneq ($(TARGET_PLATFORM_LEVEL),$(NDK_PREVIEW_LEVEL))
+    ifneq (,$(call gte,$(TARGET_PLATFORM_LEVEL),$(NDK_PIE_PLATFORM_LEVEL)))
+        TARGET_PIE := true
+        $(call ndk_log,  Enabling -fPIE for TARGET_PLATFORM $(TARGET_PLATFORM))
+    else
+        TARGET_PIE := false
+    endif
+else
+    TARGET_PIE := true
+endif
+
 # Separate the debug and release objects. This prevents rebuilding
 # everything when you switch between these two modes. For projects
 # with lots of C++ sources, this can be a considerable time saver.
diff --git a/build/core/setup-app.mk b/build/core/setup-app.mk
index 9fc1b33..8e956f4 100644
--- a/build/core/setup-app.mk
+++ b/build/core/setup-app.mk
@@ -60,6 +60,12 @@
 ifeq ($(NDK_APP_ABI),all)
     NDK_APP_ABI := $(NDK_APP_ABI_ALL_EXPANDED)
 else
+ifeq ($(NDK_APP_ABI),all32)
+    NDK_APP_ABI := $(NDK_APP_ABI_ALL32_EXPANDED)
+else
+ifeq ($(NDK_APP_ABI),all64)
+    NDK_APP_ABI := $(NDK_APP_ABI_ALL64_EXPANDED)
+else
     # Plug in the unknown
     _unknown_abis := $(strip $(filter-out $(NDK_ALL_ABIS),$(NDK_APP_ABI)))
     ifneq ($(_unknown_abis),)
@@ -91,6 +97,8 @@
         $(call __ndk_error,Aborting)
     endif
 endif
+endif
+endif
 
 # Clear all installed binaries for this application
 # This ensures that if the build fails, you're not going to mistakenly
diff --git a/build/core/setup-toolchain.mk b/build/core/setup-toolchain.mk
index b5f2cc2..e67c995 100644
--- a/build/core/setup-toolchain.mk
+++ b/build/core/setup-toolchain.mk
@@ -21,6 +21,7 @@
 $(call assert-defined,NDK_APPS NDK_APP_STL)
 
 LLVM_VERSION_LIST := 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4
+NDK_64BIT_TOOLCHAIN_LIST := clang3.4 4.9
 
 # Check that we have a toolchain that supports the current ABI.
 # NOTE: If NDK_TOOLCHAIN is defined, we're going to use it.
@@ -39,7 +40,7 @@
       TARGET_TOOLCHAIN_LIST := $(filter-out %4.7 %4.8 %4.8l %4.9 %4.9l,$(TARGET_TOOLCHAIN_LIST))
     else
       # Filter out 4.6, 4.7 and 4.8 which don't have good 64-bit support in all supported arch
-      TARGET_TOOLCHAIN_LIST := $(filter-out %4.6 %4.7 %4.8,$(TARGET_TOOLCHAIN_LIST))
+      TARGET_TOOLCHAIN_LIST := $(filter-out %4.6 %4.7 %4.8 %4.8l,$(TARGET_TOOLCHAIN_LIST))
     endif
 
     ifndef TARGET_TOOLCHAIN_LIST
@@ -56,7 +57,6 @@
     else
         TARGET_TOOLCHAIN := $(lastword $(TARGET_TOOLCHAIN_LIST))
     endif
-
     # If NDK_TOOLCHAIN_VERSION is defined, we replace the toolchain version
     # suffix with it.
     #
@@ -65,25 +65,36 @@
         ifeq ($(NDK_TOOLCHAIN_VERSION),clang)
             override NDK_TOOLCHAIN_VERSION := clang$(lastword $(LLVM_VERSION_LIST))
         endif
-        # We assume the toolchain name uses dashes (-) as separators and doesn't
-        # contain any space. The following is a bit subtle, but essentially
-        # does the following:
-        #
-        #   1/ Use 'subst' to convert dashes into spaces, this generates a list
-        #   2/ Use 'chop' to remove the last element of the list
-        #   3/ Use 'subst' again to convert the spaces back into dashes
-        #
-        # So it TARGET_TOOLCHAIN is 'foo-bar-zoo-xxx', then
-        # TARGET_TOOLCHAIN_BASE will be 'foo-bar-zoo'
-        #
-        TARGET_TOOLCHAIN_BASE := $(subst $(space),-,$(call chop,$(subst -,$(space),$(TARGET_TOOLCHAIN))))
-        # if TARGET_TOOLCHAIN_BASE is llvm, remove clang from NDK_TOOLCHAIN_VERSION
-        VERSION := $(NDK_TOOLCHAIN_VERSION)
-        ifeq ($(TARGET_TOOLCHAIN_BASE),llvm)
-            VERSION := $(subst clang,,$(NDK_TOOLCHAIN_VERSION))
+        __use_ndk_toolchain_version := true
+        ifneq (,$(findstring 64,$(TARGET_ARCH_ABI)))
+            # don't allow NDK_TOOLCHAIN_VERSION to change if it doesn't support 64-bit
+            ifeq (,$(filter $(NDK_64BIT_TOOLCHAIN_LIST),$(NDK_TOOLCHAIN_VERSION)))
+                $(call ndk_log,Specified NDK_TOOLCHAIN_VERSION $(NDK_TOOLCHAIN_VERSION) does not support 64-bit)
+                $(call ndk_log,Using default target toolchain '$(TARGET_TOOLCHAIN)' for '$(TARGET_ARCH_ABI)' ABI)
+                __use_ndk_toolchain_version := false;
+            endif
         endif
-        TARGET_TOOLCHAIN := $(TARGET_TOOLCHAIN_BASE)-$(VERSION)
-        $(call ndk_log,Using target toolchain '$(TARGET_TOOLCHAIN)' for '$(TARGET_ARCH_ABI)' ABI (through NDK_TOOLCHAIN_VERSION))
+        ifeq ($(__use_ndk_toolchain_version),true)
+            # We assume the toolchain name uses dashes (-) as separators and doesn't
+            # contain any space. The following is a bit subtle, but essentially
+            # does the following:
+            #
+            #   1/ Use 'subst' to convert dashes into spaces, this generates a list
+            #   2/ Use 'chop' to remove the last element of the list
+            #   3/ Use 'subst' again to convert the spaces back into dashes
+            #
+            # So it TARGET_TOOLCHAIN is 'foo-bar-zoo-xxx', then
+            # TARGET_TOOLCHAIN_BASE will be 'foo-bar-zoo'
+            #
+            TARGET_TOOLCHAIN_BASE := $(subst $(space),-,$(call chop,$(subst -,$(space),$(TARGET_TOOLCHAIN))))
+            # if TARGET_TOOLCHAIN_BASE is llvm, remove clang from NDK_TOOLCHAIN_VERSION
+            VERSION := $(NDK_TOOLCHAIN_VERSION)
+            ifeq ($(TARGET_TOOLCHAIN_BASE),llvm)
+                VERSION := $(subst clang,,$(NDK_TOOLCHAIN_VERSION))
+            endif
+            TARGET_TOOLCHAIN := $(TARGET_TOOLCHAIN_BASE)-$(VERSION)
+            $(call ndk_log,Using target toolchain '$(TARGET_TOOLCHAIN)' for '$(TARGET_ARCH_ABI)' ABI (through NDK_TOOLCHAIN_VERSION))
+        endif
     else
         $(call ndk_log,Using target toolchain '$(TARGET_TOOLCHAIN)' for '$(TARGET_ARCH_ABI)' ABI)
     endif
@@ -136,8 +147,9 @@
 
 # compute NDK_APP_DST_DIR as the destination directory for the generated files
 NDK_APP_DST_DIR := $(NDK_APP_LIBS_OUT)/$(TARGET_ARCH_ABI)
-# install armeabi-v7a-hard to lib/armeabi-v7a, unless under testing where env. var. _NDK_TESTING_ALL_=yes
-ifneq ($(_NDK_TESTING_ALL_),yes)
+# install armeabi-v7a-hard to lib/armeabi-v7a, unless under testing where env. var. _NDK_TESTING_ALL_
+# is set to one of yes, all, all32, or all64
+ifeq (,$(filter yes all all32 all64,$(_NDK_TESTING_ALL_)))
 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
 NDK_APP_DST_DIR := $(NDK_APP_LIBS_OUT)/armeabi-v7a
 endif
diff --git a/build/tools/build-compiler-rt.sh b/build/tools/build-compiler-rt.sh
index 6d60a11..65f31a9 100755
--- a/build/tools/build-compiler-rt.sh
+++ b/build/tools/build-compiler-rt.sh
@@ -84,6 +84,7 @@
 else
     BUILD_DIR=$OPTION_BUILD_DIR
 fi
+rm -rf "$BUILD_DIR"
 mkdir -p "$BUILD_DIR"
 fail_panic "Could not create build directory: $BUILD_DIR"
 
@@ -96,13 +97,13 @@
 # Compiler flags we want to use
 COMPILER_RT_CFLAGS="-fPIC -O2 -DANDROID -D__ANDROID__ -ffunction-sections"
 COMPILER_RT_CFLAGS=$COMPILER_RT_CFLAGS" -I$SRC_DIR/include -I$SRC_DIR/lib"
-COMPILER_RT_LDFLAGS="-nodefaultlibs"
+COMPILER_RT_LDFLAGS="-nostdlib"
 
 # List of sources to compile
 COMPILER_RT_GENERIC_SOURCES=$(cd $SRC_DIR && ls lib/*.c)
 
 # filter out the sources we don't need
-UNUSED_SOURCES="lib/apple_versioning.c lib/clear_cache.c lib/gcc_personality_v0.c"
+UNUSED_SOURCES="lib/apple_versioning.c lib/gcc_personality_v0.c"
 COMPILER_RT_GENERIC_SOURCES=$(filter_out "$UNUSED_SOURCES" "$COMPILER_RT_GENERIC_SOURCES")
 
 # ARM specific
@@ -242,7 +243,7 @@
         if [ $ABI != "armeabi-v7a-hard" ]; then
             builder_ldflags "-lm"
         fi
-        builder_nodefaultlibs_shared_library libcompiler_rt_shared
+        builder_nostdlib_shared_library libcompiler_rt_shared
     fi
     builder_end
 }
diff --git a/build/tools/build-cxx-stl.sh b/build/tools/build-cxx-stl.sh
index 8486410..3480ff2 100755
--- a/build/tools/build-cxx-stl.sh
+++ b/build/tools/build-cxx-stl.sh
@@ -83,7 +83,11 @@
 EXPLICIT_COMPILER_VERSION=
 
 GCC_VERSION=
-register_var_option "--gcc-version=<ver>" GCC_VERSION "Specify GCC version" "$GCC_VERSION"
+register_option "--gcc-version=<ver>" do_gcc_version "Specify GCC version"
+do_gcc_version() {
+    GCC_VERSION=$1
+    EXPLICIT_COMPILER_VERSION=true
+}
 
 LLVM_VERSION=
 register_option "--llvm-version=<ver>" do_llvm_version "Specify LLVM version"
@@ -96,6 +100,10 @@
 
 extract_parameters "$@"
 
+if [ -n "${LLVM_VERSION}" -a -n "${GCC_VERSION}" ]; then
+    panic "Cannot set both LLVM_VERSION and GCC_VERSION. Make up your mind!"
+fi
+
 ABIS=$(commas_to_spaces $ABIS)
 UNKNOWN_ABIS=
 if [ "$ABIS" = "${ABIS%%64*}" ]; then
@@ -129,65 +137,90 @@
 if [ -z "$CXX_STL" ]; then
   panic "Please use --stl=<name> to select a C++ runtime to rebuild."
 fi
-FOUND=
-for STL in $CXX_STL_LIST; do
-  if [ "$STL" = "$CXX_STL" ]; then
-    FOUND=true
-    break
-  fi
-done
-if [ -z "$FOUND" ]; then
-  panic "Invalid --stl value ('$CXX_STL'), please use one of: $CXX_STL_LIST."
-fi
+
+# Derive runtime, and normalize CXX_STL
+CXX_SUPPORT_LIB=gabi++
+case $CXX_STL in
+  gabi++)
+    ;;
+  stlport)
+    ;;
+  libc++)
+    CXX_SUPPORT_LIB=gabi++  # libc++abi
+    ;;
+  libc++-libc++abi)
+    CXX_SUPPORT_LIB=libc++abi
+    CXX_STL=libc++
+    ;;
+  libc++-gabi++)
+    CXX_SUPPORT_LIB=gabi++
+    CXX_STL=libc++
+    ;;
+  *)
+    panic "Invalid --stl value ('$CXX_STL'), please use one of: $CXX_STL_LIST."
+    ;;
+esac
 
 if [ -z "$OPTION_BUILD_DIR" ]; then
     BUILD_DIR=$NDK_TMPDIR/build-$CXX_STL
 else
     BUILD_DIR=$OPTION_BUILD_DIR
 fi
+rm -rf "$BUILD_DIR"
 mkdir -p "$BUILD_DIR"
 fail_panic "Could not create build directory: $BUILD_DIR"
 
 # Location of the various C++ runtime source trees.  Use symlink from
 # $BUILD_DIR instead of $NDK which may contain full path of builder's working dir
 
+rm -f $BUILD_DIR/ndk
 ln -sf $ANDROID_NDK_ROOT $BUILD_DIR/ndk
 
 GABIXX_SRCDIR=$BUILD_DIR/ndk/$GABIXX_SUBDIR
 STLPORT_SRCDIR=$BUILD_DIR/ndk/$STLPORT_SUBDIR
 LIBCXX_SRCDIR=$BUILD_DIR/ndk/$LIBCXX_SUBDIR
+LIBCXXABI_SRCDIR=$BUILD_DIR/ndk/$LIBCXXABI_SUBDIR
 
-LIBCXX_INCLUDES="-I$LIBCXX_SRCDIR/libcxx/include -I$ANDROID_NDK_ROOT/sources/android/support/include -I$GABIXX_SRCDIR/include"
+if [ "$CXX_SUPPORT_LIB" = "gabi++" ]; then
+    LIBCXX_INCLUDES="-I$LIBCXX_SRCDIR/libcxx/include -I$ANDROID_NDK_ROOT/sources/android/support/include -I$GABIXX_SRCDIR/include"
+elif [ "$CXX_SUPPORT_LIB" = "libc++abi" ]; then
+    LIBCXX_INCLUDES="-I$LIBCXX_SRCDIR/libcxx/include -I$ANDROID_NDK_ROOT/sources/android/support/include -I$LIBCXXABI_SRCDIR/include"
+else
+    panic "Unknown CXX_SUPPORT_LIB: $CXX_SUPPORT_LIB"
+fi
 
-COMMON_CFLAGS="-fPIC -O2 -ffunction-sections -fdata-sections"
+COMMON_C_CXX_FLAGS="-fPIC -O2 -ffunction-sections -fdata-sections"
 COMMON_CXXFLAGS="-fexceptions -frtti -fuse-cxa-atexit"
 
 if [ "$WITH_DEBUG_INFO" ]; then
-    COMMON_CFLAGS="$COMMON_CFLAGS -g"
+    COMMON_C_CXX_FLAGS="$COMMON_C_CXX_FLAGS -g"
+fi
+
+if [ "$CXX_STL" = "libc++" ]; then
+    # Use clang to build libc++ by default.
+    if [ "$EXPLICIT_COMPILER_VERSION" != "true" ]; then
+        LLVM_VERSION=$DEFAULT_LLVM_VERSION
+    fi
 fi
 
 # Determine GAbi++ build parameters. Note that GAbi++ is also built as part
 # of STLport and Libc++, in slightly different ways.
-if [ "$CXX_STL" = "libc++" ]; then
-  GABIXX_INCLUDES=$LIBCXX_INCLUDES
-  # Use clang to build libc++ by default
-  if [ "$EXPLICIT_COMPILER_VERSION" != "true" ]; then
-    LLVM_VERSION=$DEFAULT_LLVM_VERSION
-  fi
-else
-  GABIXX_INCLUDES="-I$GABIXX_SRCDIR/include"
-fi
-GABIXX_CFLAGS="$COMMON_CFLAGS $GABIXX_INCLUDES"
-GABIXX_CXXFLAGS="$COMMON_CXXFLAGS"
-GABIXX_SOURCES=$(cd $ANDROID_NDK_ROOT/$GABIXX_SUBDIR && ls src/*.cc)
-GABIXX_LDFLAGS="-ldl"
-if [ "$CXX_STL" = "libc++" ]; then
-  GABIXX_CXXFLAGS="$GABIXX_CXXFLAGS -DLIBCXXABI=1"
+if [ "$CXX_SUPPORT_LIB" = "gabi++" ]; then
+    if [ "$CXX_STL" = "libc++" ]; then
+        GABIXX_INCLUDES="$LIBCXX_INCLUDES"
+        GABIXX_CXXFLAGS="$GABIXX_CXXFLAGS -DLIBCXXABI=1"
+    else
+        GABIXX_INCLUDES="-I$GABIXX_SRCDIR/include"
+    fi
+    GABIXX_CFLAGS="$COMMON_C_CXX_FLAGS $GABIXX_INCLUDES"
+    GABIXX_CXXFLAGS="$GABIXX_CXXFLAGS $GABIXX_CFLAGS $COMMON_CXXFLAGS"
+    GABIXX_SOURCES=$(cd $ANDROID_NDK_ROOT/$GABIXX_SUBDIR && ls src/*.cc)
+    GABIXX_LDFLAGS="-ldl"
 fi
 
 # Determine STLport build parameters
-STLPORT_CFLAGS="$COMMON_CFLAGS -DGNU_SOURCE -I$STLPORT_SRCDIR/stlport $GABIXX_INCLUDES"
-STLPORT_CXXFLAGS="$COMMON_CXXFLAGS"
+STLPORT_CFLAGS="$COMMON_C_CXX_FLAGS -DGNU_SOURCE -I$STLPORT_SRCDIR/stlport $GABIXX_INCLUDES"
+STLPORT_CXXFLAGS="$STLPORT_CFLAGS $COMMON_CXXFLAGS"
 STLPORT_SOURCES=\
 "src/dll_main.cpp \
 src/fstream.cpp \
@@ -223,8 +256,10 @@
 src/cxa.c"
 
 # Determine Libc++ build parameters
-LIBCXX_CFLAGS="$COMMON_CFLAGS $LIBCXX_INCLUDES -Drestrict=__restrict__"
-LIBCXX_CXXFLAGS="$COMMON_CXXFLAGS -DLIBCXXABI=1 -std=c++11"
+LIBCXX_LINKER_SCRIPT=export_symbols.txt
+LIBCXX_CFLAGS="$COMMON_C_CXX_FLAGS $LIBCXX_INCLUDES -Drestrict=__restrict__"
+LIBCXX_CXXFLAGS="$LIBCXX_CFLAGS -DLIBCXXABI=1 -std=c++11"
+LIBCXX_LDFLAGS="-Wl,--version-script,\$_BUILD_SRCDIR/$LIBCXX_LINKER_SCRIPT"
 LIBCXX_SOURCES=\
 "libcxx/src/algorithm.cpp \
 libcxx/src/bind.cpp \
@@ -255,9 +290,36 @@
 libcxx/src/support/android/locale_android.cpp \
 "
 
+LIBCXXABI_SOURCES=\
+"../llvm-libc++abi/libcxxabi/src/abort_message.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_aux_runtime.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_demangle.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_exception.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_exception_storage.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_guard.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_new_delete.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_personality.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_unexpected.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_vector.cpp \
+../llvm-libc++abi/libcxxabi/src/cxa_virtual.cpp \
+../llvm-libc++abi/libcxxabi/src/exception.cpp \
+../llvm-libc++abi/libcxxabi/src/private_typeinfo.cpp \
+../llvm-libc++abi/libcxxabi/src/stdexcept.cpp \
+../llvm-libc++abi/libcxxabi/src/typeinfo.cpp \
+../llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp \
+../llvm-libc++abi/libcxxabi/src/Unwind/Unwind-EHABI.cpp \
+../llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1.c \
+../llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c \
+../llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.S \
+../llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.S \
+"
+
 # android/support files for libc++
 SUPPORT32_SOURCES=\
-"../../android/support/src/locale_support.c \
+"../../android/support/src/libdl_support.c \
+../../android/support/src/locale_support.c \
 ../../android/support/src/math_support.c \
 ../../android/support/src/stdlib_support.c \
 ../../android/support/src/wchar_support.c \
@@ -344,31 +406,25 @@
 ../../android/support/src/musl-locale/iswxdigit_l.c \
 ../../android/support/src/musl-locale/isxdigit_l.c \
 ../../android/support/src/musl-locale/langinfo.c \
-../../android/support/src/musl-locale/nl_langinfo_l.c \
 ../../android/support/src/musl-locale/strcasecmp_l.c \
 ../../android/support/src/musl-locale/strcoll.c \
-../../android/support/src/musl-locale/strcoll_l.c \
 ../../android/support/src/musl-locale/strerror_l.c \
 ../../android/support/src/musl-locale/strfmon.c \
 ../../android/support/src/musl-locale/strftime_l.c \
 ../../android/support/src/musl-locale/strncasecmp_l.c \
 ../../android/support/src/musl-locale/strxfrm.c \
-../../android/support/src/musl-locale/strxfrm_l.c \
 ../../android/support/src/musl-locale/tolower_l.c \
 ../../android/support/src/musl-locale/toupper_l.c \
 ../../android/support/src/musl-locale/towctrans_l.c \
 ../../android/support/src/musl-locale/towlower_l.c \
 ../../android/support/src/musl-locale/towupper_l.c \
 ../../android/support/src/musl-locale/wcscoll.c \
-../../android/support/src/musl-locale/wcscoll_l.c \
 ../../android/support/src/musl-locale/wcsxfrm.c \
-../../android/support/src/musl-locale/wcsxfrm_l.c \
 ../../android/support/src/musl-locale/wctrans_l.c \
 ../../android/support/src/musl-locale/wctype_l.c \
 ../../android/support/src/musl-math/frexpf.c \
 ../../android/support/src/musl-math/frexpl.c \
 ../../android/support/src/musl-math/frexp.c \
-../../android/support/src/musl-math/s_scalbln.c \
 ../../android/support/src/musl-stdio/swprintf.c \
 ../../android/support/src/musl-stdio/vwprintf.c \
 ../../android/support/src/musl-stdio/wprintf.c \
@@ -377,6 +433,18 @@
 ../../android/support/src/musl-stdio/sprintf.c \
 ../../android/support/src/musl-stdio/vprintf.c \
 ../../android/support/src/musl-stdio/vsprintf.c \
+../../android/support/src/wcstox/intscan.c \
+../../android/support/src/wcstox/floatscan.c \
+../../android/support/src/wcstox/shgetc.c \
+../../android/support/src/wcstox/wcstod.c \
+../../android/support/src/wcstox/wcstol.c \
+"
+# Replaces broken implementations in x86 libm.so
+SUPPORT32_SOURCES_x86=\
+"../../android/support/src/musl-math/scalbln.c \
+../../android/support/src/musl-math/scalblnf.c \
+../../android/support/src/musl-math/scalblnl.c \
+../../android/support/src/musl-math/scalbnl.c \
 "
 
 # android/support files for libc++
@@ -386,6 +454,8 @@
 ../../android/support/src/musl-locale/catgets.c \
 ../../android/support/src/musl-locale/catopen.c \
 ../../android/support/src/musl-locale/isdigit_l.c \
+../../android/support/src/musl-locale/islower_l.c \
+../../android/support/src/musl-locale/isupper_l.c \
 ../../android/support/src/musl-locale/iswalpha_l.c \
 ../../android/support/src/musl-locale/iswblank_l.c \
 ../../android/support/src/musl-locale/iswcntrl_l.c \
@@ -458,9 +528,9 @@
 # By default, all static libraries include hidden ELF symbols, except
 # if one uses the --visible-static option.
 if [ -z "$VISIBLE_STATIC" ]; then
-  STATIC_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
+    STATIC_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
 else
-  STATIC_CXXFLAGS=
+    STATIC_CXXFLAGS=
 fi
 SHARED_CXXFLAGS=
 
@@ -474,7 +544,7 @@
 {
     local ARCH BINPREFIX SYSROOT
     local ABI=$1
-    local THUMB="$5"  
+    local THUMB="$5"
     local BUILDDIR="$2"/$THUMB
     local TYPE="$3"
     local DSTDIR="$4"
@@ -483,21 +553,24 @@
     local SRC OBJ OBJECTS EXTRA_CFLAGS EXTRA_CXXFLAGS EXTRA_LDFLAGS LIB_SUFFIX GCCVER
 
     EXTRA_CFLAGS=""
+    EXTRA_CXXFLAGS=""
     EXTRA_LDFLAGS=""
     if [ "$ABI" = "armeabi-v7a-hard" ]; then
-      EXTRA_CFLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1"
-      EXTRA_LDFLAGS="-Wl,--no-warn-mismatch -lm_hard"
-      FLOAT_ABI="hard"
+        EXTRA_CFLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1"
+        EXTRA_CXXFLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1"
+        EXTRA_LDFLAGS="-Wl,--no-warn-mismatch -lm_hard"
+        FLOAT_ABI="hard"
     fi
 
     if [ -n "$THUMB" ]; then
-      EXTRA_CFLAGS="$EXTRA_CFLAGS -mthumb"
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -mthumb"
+        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -mthumb"
     fi
 
     if [ "$TYPE" = "static" -a -z "$VISIBLE_STATIC" ]; then
-      EXTRA_CXXFLAGS="$STATIC_CXXFLAGS"
+        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $STATIC_CXXFLAGS"
     else
-      EXTRA_CXXFLAGS="$SHARED_CXXFLAGS"
+        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $SHARED_CXXFLAGS"
     fi
 
     DSTDIR=$DSTDIR/$CXX_STL_SUBDIR/libs/$ABI/$THUMB
@@ -508,6 +581,7 @@
 
     if [ -n "$GCC_VERSION" ]; then
         GCCVER=$GCC_VERSION
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -std=c99"
     else
         ARCH=$(convert_abi_to_arch $ABI)
         GCCVER=$(get_default_gcc_version_for_arch $ARCH)
@@ -515,30 +589,39 @@
 
     # libc++ built with clang (for ABI armeabi-only) produces
     # libc++_shared.so and libc++_static.a with undefined __atomic_fetch_add_4
-    # Add -latomic
+    # Add -latomic.
     if [ -n "$LLVM_VERSION" -a "$CXX_STL_LIB" = "libc++" -a "$ABI" = "armeabi" ]; then
+        # EHABI tables were added as experimental flags in llvm 3.4. In 3.5, these
+        # are now the defaults and the flags have been removed. Add these flags
+        # explicitly only for llvm 3.4.
+        if [ "$LLVM_VERSION" = "3.4" ]; then
+            EXTRA_CFLAGS="${EXTRA_CFLAGS} -mllvm -arm-enable-ehabi-descriptors \
+                          -mllvm -arm-enable-ehabi"
+            EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS} -mllvm -arm-enable-ehabi-descriptors \
+                            -mllvm -arm-enable-ehabi"
+        fi
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -latomic"
     fi
 
     builder_begin_android $ABI "$BUILDDIR" "$GCCVER" "$LLVM_VERSION" "$MAKEFILE"
 
     builder_set_dstdir "$DSTDIR"
-
-    # Always rebuild GAbi++, except for unknown archs.
-    builder_set_srcdir "$GABIXX_SRCDIR"
     builder_reset_cflags DEFAULT_CFLAGS
-    builder_cflags "$DEFAULT_CFLAGS $GABIXX_CFLAGS $EXTRA_CFLAGS"
-
     builder_reset_cxxflags DEFAULT_CXXFLAGS
-    builder_cxxflags "$DEFAULT_CXXFLAGS $GABIXX_CXXFLAGS $EXTRA_CXXFLAGS"
-    builder_ldflags "$GABIXX_LDFLAGS $EXTRA_LDFLAGS"
-    if [ "$(find_ndk_unknown_archs)" != "$ABI" ]; then
-      builder_sources $GABIXX_SOURCES
-    elif [ "$CXX_STL" = "gabi++" ]; then
-      log "Could not build gabi++ with unknown arch!"
-      exit 1
-    else
-      builder_sources src/delete.cc src/new.cc
+
+    if [ "$CXX_SUPPORT_LIB" = "gabi++" ]; then
+        builder_set_srcdir "$GABIXX_SRCDIR"
+        builder_cflags "$DEFAULT_CFLAGS $GABIXX_CFLAGS $EXTRA_CFLAGS"
+        builder_cxxflags "$DEFAULT_CXXFLAGS $GABIXX_CXXFLAGS $EXTRA_CXXFLAGS"
+        builder_ldflags "$GABIXX_LDFLAGS $EXTRA_LDFLAGS"
+        if [ "$(find_ndk_unknown_archs)" != "$ABI" ]; then
+            builder_sources $GABIXX_SOURCES
+        elif [ "$CXX_STL" = "gabi++" ]; then
+            log "Could not build gabi++ with unknown arch!"
+            exit 1
+        else
+            builder_sources src/delete.cc src/new.cc
+        fi
     fi
 
     # Build the runtime sources, except if we're only building GAbi++
@@ -546,13 +629,21 @@
       builder_set_srcdir "$CXX_STL_SRCDIR"
       builder_reset_cflags
       builder_cflags "$DEFAULT_CFLAGS $CXX_STL_CFLAGS $EXTRA_CFLAGS"
-      builder_reset_cxxflags DEFAULT_CXXFLAGS
+      builder_reset_cxxflags
       builder_cxxflags "$DEFAULT_CXXFLAGS $CXX_STL_CXXFLAGS $EXTRA_CXXFLAGS"
       builder_ldflags "$CXX_STL_LDFLAGS $EXTRA_LDFLAGS"
       builder_sources $CXX_STL_SOURCES
+      if [ "$CXX_SUPPORT_LIB" == "libc++abi" ]; then
+          builder_sources $LIBCXXABI_SOURCES
+          builder_ldflags "-ldl"
+      fi
       if [ "$CXX_STL" = "libc++" ]; then
         if [ "$ABI" = "${ABI%%64*}" ]; then
-          builder_sources $SUPPORT32_SOURCES
+          if [ "$ABI" = "x86" ]; then
+            builder_sources $SUPPORT32_SOURCES $SUPPORT32_SOURCES_x86
+          else
+            builder_sources $SUPPORT32_SOURCES
+	  fi
         else
           builder_sources $SUPPORT64_SOURCES
         fi
@@ -567,8 +658,8 @@
         if [ "$(find_ndk_unknown_archs)" != "$ABI" ]; then
             builder_shared_library ${CXX_STL_LIB}_shared $LIB_SUFFIX "$FLOAT_ABI"
         else
-            builder_ldflags "-lc -lm"
-            builder_nodefaultlibs_shared_library ${CXX_STL_LIB}_shared $LIB_SUFFIX # Don't use libgcc
+            builder_ldflags "-lm -lc"
+            builder_nostdlib_shared_library ${CXX_STL_LIB}_shared $LIB_SUFFIX # Don't use libgcc
         fi
     fi
 
diff --git a/build/tools/build-gcc.sh b/build/tools/build-gcc.sh
index 16b0ea7..7d5becd 100755
--- a/build/tools/build-gcc.sh
+++ b/build/tools/build-gcc.sh
@@ -245,7 +245,7 @@
 TOOLCHAIN_BUILD_PREFIX=$BUILD_OUT/prefix
 TOOLCHAIN_BUILD_SYSROOT=$TOOLCHAIN_BUILD_PREFIX/sysroot
 dump "Sysroot  : Copying: $SYSROOT --> $TOOLCHAIN_BUILD_SYSROOT"
-mkdir -p $TOOLCHAIN_BUILD_SYSROOT && (cd $SYSROOT && tar ch *) | (cd $TOOLCHAIN_BUILD_SYSROOT && tar x)
+mkdir -p $TOOLCHAIN_BUILD_SYSROOT && (cd $SYSROOT && tar chf - *) | (cd $TOOLCHAIN_BUILD_SYSROOT && tar xf -)
 if [ $? != 0 ] ; then
     echo "Error while copying sysroot files. See $TMPLOG"
     exit 1
@@ -349,6 +349,12 @@
 # Enable linker option -eh-frame-hdr also for static executable
 EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-eh-frame-hdr-for-static"
 
+MAY_FAIL_DUE_TO_RACE_CONDITION=
+if [ "$MINGW" = "yes" -o "$DARWIN" = "yes" ]; then
+   MAY_FAIL_DUE_TO_RACE_CONDITION=yes
+fi
+
+# hack to use different set of sources
 CONFIGURE_GCC_VERSION=$GCC_VERSION
 case "$TOOLCHAIN" in
   *4.9l)
@@ -358,6 +364,7 @@
     CONFIGURE_GCC_VERSION=4.8l
     ;;
 esac
+
 cd $BUILD_OUT && run \
 $BUILD_SRCDIR/configure --target=$ABI_CONFIGURE_TARGET \
                         --enable-initfini-array \
@@ -395,12 +402,13 @@
     if [ $? = 0 ] ; then
         break
     else
-        if [ "$MINGW" = "yes" -o "$DARWIN" = "yes" ] ; then
+        if [ "$MAY_FAIL_DUE_TO_RACE_CONDITION" = "yes" ] ; then
             # Unfortunately, there is a bug in the GCC build scripts that prevent
             # parallel mingw/darwin canadian cross builds to work properly on some
             # multi-core machines (but not all, sounds like a race condition). Detect
             # this and restart in less parallelism, until -j1 also fail
             NUM_JOBS=$((NUM_JOBS/2))
+            export NUM_JOBS
             if [ $NUM_JOBS -lt 1 ] ; then
                 echo "Error while building mingw/darwin toolchain. See $TMPLOG"
                 exit 1
@@ -420,7 +428,9 @@
 cd $BUILD_OUT && run make install
 if [ $? != 0 ] ; then
     # try "-j1", eg.  for aarch64-linux-android-4.8 with libatomic may fail to install due to race condition (missing prefix/lib/../lib64/./libiberty.an)
-    run make install -j1
+    NUM_JOBS=1
+    export NUM_JOBS
+    run make install -j$NUM_JOBS
     if [ $? != 0 ] ; then
         echo "Error while installing toolchain. See $TMPLOG"
         exit 1
@@ -434,28 +444,28 @@
 
     case $ABI in
     armeabi)
-    BASE_DIR="$BUILD_OUT/gcc-$GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
+    BASE_DIR="$BUILD_OUT/gcc-$CONFIGURE_GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
     OBJS="unwind-arm.o \
           libunwind.o \
           pr-support.o \
           unwind-c.o"
     ;;
     armeabi-v7a)
-    BASE_DIR="$BUILD_OUT/gcc-$GCC_VERSION/$ABI_CONFIGURE_TARGET/armv7-a/libgcc/"
+    BASE_DIR="$BUILD_OUT/gcc-$CONFIGURE_GCC_VERSION/$ABI_CONFIGURE_TARGET/armv7-a/libgcc/"
     OBJS="unwind-arm.o \
           libunwind.o \
           pr-support.o \
           unwind-c.o"
     ;;
     armeabi-v7a-hard)
-    BASE_DIR="$BUILD_OUT/gcc-$GCC_VERSION/$ABI_CONFIGURE_TARGET/armv7-a/hard/libgcc/"
+    BASE_DIR="$BUILD_OUT/gcc-$CONFIGURE_GCC_VERSION/$ABI_CONFIGURE_TARGET/armv7-a/hard/libgcc/"
     OBJS="unwind-arm.o \
           libunwind.o \
           pr-support.o \
           unwind-c.o"
     ;;
     x86|mips)
-    BASE_DIR="$BUILD_OUT/gcc-$GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
+    BASE_DIR="$BUILD_OUT/gcc-$CONFIGURE_GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
     if [ "$GCC_VERSION" = "4.6" -o "$GCC_VERSION" = "4.4.3" ]; then
        OBJS="unwind-c.o \
           unwind-dw2-fde-glibc.o \
@@ -467,7 +477,7 @@
     fi
     ;;
     arm64-v8a|x86_64|mips64)
-    BASE_DIR="$BUILD_OUT/gcc-$GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
+    BASE_DIR="$BUILD_OUT/gcc-$CONFIGURE_GCC_VERSION/$ABI_CONFIGURE_TARGET/libgcc/"
     OBJS="unwind-c.o \
        unwind-dw2-fde-dip.o \
        unwind-dw2.o"
@@ -518,7 +528,7 @@
 
 # build the gdb stub and replace gdb with it. This is done post-install
 # so files are in the correct place when determining the relative path.
-if [ "$MINGW" = "yes" ] ; then
+if [ -n "$WITH_PYTHON" -a "$MINGW" = "yes" ] ; then
     WITH_PYTHON_PREFIX=$(dirname $(dirname "$WITH_PYTHON_SCRIPT"))
     dump "Building : $TOOLCHAIN GDB stub. "$TOOLCHAIN_PATH/bin/${ABI_CONFIGURE_TARGET}-gdb.exe", "$WITH_PYTHON_PREFIX", $ABI_CONFIGURE_HOST-gcc"
     GCC_FOR_STUB=$ABI_CONFIGURE_HOST-gcc
@@ -571,7 +581,15 @@
 
 # strip binaries to reduce final package size
 test -z "$STRIP" && STRIP=strip
-run $STRIP $TOOLCHAIN_PATH/bin/*
+# because libpython is statically linked to GDB, it introduces symbols
+# that are only used by Python modules that must not be stripped. This
+# is not true of Windows which dynamically links to Python.
+if [ "$MINGW" = "yes" ] ; then
+    run $STRIP $TOOLCHAIN_PATH/bin/*
+else
+    find $TOOLCHAIN_PATH/bin -type f -not -name "*gdb" \
+        | while read EXECUTABLE; do run $STRIP "$EXECUTABLE"; done
+fi
 run $STRIP $TOOLCHAIN_PATH/$ABI_CONFIGURE_TARGET/bin/*
 run $STRIP $TOOLCHAIN_PATH/libexec/gcc/*/*/cc1$HOST_EXE
 run $STRIP $TOOLCHAIN_PATH/libexec/gcc/*/*/cc1plus$HOST_EXE
diff --git a/build/tools/build-gnu-libstdc++.sh b/build/tools/build-gnu-libstdc++.sh
index fe54c7e..09c6cb2 100755
--- a/build/tools/build-gnu-libstdc++.sh
+++ b/build/tools/build-gnu-libstdc++.sh
@@ -95,6 +95,9 @@
 else
     BUILD_DIR=$OPTION_BUILD_DIR
 fi
+
+HOST_TAG_LIST="$HOST_TAG $HOST_TAG32"
+
 rm -rf "$BUILD_DIR"
 mkdir -p "$BUILD_DIR"
 fail_panic "Could not create build directory: $BUILD_DIR"
@@ -124,9 +127,9 @@
     mkdir -p $DSTDIR
 
     ARCH=$(convert_abi_to_arch $ABI)
-    for TAG in $HOST_TAG $HOST_TAG32; do
+    for TAG in $HOST_TAG_LIST; do
         BINPREFIX=$NDK_DIR/$(get_toolchain_binprefix_for_arch $ARCH $GCC_VERSION $TAG)
-        if [ -f ${BINPREFIX}-gcc ]; then
+        if [ -f ${BINPREFIX}gcc ]; then
             break;
         fi
     done
@@ -316,6 +319,21 @@
     copy_file_list "$SDIR/$LDIR" "$DDIR/libs/$ABI" libsupc++.a libgnustl_shared.so
     # Note: we need to rename libgnustl_shared.a to libgnustl_static.a
     cp "$SDIR/$LDIR/libgnustl_shared.a" "$DDIR/libs/$ABI/libgnustl_static.a"
+    if [ "$ARCH" = "x86_64" -o "$ARCH" = "mips64" ]; then
+       # for multilib we copy full set. Keep native libs in $ABI dir for compatibility.
+       # TODO: remove it in $ABI top directory
+       copy_file_list "$SDIR/lib" "$DDIR/libs/$ABI/lib" libsupc++.a libgnustl_shared.so
+       copy_file_list "$SDIR/lib64" "$DDIR/libs/$ABI/lib64" libsupc++.a libgnustl_shared.so
+       cp "$SDIR/lib/libgnustl_shared.a" "$DDIR/libs/$ABI/lib/libgnustl_static.a"
+       cp "$SDIR/lib64/libgnustl_shared.a" "$DDIR/libs/$ABI/lib64/libgnustl_static.a"
+       if [ "$ARCH" = "x86_64" ]; then
+         copy_file_list "$SDIR/libx32" "$DDIR/libs/$ABI/libx32" libsupc++.a libgnustl_shared.so
+         cp "$SDIR/libx32/libgnustl_shared.a" "$DDIR/libs/$ABI/libx32/libgnustl_static.a"
+       else
+         copy_file_list "$SDIR/lib32" "$DDIR/libs/$ABI/lib32" libsupc++.a libgnustl_shared.so
+         cp "$SDIR/lib32/libgnustl_shared.a" "$DDIR/libs/$ABI/lib32/libgnustl_static.a"
+       fi
+    fi
     if [ -d "$SDIR/thumb" ] ; then
         copy_file_list "$SDIR/thumb/$LDIR" "$DDIR/libs/$ABI/thumb" libsupc++.a libgnustl_shared.so
         cp "$SDIR/thumb/$LDIR/libgnustl_shared.a" "$DDIR/libs/$ABI/thumb/libgnustl_static.a"
@@ -326,15 +344,11 @@
 for ABI in $ABIS; do
     ARCH=$(convert_abi_to_arch $ABI)
     DEFAULT_GCC_VERSION=$(get_default_gcc_version_for_arch $ARCH)
-    BUILD_IT=
     for VERSION in $GCC_VERSION_LIST; do
         # Only build for this GCC version if it on or after DEFAULT_GCC_VERSION
-        if [ -z "$BUILD_IT" -a "$VERSION" = "$DEFAULT_GCC_VERSION" ]; then
-	    BUILD_IT=yes
-	fi
-	if [ -z "$BUILD_IT" ]; then
+        if [ "${VERSION%%l}" \< "$DEFAULT_GCC_VERSION" ]; then
             continue
-	fi
+        fi
 
         build_gnustl_for_abi $ABI "$BUILD_DIR" static $VERSION
         build_gnustl_for_abi $ABI "$BUILD_DIR" shared $VERSION
@@ -363,10 +377,16 @@
             FILES=""
             case "$ABI" in
                 x86_64)
-                    MULTILIB="include/32/bits include/x32/bits"
+                    MULTILIB="include/32/bits include/x32/bits
+                              lib/libsupc++.a lib/libgnustl_static.a lib/libgnustl_shared.so
+                              libx32/libsupc++.a libx32/libgnustl_static.a libx32/libgnustl_shared.so
+                              lib64/libsupc++.a lib64/libgnustl_static.a lib64/libgnustl_shared.so"
                     ;;
                 mips64)
-                    MULTILIB="include/32/bits include/n32/bits"
+                    MULTILIB="include/32/bits include/n32/bits
+                              lib/libsupc++.a lib/libgnustl_static.a lib/libgnustl_shared.so
+                              lib32/libsupc++.a lib32/libgnustl_static.a lib32/libgnustl_shared.so
+                              lib64/libsupc++.a lib64/libgnustl_static.a lib64/libgnustl_shared.so"
                     ;;
                 *)
                     MULTILIB=
@@ -386,7 +406,7 @@
             PACKAGE="${PACKAGE}.tar.bz2"
             dump "Packaging: $PACKAGE"
             pack_archive "$PACKAGE" "$NDK_DIR" "$FILES"
-            fail_panic "Could not package $ABI STLport binaries!"
+            fail_panic "Could not package $ABI GNU libstdc++ binaries!"
         done
     done
 fi
diff --git a/build/tools/build-llvm.sh b/build/tools/build-llvm.sh
index b495975..6f36804 100755
--- a/build/tools/build-llvm.sh
+++ b/build/tools/build-llvm.sh
@@ -305,6 +305,10 @@
 cd $LLVM_BUILD_OUT && run make install $MAKE_FLAGS
 fail_panic "Couldn't install llvm toolchain to $TOOLCHAIN_BUILD_PREFIX"
 
+# copy arm_neon_x86.h from GCC
+GCC_SRC_DIR=$SRC_DIR/gcc/gcc-$DEFAULT_GCC32_VERSION
+cp -a $GCC_SRC_DIR/gcc/config/i386/arm_neon.h $TOOLCHAIN_BUILD_PREFIX/lib/clang/$LLVM_VERSION/include/arm_neon_x86.h
+
 # Since r156448, llvm installs a separate llvm-config-host when cross-compiling. Use llvm-config-host if this
 # exists otherwise llvm-config.
 # Note, llvm-config-host should've really been called llvm-config-build and the following changes fix this by
diff --git a/build/tools/build-mingw64-toolchain.sh b/build/tools/build-mingw64-toolchain.sh
index 13ebf37..0240105 100755
--- a/build/tools/build-mingw64-toolchain.sh
+++ b/build/tools/build-mingw64-toolchain.sh
@@ -133,8 +133,8 @@
 
 MPFR_VERSION=3.1.1
 MPC_VERSION=1.0.1
-BINUTILS_VERSION=2.22
-GCC_VERSION=4.8.1
+BINUTILS_VERSION=2.24
+GCC_VERSION=4.8.3
 
 # Need at least revision 5166
 # For reference, I've built a working NDK with 5445
@@ -590,11 +590,11 @@
             run make
             log "$PKGNAME: Installing" &&
             run make install -j$JOBS &&
-            run cd $INSTALL_DIR && 
+            run cd $INSTALL_DIR &&
             run ln -s $TARGET_TAG mingw &&
-            run cd $INSTALL_DIR/mingw && 
+            run cd $INSTALL_DIR/mingw &&
             run ln -s lib lib$TARGET_BITS
-            fail_panic "Can't configure mingw-64-headers"
+            fail_panic "Can't install mingw-64-headers"
         ) || exit 1
         touch $STAMP_DIR/$PKGNAME
     fi
diff --git a/build/tools/build-target-prebuilts.sh b/build/tools/build-target-prebuilts.sh
index bad3afc..57c67ac 100755
--- a/build/tools/build-target-prebuilts.sh
+++ b/build/tools/build-target-prebuilts.sh
@@ -108,6 +108,11 @@
 ABIS=$(convert_archs_to_abis $ARCHS)
 UNKNOWN_ABIS=$(convert_archs_to_abis $UNKNOWN_ARCH)
 
+dump "Building $ABIS compiler-rt binaries..."
+run $BUILDTOOLS/build-compiler-rt.sh --abis="$ABIS" $FLAGS --src-dir="$SRC_DIR/llvm-$DEFAULT_LLVM_VERSION/compiler-rt" \
+   --llvm-version=$DEFAULT_LLVM_VERSION
+fail_panic "Could not build compiler-rt!"
+
 dump "Building $ABIS gabi++ binaries..."
 run $BUILDTOOLS/build-cxx-stl.sh --stl=gabi++ --abis="$ABIS" $FLAGS
 fail_panic "Could not build gabi++!"
@@ -120,11 +125,24 @@
 run $BUILDTOOLS/build-cxx-stl.sh --stl=stlport --abis="$ABIS,$UNKNOWN_ABIS" $FLAGS --with-debug-info
 fail_panic "Could not build stlport with debug info!"
 
-dump "Building $ABIS $UNKNOWN_ABIS libc++ binaries..."
-run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++ --abis="$ABIS,$UNKNOWN_ABIS" $FLAGS --llvm-version=$DEFAULT_LLVM_VERSION
-fail_panic "Could not build libc++!"
-run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++ --abis="$ABIS,$UNKNOWN_ABIS" $FLAGS --with-debug-info --llvm-version=$DEFAULT_LLVM_VERSION
-fail_panic "Could not build libc++ with debug info!"
+dump "Building $ABIS $UNKNOWN_ABIS libc++ binaries... with libc++abi"
+run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++-libc++abi --abis="$ABIS,$UNKNOWN_ABIS" $FLAGS --llvm-version=$DEFAULT_LLVM_VERSION
+fail_panic "Could not build libc++ with libc++abi!"
+run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++-libc++abi --abis="$ABIS,$UNKNOWN_ABIS" $FLAGS --with-debug-info --llvm-version=$DEFAULT_LLVM_VERSION
+fail_panic "Could not build libc++ with libc++abi and debug info!"
+
+# workaround issues in libc++/libc++abi for x86 and mips
+for abi in $ABIS; do
+  case $abi in
+     x86|x86_64|mips|mips64)
+  dump "Rebuilding $abi libc++ binaries... with gabi++"
+  run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++-gabi++ --abis=$abi $FLAGS --llvm-version=$DEFAULT_LLVM_VERSION
+  fail_panic "Could not build libc++ with gabi++!"
+  run $BUILDTOOLS/build-cxx-stl.sh --stl=libc++-gabi++ --abis=$abi $FLAGS --with-debug-info --llvm-version=$DEFAULT_LLVM_VERSION
+  fail_panic "Could not build libc++ with gabi++ and debug info!"
+     ;;
+  esac
+done
 
 if [ ! -z $VISIBLE_LIBGNUSTL_STATIC ]; then
     GNUSTL_STATIC_VIS_FLAG=--visible-libgnustl-static
@@ -140,11 +158,6 @@
 run $BUILDTOOLS/build-libportable.sh --abis="$ABIS" $FLAGS
 fail_panic "Could not build libportable!"
 
-dump "Building $ABIS compiler-rt binaries..."
-run $BUILDTOOLS/build-compiler-rt.sh --abis="$ABIS" $FLAGS --src-dir="$SRC_DIR/llvm-$DEFAULT_LLVM_VERSION/compiler-rt" \
-   --llvm-version=$DEFAULT_LLVM_VERSION
-fail_panic "Could not build compiler-rt!"
-
 if [ "$PACKAGE_DIR" ]; then
     dump "Done, see $PACKAGE_DIR"
 else
diff --git a/build/tools/builder-funcs.sh b/build/tools/builder-funcs.sh
index 81aebea..b5fa0a0 100644
--- a/build/tools/builder-funcs.sh
+++ b/build/tools/builder-funcs.sh
@@ -110,6 +110,10 @@
     _BUILD_C_INCLUDES=
     _BUILD_CFLAGS=
     _BUILD_CXXFLAGS=
+    _BUILD_LDFLAGS_BEGIN_SO=
+    _BUILD_LDFLAGS_END_SO=
+    _BUILD_LDFLAGS_BEGIN_EXE=
+    _BUILD_LDFLAGS_END_EXE=
     _BUILD_LDFLAGS=
     _BUILD_BINPREFIX=
     _BUILD_DSTDIR=
@@ -117,6 +121,7 @@
     _BUILD_OBJECTS=
     _BUILD_STATIC_LIBRARIES=
     _BUILD_SHARED_LIBRARIES=
+    _BUILD_COMPILER_RUNTIME_LDFLAGS=-lgcc
 }
 
 builder_set_binprefix ()
@@ -132,6 +137,7 @@
     _BUILD_BINPREFIX=$1
     _BUILD_CC=${1}clang
     _BUILD_CXX=${1}clang++
+    _BUILD_AR=${2}ar
 }
 
 builder_set_builddir ()
@@ -204,6 +210,11 @@
     _BUILD_C_INCLUDES=
 }
 
+builder_compiler_runtime_ldflags ()
+{
+    _BUILD_COMPILER_RUNTIME_LDFLAGS=$1
+}
+
 builder_link_with ()
 {
     local LIB
@@ -241,7 +252,7 @@
             exit 1
         fi
         obj=$src
-        cflags="$_BUILD_CFLAGS"
+        cflags=""
         for inc in $_BUILD_C_INCLUDES; do
             cflags=$cflags" -I$inc"
         done
@@ -251,6 +262,7 @@
                 obj=${obj%%.c}
                 text="C"
                 cc=$_BUILD_CC
+                cflags="$cflags $_BUILD_CFLAGS"
                 ;;
             *.cpp)
                 obj=${obj%%.cpp}
@@ -268,6 +280,7 @@
                 obj=${obj%%.$obj}
                 text="ASM"
                 cc=$_BUILD_CC
+                cflags="$cflags $_BUILD_CFLAGS"
                 ;;
             *)
                 echo "Unknown source file extension: $obj"
@@ -365,21 +378,25 @@
     # Important: -lgcc must appear after objects and static libraries,
     #            but before shared libraries for Android. It doesn't hurt
     #            for other platforms.
+    #            Also $libm must come before -lc because bionic libc
+    #            accidentally exports a soft-float version of ldexp.
     builder_command ${_BUILD_CXX} \
         -Wl,-soname,$(basename $lib) \
-        -shared \
+        -Wl,-shared \
+        $_BUILD_LDFLAGS_BEGIN_SO \
         $_BUILD_OBJECTS \
         $_BUILD_STATIC_LIBRARIES \
-        -lgcc \
+        $_BUILD_COMPILER_RUNTIME_LDFLAGS \
         $_BUILD_SHARED_LIBRARIES \
-        -lc $libm \
+        $libm -lc \
         $_BUILD_LDFLAGS \
+        $_BUILD_LDFLAGS_END_SO \
         -o $lib
     fail_panic "Could not create ${_BUILD_PREFIX}shared library $libname"
 }
 
 # Same as builder_shared_library, but do not link the default libs
-builder_nodefaultlibs_shared_library ()
+builder_nostdlib_shared_library ()
 {
     local lib libname suffix
     libname=$1
@@ -397,11 +414,13 @@
 
     builder_command ${_BUILD_CXX} \
         -Wl,-soname,$(basename $lib) \
-        -shared \
+        -Wl,-shared \
+        $_BUILD_LDFLAGS_BEGIN_SO \
         $_BUILD_OBJECTS \
         $_BUILD_STATIC_LIBRARIES \
         $_BUILD_SHARED_LIBRARIES \
         $_BUILD_LDFLAGS \
+        $_BUILD_LDFLAGS_END_SO \
         -o $lib
     fail_panic "Could not create ${_BUILD_PREFIX}shared library $libname"
 }
@@ -488,8 +507,10 @@
 builder_begin_android ()
 {
     local ABI BUILDDIR LLVM_VERSION MAKEFILE
-    local ARCH SYSROOT FLAGS
+    local ARCH SYSROOT LDIR FLAGS
+    local CRTBEGIN_SO_O CRTEND_SO_O CRTBEGIN_EXE_SO CRTEND_SO_O
     local BINPREFIX GCC_TOOLCHAIN LLVM_TRIPLE GCC_VERSION
+    local SCRATCH_FLAGS
     if [ -z "$NDK_DIR" ]; then
         panic "NDK_DIR is not defined!"
     elif [ ! -d "$NDK_DIR/platforms" ]; then
@@ -506,12 +527,16 @@
         LLVM_VERSION=$DEFAULT_LLVM_VERSION
     fi
     if [ -n "$LLVM_VERSION" ]; then
-        # override GCC_VERSION to pick $DEFAULT_LLVM_GCC_VERSION instead
-        GCC_VERSION=$DEFAULT_LLVM_GCC_VERSION
+        # override GCC_VERSION to pick $DEFAULT_LLVM_GCC??_VERSION instead
+        if [ "$ABI" != "${ABI%%64*}" ]; then
+            GCC_VERSION=$DEFAULT_LLVM_GCC64_VERSION
+        else
+            GCC_VERSION=$DEFAULT_LLVM_GCC32_VERSION
+        fi
     fi
     for TAG in $HOST_TAG $HOST_TAG32; do
         BINPREFIX=$NDK_DIR/$(get_toolchain_binprefix_for_arch $ARCH $GCC_VERSION $TAG)
-        if [ -f ${BINPREFIX}-gcc ]; then
+        if [ -f ${BINPREFIX}gcc ]; then
             break;
         fi
     done
@@ -522,6 +547,19 @@
     fi
 
     SYSROOT=$NDK_DIR/$(get_default_platform_sysroot_for_arch $ARCH)
+    LDIR=$SYSROOT"/usr/"$(get_default_libdir_for_arch $ARCH)
+
+    CRTBEGIN_EXE_O=$LDIR/crtbegin_dynamic.o
+    CRTEND_EXE_O=$LDIR/crtend_android.o
+
+    CRTBEGIN_SO_O=$LDIR/crtbegin_so.o
+    CRTEND_SO_O=$LDIR/crtend_so.o
+    if [ ! -f "$CRTBEGIN_SO_O" ]; then
+        CRTBEGIN_SO_O=$CRTBEGIN_EXE_O
+    fi
+    if [ ! -f "$CRTEND_SO_O" ]; then
+        CRTEND_SO_O=$CRTEND_EXE_O
+    fi
 
     builder_begin "$BUILDDIR" "$MAKEFILE"
     builder_set_prefix "$ABI "
@@ -554,38 +592,62 @@
             *)
                 LLVM_TRIPLE=le32-none-ndk
                 GCC_TOOLCHAIN=
+                CRTBEGIN_SO_O=
+                CRTEND_SO_O=
+                CRTBEGIN_EXE_O=
+                CRTEND_EXE_O=
                 FLAGS=-emit-llvm
                 ;;
         esac
-        builder_cflags "-target $LLVM_TRIPLE $FLAGS"
-        builder_ldflags "-target $LLVM_TRIPLE $FLAGS"
+        SCRATCH_FLAGS="-target $LLVM_TRIPLE $FLAGS"
+        builder_cflags  "$SCRATCH_FLAGS"
+        builder_cxxflags "$SCRATCH_FLAGS"
+        builder_ldflags "$SCRATCH_FLAGS"
         if [ ! -z $GCC_TOOLCHAIN ]; then
-            builder_cflags "-gcc-toolchain $GCC_TOOLCHAIN"
-            builder_ldflags "-gcc-toolchain $GCC_TOOLCHAIN"
+            SCRATCH_FLAGS="-gcc-toolchain $GCC_TOOLCHAIN"
+            builder_cflags "$SCRATCH_FLAGS"
+            builder_cxxflags "$SCRATCH_FLAGS"
+            builder_ldflags "$SCRATCH_FLAGS"
         fi
     fi
 
-    builder_cflags "--sysroot=$SYSROOT"
-    builder_cxxflags "--sysroot=$SYSROOT"
-    builder_ldflags "--sysroot=$SYSROOT"
+    SCRATCH_FLAGS="--sysroot=$SYSROOT"
+    builder_cflags "$SCRATCH_FLAGS"
+    builder_cxxflags "$SCRATCH_FLAGS"
+
+    SCRATCH_FLAGS="--sysroot=$SYSROOT -nostdlib"
+    _BUILD_LDFLAGS_BEGIN_SO="$SCRATCH_FLAGS $CRTBEGIN_SO_O"
+    _BUILD_LDFLAGS_BEGIN_EXE="$SCRATCH_FLAGS $CRTBEGIN_EXE_O"
+
+    _BUILD_LDFLAGS_END_SO="$CRTEND_SO_O"
+    _BUILD_LDFLAGS_END_EXE="$CRTEND_EXE_O"
 
     case $ABI in
         armeabi)
             if [ -z "$LLVM_VERSION" ]; then
                 # add -minline-thumb1-jumptable such that gabi++/stlport/libc++ can be linked
                 # with compiler-rt where helpers __gnu_thumb1_case_* (in libgcc.a) don't exist
-                builder_cflags "-minline-thumb1-jumptable"
+                SCRATCH_FLAGS="-minline-thumb1-jumptable"
+                builder_cflags "$SCRATCH_FLAGS"
+                builder_cxxflags "$SCRATCH_FLAGS"
             else
                 builder_cflags ""
+                builder_cxxflags ""
             fi
             ;;
         armeabi-v7a|armeabi-v7a-hard)
-            builder_cflags "-march=armv7-a -mfpu=vfpv3-d16"
+            SCRATCH_FLAGS="-march=armv7-a -mfpu=vfpv3-d16"
+            builder_cflags "$SCRATCH_FLAGS"
+            builder_cxxflags "$SCRATCH_FLAGS"
             builder_ldflags "-march=armv7-a -Wl,--fix-cortex-a8"
             if [ "$ABI" != "armeabi-v7a-hard" ]; then
-                builder_cflags "-mfloat-abi=softfp"
+                SCRATCH_FLAGS="-mfloat-abi=softfp"
+                builder_cflags "$SCRATCH_FLAGS"
+                builder_cxxflags "$SCRATCH_FLAGS"
             else
-                builder_cflags "-mhard-float -D_NDK_MATH_NO_SOFTFP=1"
+                SCRATCH_FLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1"
+                builder_cflags "$SCRATCH_FLAGS"
+                builder_cxxflags "$SCRATCH_FLAGS"
                 builder_ldflags "-Wl,--no-warn-mismatch -lm_hard"
             fi
             ;;
diff --git a/build/tools/dev-defaults.sh b/build/tools/dev-defaults.sh
index e3eb627..50500ea 100644
--- a/build/tools/dev-defaults.sh
+++ b/build/tools/dev-defaults.sh
@@ -6,9 +6,9 @@
 # Note: levels 6 and 7 are omitted since they have the same native
 # APIs as level 5. Same for levels 10, 11 and 12
 #
-API_LEVELS="3 4 5 8 9 12 13 14 15 16 17 18 19 20"
+API_LEVELS="3 4 5 8 9 12 13 14 15 16 17 18 19 L"
 
-MIN_API64_LEVEL=20
+FIRST_API64_LEVEL=L
 
 # Default ABIs for the target prebuilt binaries.
 PREBUILT_ABIS="armeabi armeabi-v7a x86 mips armeabi-v7a-hard arm64-v8a x86_64 mips64"
@@ -27,6 +27,9 @@
 # root directory.
 LIBCXX_SUBDIR=sources/cxx-stl/llvm-libc++
 
+# Location of the LLVM libc++abi headers, relative to the NDK # root directory.
+LIBCXXABI_SUBDIR=sources/cxx-stl/llvm-libc++abi/libcxxabi
+
 # Location of the libportable sources, relative to the NDK root directory
 LIBPORTABLE_SUBDIR=sources/android/libportable
 
@@ -46,14 +49,10 @@
 # The space-separated list of all GCC versions we support in this NDK
 DEFAULT_GCC_VERSION_LIST="4.6 4.8 4.9"
 
-# The default GCC version for 32-bit NDK is the first item in $DEFAULT_GCC_VERSION_LIST
-DEFAULT_GCC32_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 1)
-
-# The default GCC version for 64-bit is the last item in $DEFAULT_GCC_VERSION_LIST
-DEFAULT_GCC64_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | tail -n 1)
-
-# The default GCC version for "clang -gcc-toolchain", is the second item in $DEFAULT_GCC_VERSION_LIST
-DEFAULT_LLVM_GCC_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 2 | tail -n 1)
+DEFAULT_GCC32_VERSION=4.6
+DEFAULT_GCC64_VERSION=4.9
+DEFAULT_LLVM_GCC32_VERSION=4.8
+DEFAULT_LLVM_GCC64_VERSION=4.9
 
 DEFAULT_BINUTILS_VERSION=2.21
 DEFAULT_GDB_VERSION=7.3.x
@@ -66,7 +65,7 @@
 DEFAULT_PYTHON_VERSION=2.7.5
 DEFAULT_PERL_VERSION=5.16.2
 
-RECENT_BINUTILS_VERSION=2.23
+RECENT_BINUTILS_VERSION=2.24
 
 # Default platform to build target binaries against.
 DEFAULT_PLATFORM=android-9
@@ -279,7 +278,8 @@
 get_default_gdb_version_for_gcc ()
 {
     case $1 in
-        x86*|aarch64-*|mips64el-*|*-4.8|*-4.8l|*-4.9|*-4.9l) echo "7.6";;
+        mips*) echo "7.7";;
+        x86*|aarch64-*|*-4.8|*-4.8l|*-4.9|*-4.9l) echo "7.6";;
         *) echo "$DEFAULT_GDB_VERSION";;
     esac
 }
@@ -291,5 +291,8 @@
 #
 get_default_gdbserver_version_for_gcc ()
 {
-    echo "7.6"
+    case $1 in
+        mips*) echo "7.7";;
+        *) echo "7.6";;
+    esac
 }
diff --git a/build/tools/dev-system-import.sh b/build/tools/dev-system-import.sh
index c121de3..689867f 100755
--- a/build/tools/dev-system-import.sh
+++ b/build/tools/dev-system-import.sh
@@ -333,7 +333,7 @@
 
     # Build it with our cross-compiler. It will complain about conflicting
     # types for built-in functions, so just shut it up.
-    $TOOLCHAIN_PREFIX-gcc -shared -Wl,-Bsymbolic -nostdlib -o $TMPO $TMPC 1>/dev/null 2>&1
+    $TOOLCHAIN_PREFIX-gcc -Wl,-shared,-Bsymbolic -nostdlib -o $TMPO $TMPC 1>/dev/null 2>&1
     if [ $? != 0 ] ; then
         dump "ERROR: Can't generate shell library for: $1"
         dump "See the content of $TMPC for details."
diff --git a/build/tools/download-toolchain-sources.sh b/build/tools/download-toolchain-sources.sh
index 0b21b43..4902a36 100755
--- a/build/tools/download-toolchain-sources.sh
+++ b/build/tools/download-toolchain-sources.sh
@@ -113,7 +113,7 @@
 # Create temp directory where everything will be copied first
 #
 PKGNAME=android-ndk-toolchain-$RELEASE
-TMPDIR=/tmp/ndk-$USER/$PKGNAME
+TMPDIR=$NDK_TMPDIR/$PKGNAME
 log "Creating temporary directory $TMPDIR"
 rm -rf $TMPDIR && mkdir $TMPDIR
 fail_panic "Could not create temporary directory: $TMPDIR"
@@ -217,7 +217,7 @@
 toolchain_checkout "" $BRANCH expat .
 toolchain_checkout "" $BRANCH binutils binutils-2.21 binutils-2.23 binutils-2.24
 toolchain_checkout "" $BRANCH gcc gcc-4.6 gcc-4.8 gcc-4.9
-toolchain_checkout "" $BRANCH gdb gdb-7.3.x gdb-7.6
+toolchain_checkout "" $BRANCH gdb gdb-7.3.x gdb-7.6 gdb-7.7
 toolchain_checkout "" $BRANCH python Python-2.7.5
 toolchain_checkout "" $BRANCH perl perl-5.16.2
 toolchain_checkout "" $BRANCH mclinker .
diff --git a/build/tools/gen-platforms.sh b/build/tools/gen-platforms.sh
index 13e70a9..45dbea4 100755
--- a/build/tools/gen-platforms.sh
+++ b/build/tools/gen-platforms.sh
@@ -184,6 +184,11 @@
 else
     # Build the list from the content of SRCDIR
     PLATFORMS=`extract_platforms_from "$SRCDIR"`
+    # hack to place non-numeric level 'L' (lmp-preview) at the very end
+    if [ "$PLATFORMS" != "${PLATFORMS%%L*}" ] ; then
+        PLATFORMS=`echo $PLATFORMS | tr -d 'L'`
+        PLATFORMS="$PLATFORMS L"
+    fi
     log "Using platforms: $PLATFORMS"
 fi
 
@@ -426,7 +431,7 @@
 
     # Build it with our cross-compiler. It will complain about conflicting
     # types for built-in functions, so just shut it up.
-    COMMAND="$CC -shared -Wl,-Bsymbolic -Wl,-soname,$LIBRARY -nostdlib -o $TMPO $TMPC"
+    COMMAND="$CC -Wl,-shared,-Bsymbolic -Wl,-soname,$LIBRARY -nostdlib -o $TMPO $TMPC"
     echo "## COMMAND: $COMMAND" > $TMPL
     $COMMAND 1>>$TMPL 2>&1
     if [ $? != 0 ] ; then
@@ -580,6 +585,12 @@
     local HEADER="platforms/android-$API/arch-$ARCH/usr/include/android/api-level.h"
     log "Generating: $HEADER"
     rm -f "$3/$HEADER"  # Remove symlink if any.
+
+    # hack to replace 'L' with large number
+    if [ "$API" = "L" ]; then
+        API="9999 /*'L'*/"
+    fi
+
     cat > "$3/$HEADER" <<EOF
 /*
  * Copyright (C) 2008 The Android Open Source Project
@@ -667,7 +678,7 @@
         # into the x86 and mips android-9 directories.
         if [ -z "$PREV_SYSROOT_DST" ]; then
             for OLD_PLATFORM in $PLATFORMS; do
-                if [ "$OLD_PLATFORM" -eq "$PLATFORM" ]; then
+                if [ "$OLD_PLATFORM" = "$PLATFORM" ]; then
                     break
                 fi
                 copy_src_directory platforms/android-$OLD_PLATFORM/include \
@@ -677,10 +688,10 @@
         fi
 
         # There are two set of bionic headers: the original ones haven't been updated since
-        # gingerbread except for bug fixing, and the new ones in android-$MIN_API64_LEVEL
+        # gingerbread except for bug fixing, and the new ones in android-$FIRST_API64_LEVEL
         # with 64-bit support.  Before the old bionic headers are deprecated/removed, we need
-        # to remove stale old headers when createing platform >= $MIN_API64_LEVEL
-        if [ "$PLATFORM" -eq "$MIN_API64_LEVEL" ]; then
+        # to remove stale old headers when createing platform = $FIRST_API64_LEVEL
+        if [ "$PLATFORM" = "$FIRST_API64_LEVEL" ]; then
             log "Removing stale bionic headers in \$DST/$SYSROOT_DST/include"
             nonbionic_files="android EGL GLES GLES2 GLES3 KHR media OMXAL SLES jni.h thread_db.h zconf.h zlib.h"
             if [ -d "$DSTDIR/$SYSROOT_DST/include/" ]; then
diff --git a/build/tools/make-standalone-toolchain.sh b/build/tools/make-standalone-toolchain.sh
index d6c58a2..427442c 100755
--- a/build/tools/make-standalone-toolchain.sh
+++ b/build/tools/make-standalone-toolchain.sh
@@ -87,6 +87,11 @@
         aarch64-*)
             ARCH=arm64
             ;;
+        x86_64-linux-android-*)
+            ARCH=x86_64
+            TOOLCHAIN_NAME=$(echo "$TOOLCHAIN_NAME" | sed -e 's/-linux-android//')
+            echo "Auto-truncate: --toolchain=$TOOLCHAIN_NAME"
+            ;;
         x86_64-*)
             ARCH=x86_64
             ;;
@@ -167,14 +172,20 @@
     fi
 fi
 
-# Detect LLVM version from toolchain name
-if [ -z "$LLVM_VERSION" ]; then
-    LLVM_VERSION_EXTRACT=$(echo "$TOOLCHAIN_NAME" | grep 'clang[0-9]\.[0-9]$' | sed -e 's/.*-clang//')
-    if [ -n "$LLVM_VERSION_EXTRACT" ]; then
-        TOOLCHAIN_NAME=$(get_default_toolchain_name_for_arch $ARCH)
+# Detect LLVM version from toolchain name with *clang*
+LLVM_VERSION_EXTRACT=$(echo "$TOOLCHAIN_NAME" | grep 'clang[0-9]\.[0-9]$' | sed -e 's/.*-clang//')
+if [ -n "$LLVM_VERSION_EXTRACT" ]; then
+    NEW_TOOLCHAIN_NAME=${TOOLCHAIN_NAME%-clang${LLVM_VERSION_EXTRACT}}
+    if [ -z "$LLVM_VERSION" ]; then
         LLVM_VERSION=$LLVM_VERSION_EXTRACT
-        echo "Auto-config: --toolchain=$TOOLCHAIN_NAME, --llvm-version=$LLVM_VERSION"
+        echo "Auto-config: --toolchain=$NEW_TOOLCHAIN_NAME, --llvm-version=$LLVM_VERSION"
+    else
+        if [ "$LLVM_VERSION" != "$LLVM_VERSION_EXTRACT" ]; then
+            echo "Conflict llvm-version: --llvm-version=$LLVM_VERSION and as implied by --toolchain=$TOOLCHAIN_NAME"
+            exit 1
+	fi
     fi
+    TOOLCHAIN_NAME=$NEW_TOOLCHAIN_NAME
 fi
 
 # Check PLATFORM
@@ -186,7 +197,7 @@
             PLATFORM=android-9
             ;;
         arm64|x86_64|mips64)
-            PLATFORM=android-$MIN_API64_LEVEL
+            PLATFORM=android-$FIRST_API64_LEVEL
             ;;
         *)
             dump "ERROR: Unsupported NDK architecture $ARCH!"
@@ -242,7 +253,7 @@
 fi
 
 # Check that we have any prebuilts GCC toolchain here
-if [ ! -d "$TOOLCHAIN_PATH/prebuilt" ] ; then
+if [ ! -d "$TOOLCHAIN_PATH/prebuilt" ]; then
     echo "Toolchain is missing prebuilt files: $TOOLCHAIN_NAME"
     echo "You must point to a valid NDK release package!"
     exit 1
@@ -512,8 +523,6 @@
     cp -a $NDK_DIR/platforms/$PLATFORM/arch-$ARCH/usr/lib/crt* $TMPDIR/sysroot/usr/lib
 fi
 
-dump "Copying libstdc++ headers and libraries..."
-
 GNUSTL_DIR=$NDK_DIR/$GNUSTL_SUBDIR/$GCC_VERSION
 GNUSTL_LIBS=$GNUSTL_DIR/libs
 
@@ -522,20 +531,37 @@
 
 LIBCXX_DIR=$NDK_DIR/$LIBCXX_SUBDIR
 LIBCXX_LIBS=$LIBCXX_DIR/libs
+case $ARCH in
+    x86|x86_64|mips|mips64)
+        LIBCXX_SUPPORT_LIB=gabi++
+        ;;
+    *)
+        LIBCXX_SUPPORT_LIB=libc++abi
+        ;;
+esac
 
 SUPPORT_DIR=$NDK_DIR/$SUPPORT_SUBDIR
 
 COMPILER_RT_DIR=$NDK_DIR/$COMPILER_RT_SUBDIR
 COMPILER_RT_LIBS=$COMPILER_RT_DIR/libs
 
+if [ "$STL" = "libcxx" -o "$STL" = "libc++" ]; then
+    dump "Copying c++ runtime headers and libraries (with $LIBCXX_SUPPORT_LIB)..."
+else
+    dump "Copying c++ runtime headers and libraries..."
+fi
+
 ABI_STL="$TMPDIR/$ABI_CONFIGURE_TARGET"
 ABI_STL_INCLUDE="$TMPDIR/include/c++/$GCC_BASE_VERSION"
 ABI_STL_INCLUDE_TARGET="$ABI_STL_INCLUDE/$ABI_CONFIGURE_TARGET"
 
 # $1: filenames of headers
-copy_gabixx_headers () {
+copy_abi_headers () {
+  local ABI_NAME=$1
+  shift
+
   for header in $@; do
-    (cd $ABI_STL_INCLUDE && cp -a ../../gabi++/include/$header $header)
+    (set -e; cd $ABI_STL_INCLUDE && cp -a ../../$ABI_NAME/include/$header $header) || exit 1
   done
 }
 
@@ -548,26 +574,36 @@
         libcxx|libc++)
             copy_directory "$LIBCXX_DIR/libcxx/include" "$ABI_STL_INCLUDE"
             copy_directory "$SUPPORT_DIR/include" "$ABI_STL_INCLUDE"
-            copy_directory "$STLPORT_DIR/../gabi++/include" "$ABI_STL_INCLUDE/../../gabi++/include"
-            copy_gabixx_headers cxxabi.h unwind.h unwind-arm.h unwind-itanium.h gabixx_config.h
+            if [ "$LIBCXX_SUPPORT_LIB" = "gabi++" ]; then
+                copy_directory "$STLPORT_DIR/../gabi++/include" "$ABI_STL_INCLUDE/../../gabi++/include"
+                copy_abi_headers gabi++ cxxabi.h unwind.h unwind-arm.h unwind-itanium.h gabixx_config.h
+            elif [ "$LIBCXX_SUPPORT_LIB" = "libc++abi" ]; then
+                copy_directory "$LIBCXX_DIR/../llvm-libc++abi/libcxxabi/include" "$ABI_STL_INCLUDE/../../llvm-libc++abi/include"
+                copy_abi_headers llvm-libc++abi cxxabi.h libunwind.h unwind.h
+            else
+                dump "ERROR: Unknown libc++ support lib: $LIBCXX_SUPPORT_LIB"
+                exit 1
+            fi
             ;;
         stlport)
             copy_directory "$STLPORT_DIR/stlport" "$ABI_STL_INCLUDE"
             copy_directory "$STLPORT_DIR/../gabi++/include" "$ABI_STL_INCLUDE/../../gabi++/include"
-            copy_gabixx_headers cxxabi.h unwind.h unwind-arm.h unwind-itanium.h gabixx_config.h
+            copy_abi_headers gabi++ cxxabi.h unwind.h unwind-arm.h unwind-itanium.h gabixx_config.h
             ;;
     esac
 }
 
 # $1: Source ABI (e.g. 'armeabi')
-# $2: Optional "yes" (default) or "no" about whether to copy additional header (eg. include/bits)
-# $3: Optional destination directory, default to empty (e.g. "", "thumb", "armv7-a/thumb")
-# $4: Optional source directory, default to empty (e.g. "", "thumb", "armv7-a/thumb")
+# #2  Optional destination path of additional header to copy (eg. include/bits), default to empty
+# $3: Optional source path of additional additional header to copy, default to empty
+# $4: Optional destination directory, default to empty (e.g. "", "thumb", "armv7-a/thumb")
+# $5: Optional source directory, default to empty (e.g. "", "thumb", "armv7-a/thumb")
 copy_stl_libs () {
     local ABI=$1
-    local COPY_ADDITIONAL_HEADER=$2
-    local DEST_DIR=$3
-    local SRC_DIR=$4
+    local HEADER_DST=$2
+    local HEADER_SRC=$3
+    local DEST_DIR=$4
+    local SRC_DIR=$5
     local ABI_SRC_DIR=$ABI
 
     if [ -n "$SRC_DIR" ]; then
@@ -580,16 +616,8 @@
 
     case $STL in
         gnustl)
-            if [ "$COPY_ADDITIONAL_HEADER" != "no" ]; then
-                copy_directory "$GNUSTL_LIBS/$ABI/include/bits" "$ABI_STL_INCLUDE_TARGET/$DEST_DIR/bits"
-                if [ "$ABI" = "x86_64" -o "$ABI" = "mips64" ]; then
-                    copy_directory "$GNUSTL_LIBS/$ABI/include/32/bits" "$ABI_STL_INCLUDE_TARGET/$DEST_DIR/32/bits"
-                    if [ "$ABI" = "x86_64" ]; then
-                        copy_directory "$GNUSTL_LIBS/$ABI/include/x32/bits" "$ABI_STL_INCLUDE_TARGET/$DEST_DIR/x32/bits"
-                    else
-                        copy_directory "$GNUSTL_LIBS/$ABI/include/n32/bits" "$ABI_STL_INCLUDE_TARGET/$DEST_DIR/n32/bits"
-                    fi
-                fi
+            if [ "$HEADER_SRC" != "" ]; then
+                copy_directory "$GNUSTL_LIBS/$ABI/include/$HEADER_SRC" "$ABI_STL_INCLUDE_TARGET/$HEADER_DST"
             fi
             copy_file_list "$GNUSTL_LIBS/$ABI_SRC_DIR" "$ABI_STL/lib/$DEST_DIR" "libgnustl_shared.so"
             copy_file_list "$GNUSTL_LIBS/$ABI_SRC_DIR" "$ABI_STL/lib/$DEST_DIR" "libsupc++.a"
@@ -632,19 +660,37 @@
 
     case $ABI in
         armeabi)
-            copy_stl_libs armeabi
-            copy_stl_libs armeabi          "no"  "/thumb"
+            copy_stl_libs armeabi          "bits"                "bits"
+            copy_stl_libs armeabi          "thumb/bits"          "bits"       "/thumb"
             ;;
         armeabi-v7a)
-            copy_stl_libs armeabi-v7a      "yes" "armv7-a"
-            copy_stl_libs armeabi-v7a      "no"  "armv7-a/thumb"
+            copy_stl_libs armeabi-v7a      "armv7-a/bits"        "bits"       "armv7-a"
+            copy_stl_libs armeabi-v7a      "armv7-a/thumb/bits"  "bits"       "armv7-a/thumb"
             ;;
         armeabi-v7a-hard)
-            copy_stl_libs armeabi-v7a-hard "no"  "armv7-a/hard" "."
-            copy_stl_libs armeabi-v7a-hard "no"  "armv7-a/thumb/hard" "thumb"
+            copy_stl_libs armeabi-v7a-hard ""                    ""           "armv7-a/hard"       "."
+            copy_stl_libs armeabi-v7a-hard ""                    ""           "armv7-a/thumb/hard" "thumb"
+            ;;
+        x86_64)
+            if [ "$STL" = "gnustl" ]; then
+                copy_stl_libs x86_64       "32/bits"             "32/bits"    ""                   "lib"
+                copy_stl_libs x86_64       "bits"                "bits"       "../lib64"           "lib64"
+                copy_stl_libs x86_64       "x32/bits"            "x32/bits"   "../libx32"          "libx32"
+            else
+                copy_stl_libs "$ABI"
+            fi
+            ;;
+        mips64)
+            if [ "$STL" = "gnustl" ]; then
+                copy_stl_libs mips64       "32/bits"             "32/bits"    ""                   "lib"
+                copy_stl_libs mips64       "bits"                "bits"       "../lib64"           "lib64"
+                copy_stl_libs mips64       "n32/bits"            "n32/bits"   "../lib32"           "lib32"
+            else
+                copy_stl_libs "$ABI"
+            fi
             ;;
         *)
-            copy_stl_libs "$ABI"
+            copy_stl_libs "$ABI"           "bits"                "bits"
             ;;
     esac
 }
diff --git a/build/tools/package-release.sh b/build/tools/package-release.sh
index 18c3090..b01da5c 100755
--- a/build/tools/package-release.sh
+++ b/build/tools/package-release.sh
@@ -441,6 +441,7 @@
     # Remove tests containing duplicated files in case-insensitive file system
     if [ "$SYSTEM" = "windows" -o "$SYSTEM" = "darwin-x86" ]; then
         rm -rf $DSTDIR/tests/build/c++-stl-source-extensions
+        find $DSTDIR/platforms | sort  | uniq -di | xargs rm
     fi
 
     if [ "$PREBUILT_NDK" ]; then
@@ -555,6 +556,11 @@
     # Unpack renderscript headers/libs
     unpack_prebuilt renderscript "$DSTDIR" "$DSTDIR64"
 
+    # Unpack misc stuff
+    if [ -f "$PREBUILT_DIR/misc.tar.bz2" ]; then
+        unpack_prebuilt misc "$DSTDIR" "$DSTDIR64"
+    fi
+
     # Create an archive for the final package. Extension depends on the
     # host system.
     ARCHIVE=$BIN_RELEASE
diff --git a/build/tools/prebuilt-common.sh b/build/tools/prebuilt-common.sh
index 2511a45..0031a8d 100644
--- a/build/tools/prebuilt-common.sh
+++ b/build/tools/prebuilt-common.sh
@@ -1071,7 +1071,7 @@
         ABI_INSTALL_NAME="mips"
         ABI_CONFIGURE_TARGET="mipsel-linux-android"
         # Set default to mips32
-        ABI_CONFIGURE_EXTRA_FLAGS="--with-arch=mips32"
+        ABI_CONFIGURE_EXTRA_FLAGS="--with-arch=mips32 -with-fp-32=xx --with-odd-spreg-32=no"
         # Enable C++ exceptions, RTTI and GNU libstdc++ at the same time
         # You can't really build these separately at the moment.
         # Add -fpic, because MIPS NDK will need to link .a into .so.
@@ -1085,8 +1085,8 @@
         ABI=$ARCH
         ABI_INSTALL_NAME="mips64"
         ABI_CONFIGURE_TARGET="mips64el-linux-android"
-        # Set default to mips64r2
-        ABI_CONFIGURE_EXTRA_FLAGS="--with-arch=mips64r2"
+        # Set default to mips64r6
+        ABI_CONFIGURE_EXTRA_FLAGS="--with-arch=mips64r6"
         # Enable C++ exceptions, RTTI and GNU libstdc++ at the same time
         # You can't really build these separately at the moment.
         # Add -fpic, because MIPS NDK will need to link .a into .so.
@@ -1391,9 +1391,9 @@
 get_default_api_level_for_arch ()
 {
     # For now, always build the toolchain against API level 9 for 32-bit arch
-    # and API level $MIN_API64_LEVEL for 64-bit arch
+    # and API level $FIRST_API64_LEVEL for 64-bit arch
     case $1 in
-       *64) echo $MIN_API64_LEVEL ;;
+       *64) echo $FIRST_API64_LEVEL ;;
        *) echo 9 ;;
     esac
 }
@@ -1408,7 +1408,7 @@
     local LEVEL=$(get_default_api_level_for_arch $ARCH)
 
     if [ "$ARCH" != "${ARCH%%64*}" ] ; then
-        LEVEL=$MIN_API64_LEVEL
+        LEVEL=$FIRST_API64_LEVEL
     fi
     echo "platforms/android-$LEVEL/arch-$ARCH"
 }
diff --git a/build/tools/unwanted-symbols/arm64/libc.so.functions.txt b/build/tools/unwanted-symbols/arm64/libc.so.functions.txt
new file mode 100644
index 0000000..7bd76d6
--- /dev/null
+++ b/build/tools/unwanted-symbols/arm64/libc.so.functions.txt
@@ -0,0 +1,43 @@
+android_getaddrinfofornet
+android_gethostbyaddrfornet
+android_gethostbynamefornet
+__android_set_abort_message
+arc4random
+arc4random_addrandom
+arc4random_buf
+arc4random_stir
+arc4random_uniform
+__bionic_name_mem
+dlmalloc_inspect_all
+dlmalloc_trim
+dn_expand
+__findenv
+get_malloc_leak_info
+localtime_tz
+mktime_tz
+posix2time
+__pthread_cleanup_pop
+__pthread_cleanup_push
+__pthread_gettid
+SHA1Final
+SHA1Init
+SHA1Transform
+SHA1Update
+__srefill
+strftime_tz
+__system_properties_init
+__system_property_add
+__system_property_area_init
+__system_property_find
+__system_property_find_nth
+__system_property_foreach
+__system_property_get
+__system_property_read
+__system_property_serial
+__system_property_set
+__system_property_set_filename
+__system_property_update
+__system_property_wait_any
+_thread_created_hook
+time2posix
+tzsetwall
diff --git a/build/tools/unwanted-symbols/arm64/libc.so.variables.txt b/build/tools/unwanted-symbols/arm64/libc.so.variables.txt
new file mode 100644
index 0000000..923d5af
--- /dev/null
+++ b/build/tools/unwanted-symbols/arm64/libc.so.variables.txt
@@ -0,0 +1,9 @@
+__atexit
+__atexit_invalid
+_C_ctype_
+_C_tolower_
+_C_toupper_
+__isthreaded
+__system_property_area__
+_tolower_tab_
+_toupper_tab_
diff --git a/build/tools/unwanted-symbols/arm64/libgcc.a.functions.txt b/build/tools/unwanted-symbols/arm64/libgcc.a.functions.txt
new file mode 100644
index 0000000..92d6e7c
--- /dev/null
+++ b/build/tools/unwanted-symbols/arm64/libgcc.a.functions.txt
@@ -0,0 +1,126 @@
+__aarch64_sync_cache_range
+__absvdi2
+__absvsi2
+__absvti2
+__addtf3
+__addvdi3
+__addvsi3
+__addvti3
+__ashlti3
+__ashrti3
+__bswapdi2
+__bswapsi2
+__clear_cache
+__clrsbdi2
+__clrsbti2
+__clzdi2
+__clzti2
+__cmpti2
+__ctzdi2
+__ctzti2
+__deregister_frame
+__deregister_frame_info
+__deregister_frame_info_bases
+__divdc3
+__divsc3
+__divtc3
+__divtf3
+__divti3
+__emutls_get_address
+__emutls_register_common
+__enable_execute_stack
+__eprintf
+__eqtf2
+__extenddftf2
+__extendsftf2
+__ffsdi2
+__ffsti2
+__fixdfti
+__fixsfti
+__fixtfdi
+__fixtfsi
+__fixtfti
+__fixunsdfdi
+__fixunsdfti
+__fixunssfdi
+__fixunssfti
+__fixunstfdi
+__fixunstfsi
+__fixunstfti
+__floatditf
+__floatsitf
+__floattidf
+__floattisf
+__floattitf
+__floatunditf
+__floatunsitf
+__floatuntidf
+__floatuntisf
+__floatuntitf
+__frame_state_for
+__gcc_bcmp
+__gcc_personality_v0
+__getf2
+__gttf2
+__letf2
+__lshrti3
+__lttf2
+__modti3
+__muldc3
+__mulsc3
+__multc3
+__multf3
+__multi3
+__mulvdi3
+__mulvsi3
+__mulvti3
+__negtf2
+__negti2
+__negvdi2
+__negvsi2
+__negvti2
+__netf2
+__paritydi2
+__parityti2
+__popcountdi2
+__popcountti2
+__powidf2
+__powisf2
+__powitf2
+__register_frame
+__register_frame_info
+__register_frame_info_bases
+__register_frame_info_table
+__register_frame_info_table_bases
+__register_frame_table
+__sfp_handle_exceptions
+__subtf3
+__subvdi3
+__subvsi3
+__subvti3
+__trunctfdf2
+__trunctfsf2
+__ucmpti2
+__udivmodti4
+__udivti3
+__udiv_w_sdiv
+__umodti3
+__unordtf2
+_Unwind_Backtrace
+_Unwind_DeleteException
+_Unwind_FindEnclosingFunction
+_Unwind_Find_FDE
+_Unwind_ForcedUnwind
+_Unwind_GetCFA
+_Unwind_GetDataRelBase
+_Unwind_GetGR
+_Unwind_GetIP
+_Unwind_GetIPInfo
+_Unwind_GetLanguageSpecificData
+_Unwind_GetRegionStart
+_Unwind_GetTextRelBase
+_Unwind_RaiseException
+_Unwind_Resume
+_Unwind_Resume_or_Rethrow
+_Unwind_SetGR
+_Unwind_SetIP
diff --git a/build/tools/unwanted-symbols/mips64/libc.so.functions.txt b/build/tools/unwanted-symbols/mips64/libc.so.functions.txt
new file mode 120000
index 0000000..2c3c27a
--- /dev/null
+++ b/build/tools/unwanted-symbols/mips64/libc.so.functions.txt
@@ -0,0 +1 @@
+../arm64/libc.so.functions.txt
\ No newline at end of file
diff --git a/build/tools/unwanted-symbols/mips64/libc.so.variables.txt b/build/tools/unwanted-symbols/mips64/libc.so.variables.txt
new file mode 120000
index 0000000..2fa7efd
--- /dev/null
+++ b/build/tools/unwanted-symbols/mips64/libc.so.variables.txt
@@ -0,0 +1 @@
+../arm64/libc.so.variables.txt
\ No newline at end of file
diff --git a/build/tools/unwanted-symbols/mips64/libgcc.a.functions.txt b/build/tools/unwanted-symbols/mips64/libgcc.a.functions.txt
new file mode 100644
index 0000000..2455e89
--- /dev/null
+++ b/build/tools/unwanted-symbols/mips64/libgcc.a.functions.txt
@@ -0,0 +1,225 @@
+__absvdi2
+__absvsi2
+__absvti2
+__adddf3
+__addsf3
+__addtf3
+__addvdi3
+__addvsi3
+__addvti3
+__ashlti3
+__ashrti3
+__bswapdi2
+__bswapsi2
+__clear_cache
+__clrsbdi2
+__clrsbti2
+__clzdi2
+__clzti2
+__cmpti2
+__ctzdi2
+__ctzti2
+__deregister_frame
+__deregister_frame_info
+__deregister_frame_info_bases
+__divdc3
+__divdf3
+__divsc3
+__divsf3
+__divtc3
+__divtf3
+__divti3
+__emutls_get_address
+__emutls_register_common
+__enable_execute_stack
+__eprintf
+__eqdf2
+__eqsf2
+__eqtf2
+__extenddftf2
+__extendsfdf2
+__extendsftf2
+__ffsdi2
+__ffsti2
+__fixdfdi
+__fixdfsi
+__fixdfti
+__fixsfdi
+__fixsfsi
+__fixsfti
+__fixtfdi
+__fixtfsi
+__fixtfti
+__fixunsdfdi
+__fixunsdfsi
+__fixunsdfti
+__fixunssfdi
+__fixunssfsi
+__fixunssfti
+__fixunstfdi
+__fixunstfsi
+__fixunstfti
+__floatdidf
+__floatdisf
+__floatditf
+__floatsidf
+__floatsisf
+__floatsitf
+__floattidf
+__floattisf
+__floattitf
+__floatundidf
+__floatundisf
+__floatunditf
+__floatunsidf
+__floatunsisf
+__floatunsitf
+__floatuntidf
+__floatuntisf
+__floatuntitf
+__frame_state_for
+__gcc_bcmp
+__gcc_personality_v0
+__gedf2
+__gesf2
+__getf2
+__gtdf2
+__gtsf2
+__gttf2
+__ledf2
+__lesf2
+__letf2
+__lshrti3
+__ltdf2
+__ltsf2
+__lttf2
+__modti3
+__muldc3
+__muldf3
+__mulsc3
+__mulsf3
+__multc3
+__multf3
+__multi3
+__mulvdi3
+__mulvsi3
+__mulvti3
+__nedf2
+__negdf2
+__negsf2
+__negtf2
+__negti2
+__negvdi2
+__negvsi2
+__negvti2
+__nesf2
+__netf2
+__paritydi2
+__parityti2
+__popcountdi2
+__popcountti2
+__powidf2
+__powisf2
+__powitf2
+__register_frame
+__register_frame_info
+__register_frame_info_bases
+__register_frame_info_table
+__register_frame_info_table_bases
+__register_frame_table
+__subdf3
+__subsf3
+__subtf3
+__subvdi3
+__subvsi3
+__subvti3
+__sync_add_and_fetch_1
+__sync_add_and_fetch_2
+__sync_add_and_fetch_4
+__sync_add_and_fetch_8
+__sync_and_and_fetch_1
+__sync_and_and_fetch_2
+__sync_and_and_fetch_4
+__sync_and_and_fetch_8
+__sync_bool_compare_and_swap_1
+__sync_bool_compare_and_swap_2
+__sync_bool_compare_and_swap_4
+__sync_bool_compare_and_swap_8
+__sync_fetch_and_add_1
+__sync_fetch_and_add_2
+__sync_fetch_and_add_4
+__sync_fetch_and_add_8
+__sync_fetch_and_and_1
+__sync_fetch_and_and_2
+__sync_fetch_and_and_4
+__sync_fetch_and_and_8
+__sync_fetch_and_nand_1
+__sync_fetch_and_nand_2
+__sync_fetch_and_nand_4
+__sync_fetch_and_nand_8
+__sync_fetch_and_or_1
+__sync_fetch_and_or_2
+__sync_fetch_and_or_4
+__sync_fetch_and_or_8
+__sync_fetch_and_sub_1
+__sync_fetch_and_sub_2
+__sync_fetch_and_sub_4
+__sync_fetch_and_sub_8
+__sync_fetch_and_xor_1
+__sync_fetch_and_xor_2
+__sync_fetch_and_xor_4
+__sync_fetch_and_xor_8
+__sync_lock_test_and_set_1
+__sync_lock_test_and_set_2
+__sync_lock_test_and_set_4
+__sync_lock_test_and_set_8
+__sync_nand_and_fetch_1
+__sync_nand_and_fetch_2
+__sync_nand_and_fetch_4
+__sync_nand_and_fetch_8
+__sync_or_and_fetch_1
+__sync_or_and_fetch_2
+__sync_or_and_fetch_4
+__sync_or_and_fetch_8
+__sync_sub_and_fetch_1
+__sync_sub_and_fetch_2
+__sync_sub_and_fetch_4
+__sync_sub_and_fetch_8
+__sync_synchronize
+__sync_val_compare_and_swap_1
+__sync_val_compare_and_swap_2
+__sync_val_compare_and_swap_4
+__sync_val_compare_and_swap_8
+__sync_xor_and_fetch_1
+__sync_xor_and_fetch_2
+__sync_xor_and_fetch_4
+__sync_xor_and_fetch_8
+__truncdfsf2
+__trunctfdf2
+__trunctfsf2
+__ucmpti2
+__udivmodti4
+__udivti3
+__udiv_w_sdiv
+__umodti3
+__unorddf2
+__unordsf2
+__unordtf2
+_Unwind_Backtrace
+_Unwind_DeleteException
+_Unwind_FindEnclosingFunction
+_Unwind_Find_FDE
+_Unwind_ForcedUnwind
+_Unwind_GetCFA
+_Unwind_GetDataRelBase
+_Unwind_GetGR
+_Unwind_GetIP
+_Unwind_GetIPInfo
+_Unwind_GetLanguageSpecificData
+_Unwind_GetRegionStart
+_Unwind_GetTextRelBase
+_Unwind_RaiseException
+_Unwind_Resume
+_Unwind_Resume_or_Rethrow
+_Unwind_SetGR
+_Unwind_SetIP
diff --git a/build/tools/unwanted-symbols/x86_64/libc.so.functions.txt b/build/tools/unwanted-symbols/x86_64/libc.so.functions.txt
new file mode 120000
index 0000000..2c3c27a
--- /dev/null
+++ b/build/tools/unwanted-symbols/x86_64/libc.so.functions.txt
@@ -0,0 +1 @@
+../arm64/libc.so.functions.txt
\ No newline at end of file
diff --git a/build/tools/unwanted-symbols/x86_64/libc.so.variables.txt b/build/tools/unwanted-symbols/x86_64/libc.so.variables.txt
new file mode 120000
index 0000000..2fa7efd
--- /dev/null
+++ b/build/tools/unwanted-symbols/x86_64/libc.so.variables.txt
@@ -0,0 +1 @@
+../arm64/libc.so.variables.txt
\ No newline at end of file
diff --git a/build/tools/unwanted-symbols/x86_64/libgcc.a.functions.txt b/build/tools/unwanted-symbols/x86_64/libgcc.a.functions.txt
new file mode 100644
index 0000000..623ee05
--- /dev/null
+++ b/build/tools/unwanted-symbols/x86_64/libgcc.a.functions.txt
@@ -0,0 +1,503 @@
+__absvdi2
+__absvsi2
+__absvti2
+__addtf3
+__addvdi3
+__addvsi3
+__addvti3
+__ashlti3
+__ashrti3
+__bid128_abs
+__bid128_add
+__bid128_class
+__bid128_copy
+__bid128_copySign
+__bid128dd_add
+__bid128ddd_fma
+__bid128dd_div
+__bid128dd_mul
+__bid128ddq_fma
+__bid128dd_sub
+__bid128_div
+__bid128dq_add
+__bid128dqd_fma
+__bid128dq_div
+__bid128dq_mul
+__bid128dqq_fma
+__bid128dq_sub
+__bid128_fma
+__bid128_from_int32
+__bid128_from_int64
+__bid128_from_uint32
+__bid128_from_uint64
+__bid128_isCanonical
+__bid128_isFinite
+__bid128_isInf
+__bid128_isNaN
+__bid128_isNormal
+__bid128_isSignaling
+__bid128_isSigned
+__bid128_isSubnormal
+__bid128_isZero
+__bid128_mul
+__bid128_negate
+__bid128qd_add
+__bid128qdd_fma
+__bid128qd_div
+__bid128qd_mul
+__bid128qdq_fma
+__bid128qd_sub
+__bid128qqd_fma
+__bid128_quiet_equal
+__bid128_quiet_greater
+__bid128_quiet_greater_equal
+__bid128_quiet_greater_unordered
+__bid128_quiet_less
+__bid128_quiet_less_equal
+__bid128_quiet_less_unordered
+__bid128_quiet_not_equal
+__bid128_quiet_not_greater
+__bid128_quiet_not_less
+__bid128_quiet_ordered
+__bid128_quiet_unordered
+__bid128_radix
+__bid128_sameQuantum
+__bid128_signaling_greater
+__bid128_signaling_greater_equal
+__bid128_signaling_greater_unordered
+__bid128_signaling_less
+__bid128_signaling_less_equal
+__bid128_signaling_less_unordered
+__bid128_signaling_not_greater
+__bid128_signaling_not_less
+__bid128_sub
+__bid128_to_bid32
+__bid128_to_bid64
+__bid128_to_binary128
+__bid128_to_binary32
+__bid128_to_binary64
+__bid128_to_binary80
+__bid128_to_int32_ceil
+__bid128_to_int32_floor
+__bid128_to_int32_int
+__bid128_to_int32_rnint
+__bid128_to_int32_rninta
+__bid128_to_int32_xceil
+__bid128_to_int32_xfloor
+__bid128_to_int32_xint
+__bid128_to_int32_xrnint
+__bid128_to_int32_xrninta
+__bid128_to_int64_ceil
+__bid128_to_int64_floor
+__bid128_to_int64_int
+__bid128_to_int64_rnint
+__bid128_to_int64_rninta
+__bid128_to_int64_xceil
+__bid128_to_int64_xfloor
+__bid128_to_int64_xint
+__bid128_to_int64_xrnint
+__bid128_to_int64_xrninta
+__bid128_totalOrder
+__bid128_totalOrderMag
+__bid128_to_uint32_ceil
+__bid128_to_uint32_floor
+__bid128_to_uint32_int
+__bid128_to_uint32_rnint
+__bid128_to_uint32_rninta
+__bid128_to_uint32_xceil
+__bid128_to_uint32_xfloor
+__bid128_to_uint32_xint
+__bid128_to_uint32_xrnint
+__bid128_to_uint32_xrninta
+__bid128_to_uint64_ceil
+__bid128_to_uint64_floor
+__bid128_to_uint64_int
+__bid128_to_uint64_rnint
+__bid128_to_uint64_rninta
+__bid128_to_uint64_xceil
+__bid128_to_uint64_xfloor
+__bid128_to_uint64_xint
+__bid128_to_uint64_xrnint
+__bid128_to_uint64_xrninta
+__bid32_to_bid128
+__bid32_to_bid64
+__bid32_to_binary128
+__bid32_to_binary32
+__bid32_to_binary64
+__bid32_to_binary80
+__bid64_abs
+__bid64_add
+__bid64_class
+__bid64_copy
+__bid64_copySign
+__bid64ddq_fma
+__bid64_div
+__bid64dq_add
+__bid64dqd_fma
+__bid64dq_div
+__bid64dq_mul
+__bid64dqq_fma
+__bid64dq_sub
+__bid64_from_int32
+__bid64_from_int64
+__bid64_from_uint32
+__bid64_from_uint64
+__bid64_isCanonical
+__bid64_isFinite
+__bid64_isInf
+__bid64_isNaN
+__bid64_isNormal
+__bid64_isSignaling
+__bid64_isSigned
+__bid64_isSubnormal
+__bid64_isZero
+__bid64_mul
+__bid64_negate
+__bid64qd_add
+__bid64qdd_fma
+__bid64qd_div
+__bid64qd_mul
+__bid64qdq_fma
+__bid64qd_sub
+__bid64qq_add
+__bid64qqd_fma
+__bid64qq_div
+__bid64qq_mul
+__bid64qqq_fma
+__bid64qq_sub
+__bid64_quiet_equal
+__bid64_quiet_greater
+__bid64_quiet_greater_equal
+__bid64_quiet_greater_unordered
+__bid64_quiet_less
+__bid64_quiet_less_equal
+__bid64_quiet_less_unordered
+__bid64_quiet_not_equal
+__bid64_quiet_not_greater
+__bid64_quiet_not_less
+__bid64_quiet_ordered
+__bid64_quiet_unordered
+__bid64_radix
+__bid64_sameQuantum
+__bid64_signaling_greater
+__bid64_signaling_greater_equal
+__bid64_signaling_greater_unordered
+__bid64_signaling_less
+__bid64_signaling_less_equal
+__bid64_signaling_less_unordered
+__bid64_signaling_not_greater
+__bid64_signaling_not_less
+__bid64_sub
+__bid64_to_bid128
+__bid64_to_bid32
+__bid64_to_binary128
+__bid64_to_binary32
+__bid64_to_binary64
+__bid64_to_binary80
+__bid64_to_int32_ceil
+__bid64_to_int32_floor
+__bid64_to_int32_int
+__bid64_to_int32_rnint
+__bid64_to_int32_rninta
+__bid64_to_int32_xceil
+__bid64_to_int32_xfloor
+__bid64_to_int32_xint
+__bid64_to_int32_xrnint
+__bid64_to_int32_xrninta
+__bid64_to_int64_ceil
+__bid64_to_int64_floor
+__bid64_to_int64_int
+__bid64_to_int64_rnint
+__bid64_to_int64_rninta
+__bid64_to_int64_xceil
+__bid64_to_int64_xfloor
+__bid64_to_int64_xint
+__bid64_to_int64_xrnint
+__bid64_to_int64_xrninta
+__bid64_totalOrder
+__bid64_totalOrderMag
+__bid64_to_uint32_ceil
+__bid64_to_uint32_floor
+__bid64_to_uint32_int
+__bid64_to_uint32_rnint
+__bid64_to_uint32_rninta
+__bid64_to_uint32_xceil
+__bid64_to_uint32_xfloor
+__bid64_to_uint32_xint
+__bid64_to_uint32_xrnint
+__bid64_to_uint32_xrninta
+__bid64_to_uint64_ceil
+__bid64_to_uint64_floor
+__bid64_to_uint64_int
+__bid64_to_uint64_rnint
+__bid64_to_uint64_rninta
+__bid64_to_uint64_xceil
+__bid64_to_uint64_xfloor
+__bid64_to_uint64_xint
+__bid64_to_uint64_xrnint
+__bid64_to_uint64_xrninta
+__bid_adddd3
+__bid_addsd3
+__bid_addtd3
+__bid_divdd3
+__bid_divsd3
+__bid_divtd3
+__bid_eqdd2
+__bid_eqsd2
+__bid_eqtd2
+__bid_extendddtd2
+__bid_extendddtf
+__bid_extendddxf
+__bid_extenddfdd
+__bid_extenddftd
+__bid_extendsddd2
+__bid_extendsddf
+__bid_extendsdtd2
+__bid_extendsdtf
+__bid_extendsdxf
+__bid_extendsfdd
+__bid_extendsfsd
+__bid_extendsftd
+__bid_extendtftd
+__bid_extendxftd
+__bid_fixdddi
+__bid_fixddsi
+__bid_fixsddi
+__bid_fixsdsi
+__bid_fixtddi
+__bid_fixtdsi
+__bid_fixunsdddi
+__bid_fixunsddsi
+__bid_fixunssddi
+__bid_fixunssdsi
+__bid_fixunstddi
+__bid_fixunstdsi
+__bid_floatdidd
+__bid_floatdisd
+__bid_floatditd
+__bid_floatsidd
+__bid_floatsisd
+__bid_floatsitd
+__bid_floatunsdidd
+__bid_floatunsdisd
+__bid_floatunsditd
+__bid_floatunssidd
+__bid_floatunssisd
+__bid_floatunssitd
+__bid_gedd2
+__bid_gesd2
+__bid_getd2
+__bid_gtdd2
+__bid_gtsd2
+__bid_gttd2
+__bid_ledd2
+__bid_lesd2
+__bid_letd2
+__bid_ltdd2
+__bid_ltsd2
+__bid_lttd2
+__bid_muldd3
+__bid_mulsd3
+__bid_multd3
+__bid_nedd2
+__bid_nesd2
+__bid_netd2
+__bid_round128_19_38
+__bid_round192_39_57
+__bid_round256_58_76
+__bid_round64_2_18
+__bid_subdd3
+__bid_subsd3
+__bid_subtd3
+__bid_truncdddf
+__bid_truncddsd2
+__bid_truncddsf
+__bid_truncdfsd
+__bid_truncsdsf
+__bid_trunctddd2
+__bid_trunctddf
+__bid_trunctdsd2
+__bid_trunctdsf
+__bid_trunctdtf
+__bid_trunctdxf
+__bid_trunctfdd
+__bid_trunctfsd
+__bid_truncxfdd
+__bid_truncxfsd
+__bid_unorddd2
+__bid_unordsd2
+__bid_unordtd2
+__binary128_to_bid128
+__binary128_to_bid32
+__binary128_to_bid64
+__binary32_to_bid128
+__binary32_to_bid32
+__binary32_to_bid64
+__binary64_to_bid128
+__binary64_to_bid32
+__binary64_to_bid64
+__binary80_to_bid128
+__binary80_to_bid32
+__binary80_to_bid64
+__bswapdi2
+__bswapsi2
+__clear_cache
+__clrsbdi2
+__clrsbti2
+__clzdi2
+__clzti2
+__cmpti2
+__cpu_indicator_init
+__ctzdi2
+__ctzti2
+__deregister_frame
+__deregister_frame_info
+__deregister_frame_info_bases
+__dfp_clear_except
+__dfp_get_round
+__dfp_raise_except
+__dfp_set_round
+__dfp_test_except
+__divdc3
+__divsc3
+__divtc3
+__divtf3
+__divti3
+__divxc3
+__emutls_get_address
+__emutls_register_common
+__enable_execute_stack
+__eprintf
+__eqtf2
+__extenddftf2
+__extendsftf2
+__extendxftf2
+__ffsdi2
+__ffsti2
+__fixdfti
+__fixsfti
+__fixtfdi
+__fixtfsi
+__fixtfti
+__fixunsdfdi
+__fixunsdfti
+__fixunssfdi
+__fixunssfti
+__fixunstfdi
+__fixunstfsi
+__fixunstfti
+__fixunsxfdi
+__fixunsxfti
+__fixxfti
+__floatditf
+__floatsitf
+__floattidf
+__floattisf
+__floattitf
+__floattixf
+__floatunditf
+__floatunsitf
+__floatuntidf
+__floatuntisf
+__floatuntitf
+__floatuntixf
+__frame_state_for
+__gcc_bcmp
+__gcc_personality_v0
+__generic_findstack
+__generic_morestack
+__generic_morestack_set_initial_sp
+__generic_releasestack
+__getf2
+__gttf2
+isinfd128
+isinfd32
+isinfd64
+__letf2
+__lshrti3
+__lttf2
+__modti3
+__morestack
+__morestack_allocate_stack_space
+__morestack_block_signals
+__morestack_fail
+__morestack_get_guard
+__morestack_large_model
+__morestack_load_mmap
+__morestack_make_guard
+__morestack_non_split
+__morestack_release_segments
+__morestack_set_guard
+__morestack_unblock_signals
+__muldc3
+__mulsc3
+__multc3
+__multf3
+__multi3
+__mulvdi3
+__mulvsi3
+__mulvti3
+__mulxc3
+__negtf2
+__negti2
+__negvdi2
+__negvsi2
+__negvti2
+__netf2
+__paritydi2
+__parityti2
+__popcountdi2
+__popcountti2
+__powidf2
+__powisf2
+__powitf2
+__powixf2
+__register_frame
+__register_frame_info
+__register_frame_info_bases
+__register_frame_info_table
+__register_frame_info_table_bases
+__register_frame_table
+__sfp_handle_exceptions
+__splitstack_block_signals
+__splitstack_block_signals_context
+__splitstack_find
+__splitstack_find_context
+__splitstack_getcontext
+__splitstack_makecontext
+__splitstack_releasecontext
+__splitstack_resetcontext
+__splitstack_setcontext
+__stack_split_initialize
+__subtf3
+__subvdi3
+__subvsi3
+__subvti3
+__trunctfdf2
+__trunctfsf2
+__trunctfxf2
+__ucmpti2
+__udivmodti4
+__udivti3
+__udiv_w_sdiv
+__umodti3
+__unordtf2
+_Unwind_Backtrace
+_Unwind_DeleteException
+_Unwind_FindEnclosingFunction
+_Unwind_Find_FDE
+_Unwind_ForcedUnwind
+_Unwind_GetCFA
+_Unwind_GetDataRelBase
+_Unwind_GetGR
+_Unwind_GetIP
+_Unwind_GetIPInfo
+_Unwind_GetLanguageSpecificData
+_Unwind_GetRegionStart
+_Unwind_GetTextRelBase
+_Unwind_RaiseException
+_Unwind_Resume
+_Unwind_Resume_or_Rethrow
+_Unwind_SetGR
+_Unwind_SetIP
+__wrap_pthread_create
diff --git a/docs/text/ANDROID-MK.text b/docs/text/ANDROID-MK.text
index ffe8247..cb2168f 100644
--- a/docs/text/ANDROID-MK.text
+++ b/docs/text/ANDROID-MK.text
@@ -252,6 +252,9 @@
        x86
             For i686
 
+       x86_64
+            For x86-64
+
        mips
             For mips32 (r1)
 
diff --git a/docs/text/APPLICATION-MK.text b/docs/text/APPLICATION-MK.text
index 61c144f..367e95e 100644
--- a/docs/text/APPLICATION-MK.text
+++ b/docs/text/APPLICATION-MK.text
@@ -171,13 +171,17 @@
 
               APP_ABI := x86
 
+>    Or to support the Intel64 instruction set, use:
+
+              APP_ABI := x86-64
+
 >    Or to support the MIPS instruction set, use:
 
               APP_ABI := mips
 
 >    Or to support all at the same time, use:
 
-              APP_ABI := armeabi armeabi-v7a x86 mips
+              APP_ABI := armeabi armeabi-v7a x86 mips x86-64
 
 >    Or even better, since NDK r7, you can also use the special value
 >    '`all`' which means "all ABIs supported by this NDK release":
diff --git a/docs/text/CPU-ARCH-ABIS.text b/docs/text/CPU-ARCH-ABIS.text
index 3b7d9a0..353e376 100644
--- a/docs/text/CPU-ARCH-ABIS.text
+++ b/docs/text/CPU-ARCH-ABIS.text
@@ -136,11 +136,12 @@
   - instructions normally generated by GCC with the following compiler
     flags:
 
-          -march=i686 -mtune=atom -mstackrealign -msse3 -mfpmath=sse -m32
+          -march=i686 -mtune=intel -mstackrealign -mssse3 -mfpmath=sse -m32
 
     which targets Pentium Pro instruction set, according to the GCC
-    documentation, plus the MMX, SSE, SSE2 and SSE3 instruction set
-    extensions. Generated code is optimized for Atom CPU.
+    documentation, plus the MMX, SSE, SSE2, SSE3, SSSE3 instruction set
+    extensions. Generated code is a balanced optimization across top Intel
+    32-bit CPUs.
 
     IMPORTANT NOTE: Flags above are not optimization guide. Compiler
     optimization options which are used by default and/or recommended for
@@ -157,7 +158,6 @@
   extension, including, but not limited to:
 
   - the MOVBE instruction
-  - the SSSE3 "supplemental SSE3" extension
   - any variant of "SSE4"
 
   You can still use these, as long as you use runtime feature probing to
@@ -215,6 +215,58 @@
   Note: that MIPS16 support is not provided, nor is micromips.
 
 
+I.5. 'x86-64'
+----------
+
+  This is the name of an ABI for CPUs supporting the instruction set
+  commonly named 'x86-64'. More specifically, this ABI corresponds
+  to the following:
+
+  - instructions normally generated by GCC with the following compiler
+    flags:
+
+          -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel
+
+    which targets x86-64 instruction set, according to the GCC
+    documentation, plus the MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,
+    SSE4.2 and POPCNT instruction set extensions. Generated code is a balanced
+    optimization across top Intel 64-bit CPUs.
+
+    IMPORTANT NOTE: Flags above are not optimization guide. Compiler
+    optimization options which are used by default and/or recommended for
+    performance boost on x86-64 are not included. For performance
+    optimization hints on x86-64 GCC please refer to the following
+    article:
+
+> http://software.intel.com/blogs/2012/09/26/gcc-x86-performance-hints
+
+  The ABI does *not* include any other optional x86-64 instruction set
+  extension, including, but not limited to:
+
+  - the MOVBE instruction
+  - the SHA instruction
+  - the AVX extension
+  - the AVX2 extension
+
+  You can still use these, as long as you use runtime feature probing to
+  enable them, and provide fallbacks for devices that do not support them.
+
+  Please refer to the following documents for more details:
+
+  * http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
+
+  * Calling conventions for different C++ compilers and operating systems:
+>    http://www.agner.org/optimize/calling_conventions.pdf
+
+  * Intel64 and IA-32 Intel Architecture Software Developer's Manual
+    volume 2: Instruction Set Reference
+
+  * Intel64 and IA-32 Intel Architecture Software Developer's Manual
+    volume 3: System Programming
+
+  * Amendment to System V Application Binary Interface
+    AMD64 Processor Architecture Supplement
+
 - - - -
 II. Generating code for a specific ABI:
 =======================================
@@ -288,6 +340,7 @@
         lib/armeabi/libfoo.so
         lib/armeabi-v7a/libfoo.so
         lib/x86/libfoo.so
+        lib/x86-64/libfoo.so
         lib/mips/libfoo.so
 
 IMPORTANT NOTE: ARMv7-based Android device running 4.0.3 or before installs native
diff --git a/docs/text/CPU-ARM-NEON.text b/docs/text/CPU-ARM-NEON.text
index 14e4f31..9a0c895 100644
--- a/docs/text/CPU-ARM-NEON.text
+++ b/docs/text/CPU-ARM-NEON.text
@@ -69,18 +69,19 @@
 Build Requirements:
 ------------------
 
-Neon support only works when targeting the 'armeabi-v7a' ABI, otherwise the
-NDK build scripts will complain and abort. It is important to use checks like
-the following in your Android.mk:
+Neon support only works when targeting the 'armeabi-v7a' or 'x86' ABI, otherwise
+the NDK build scripts will complain and abort. Neon is partially supported on
+x86 via translation header (To learn more about it, see docs/CPU-X86.html).
+It is important to use checks like the following in your Android.mk:
 
         # define a static library containing our NEON code
-        ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
+        ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi-v7a x86))
             include $(CLEAR_VARS)
             LOCAL_MODULE    := mylib-neon
             LOCAL_SRC_FILES := mylib-neon.c
             LOCAL_ARM_NEON  := true
             include $(BUILD_STATIC_LIBRARY)
-        endif # TARGET_ARCH_ABI == armeabi-v7a
+        endif # TARGET_ARCH_ABI == armeabi-v7a || x86
 
 
 Runtime Detection:
diff --git a/docs/text/CPU-X86-64.text b/docs/text/CPU-X86-64.text
new file mode 100644
index 0000000..d405226
--- /dev/null
+++ b/docs/text/CPU-X86-64.text
@@ -0,0 +1,66 @@
+Android NDK x86-64 instruction set support
+===
+
+Introduction:
+-------------
+
+Android NDK r[TBD] added support for the '`x86-64`' ABI, that allows native code to
+run on Android-based devices running on CPUs supporting the x86-64 instruction
+set.
+
+The Android x86-64 ABI itself is fully specified in docs/CPU-ARCH-ABIS.html.
+
+Overview:
+---------
+
+Generating machine code is simple: just add 'x86-64' to your APP_ABI
+definition in your Application.mk file, for example:
+
+        APP_ABI := armeabi armeabi-v7a x86 x86-64
+
+Alternatively, you can use:
+
+        APP_ABI := all
+
+will generate machine code for all supported ABIs with this NDK. Doing so
+will ensure that your application package contains libraries for all target
+ABIs. Note that this has an impact on package size, since each ABI will
+correspond to its own set of native libraries built from the same sources.
+
+The default ABI is still '`armeabi`', if unspecified in your project.
+
+As you would expect, generated libraries will go into `$PROJECT/libs/x86-64/`,
+and will be embedded into your .apk under `/lib/x86-64/`.
+
+And just like other ABIs, the Android package manager will extract these
+libraries on a *compatible* x86-64 based device automatically at install
+time, to put them under <dataPath>/lib, where <dataPath> is the
+application's private data directory.
+
+Similarly, the Google Play server is capable of filtering applications
+based on the native libraries they embed and your device's target CPU.
+
+Debugging with ndk-gdb should work exactly as described under docs/NDK-GDB.html.
+
+Standalone-toolchain:
+---------------------
+
+It is possible to use the x86-64 toolchain with NDK in stand-alone mode.
+See docs/STANDALONE-TOOLCHAIN.html for more details. Briefly speaking,
+it is now possible to run:
+
+      $NDK/build/tools/make-standalone-toolchain.sh --arch=x86_64 --install-dir=<path>
+
+The toolchain binaries have the `x86_64-linux-android- prefix`.
+
+
+Compatibility:
+--------------
+
+The minimal native API level provided by official Android x86-64 platform
+builds is [TBD], which corresponds to all the native APIs provided by
+Android [TBD], i.e. [TBD]-desert.
+
+You won't have to change anything to your project files if you target an older
+API level: the NDK build script will automatically select the right set of
+native platform headers/libraries for you.
diff --git a/docs/text/CPU-X86.text b/docs/text/CPU-X86.text
index 4926d2a..d432a37 100644
--- a/docs/text/CPU-X86.text
+++ b/docs/text/CPU-X86.text
@@ -42,6 +42,68 @@
 
 Debugging with ndk-gdb should work exactly as described under docs/NDK-GDB.html.
 
+ARM NEON intrinsics support:
+----------------------------
+
+The solution is shaped as C/C++ language header with the same name as standard
+arm neon intrinsics header "arm_neon.h" which is also available in all NDK x86
+toolchains. It translates neon intrinsics to native x86 SSE ones.
+
+By default SSE up to SSE3 is used for porting ARM NEON to Intel SSE.
+
+Current solution covers by default ~41% NEON functions (889 of total 1884) and
+47% when -mssse3 is enabled. It is highly recommended to use the -mssse3 compiler
+flag for more coverage and performance.
+
+If currently provided coverage is not enough to port application please look
+into next version preview (up to 98% NEON instrinsics covered) at
+
+> http://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks
+
+The solution
+
+  - Redefines ARM NEON 128 bit vectors as the corresponding x86 SIMD data.
+
+  - Redefines some functions from ARM NEON to Intel SSE if 1:1 correspondence
+    exists.
+
+  - Implements some ARM NEON functions using Intel SIMD if the performance
+    effective implementation is possible.
+
+  - Implements some of the remaining NEON functions using the serial solution
+    and issuing the corresponding "low performance" compiler warning.
+
+### Performance:
+
+For the major number of cases it is expected to obtain the similar to ARM NEON
+native perfomance gain for vectorized vs. serial code.
+
+### Porting considerations and best known methods are:
+
+  - Use 16-byte data alignment for faster load and store
+
+  - Avoid NEON functions working with constants. It produces performance
+    penalty for constants load\propagation.
+    If constants usage is necessary try to move constants initialization out of
+    hotspot loops and if applicable replace it with logical and compare
+    operations.
+
+  - Try to avoid functions marked as "serialy implemented" because they need to
+    store data from registers to memory, process them serialy and load them again.
+    Probably you could change the data type or algorithm used to make the whole
+    port vectorized not a serial one.
+
+To learn more about it, see
+
+> http://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks
+
+### Sample code:
+
+In your project add 'x86' to APP_ABI definition and make sure "arm_neon.h"
+header is included.
+Your code will be ported to x86 without any other changes necessary.
+
+
 Standalone-toolchain:
 ---------------------
 
diff --git a/docs/text/STANDALONE-TOOLCHAIN.text b/docs/text/STANDALONE-TOOLCHAIN.text
index f27fcef..b2b2a2e 100644
--- a/docs/text/STANDALONE-TOOLCHAIN.text
+++ b/docs/text/STANDALONE-TOOLCHAIN.text
@@ -234,12 +234,23 @@
 link with Android native APIs which follow softfp ABI.  Please see
 tests/device/hard-float/jni/Android.mk for details.
 
+If you want to use Neon intrinsics on x86 they can be translated to the native
+x86 SSE ones using special C/C++ language header with the same name as
+standard arm neon intrinsics header "arm_neon.h".
+By default x86 ABI supports SIMD up to SSE3 and the header covers ~83% NEON
+functions (1551 of total 1872). It is recommended to use the -mssse3 compiler
+flag which extends SIMD up to SSSE3 and in this case the header will cover
+~98% NEON functions (1827 of total 1872):
+
+        CFLAGS='-mssse3'
+
+To learn more about it, see docs/CPU-X86.html
+
 If none of the above makes sense to you, it's probably better not to use
 the standalone toolchain, and stick to the NDK build system instead, which
 will handle all the details for you.
 
-You don't have to use any specific compiler flag when targeting the x86 ABI
-or the MIPS ABI.
+You don't have to use any specific compiler flag when targeting the MIPS ABI.
 
 7/ Warnings and Limitations:
 --------------------------
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_relocations.cpp b/sources/android/crazy_linker/src/crazy_linker_elf_relocations.cpp
index bcd2bea..79e58bf 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_relocations.cpp
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_relocations.cpp
@@ -33,6 +33,7 @@
 // Processor-specific relocation types supported by the linker.
 #ifdef __arm__
 
+/* arm32 relocations */
 #define R_ARM_ABS32 2
 #define R_ARM_REL32 3
 #define R_ARM_GLOB_DAT 21
@@ -42,6 +43,17 @@
 
 #endif  // __arm__
 
+#ifdef __aarch64__
+
+/* arm64 relocations */
+#define R_AARCH64_ABS64 257
+#define R_AARCH64_COPY 1024
+#define R_AARCH64_GLOB_DAT 1025
+#define R_AARCH64_JUMP_SLOT 1026
+#define R_AARCH64_RELATIVE 1027
+
+#endif  // __aarch64__
+
 #ifdef __i386__
 
 /* i386 relocations */
@@ -67,7 +79,7 @@
 };
 
 // Convert an ELF relocation type info a RelocationType value.
-RelocationType GetRelocationType(unsigned r_type) {
+RelocationType GetRelocationType(ELF::Word r_type) {
   switch (r_type) {
 #ifdef __arm__
     case R_ARM_JUMP_SLOT:
@@ -83,6 +95,19 @@
       return RELOCATION_TYPE_COPY;
 #endif
 
+#ifdef __aarch64__
+    case R_AARCH64_JUMP_SLOT:
+    case R_AARCH64_GLOB_DAT:
+    case R_AARCH64_ABS64:
+      return RELOCATION_TYPE_ABSOLUTE;
+
+    case R_AARCH64_RELATIVE:
+      return RELOCATION_TYPE_RELATIVE;
+
+    case R_AARCH64_COPY:
+      return RELOCATION_TYPE_COPY;
+#endif
+
 #ifdef __i386__
     case R_386_JMP_SLOT:
     case R_386_GLOB_DAT:
@@ -114,49 +139,71 @@
   phdr_count_ = view->phdr_count();
   load_bias_ = view->load_bias();
 
+  // We handle only Rel or Rela, but not both. If DT_RELA or DT_RELASZ
+  // then we require DT_PLTREL to agree.
+  bool has_rela_relocations = false;
+  bool has_rel_relocations = false;
+
   // Parse the dynamic table.
   ElfView::DynamicIterator dyn(view);
   for (; dyn.HasNext(); dyn.GetNext()) {
     ELF::Addr dyn_value = dyn.GetValue();
     uintptr_t dyn_addr = dyn.GetAddress(view->load_bias());
 
-    switch (dyn.GetTag()) {
+    const ELF::Addr tag = dyn.GetTag();
+    switch (tag) {
       case DT_PLTREL:
-        // NOTE: Yes, there is nothing to record here, the content of
-        // plt_rel_ will come from DT_JMPREL instead.
-        RLOG("  DT_PLTREL\n");
-        if (dyn_value != DT_REL) {
-          *error = "Unsupported DT_RELA entry in dynamic section";
+        RLOG("  DT_PLTREL value=%d\n", dyn_value);
+        if (dyn_value != DT_REL && dyn_value != DT_RELA) {
+          *error = "Invalid DT_PLTREL value in dynamic section";
           return false;
         }
+        relocations_type_ = dyn_value;
         break;
       case DT_JMPREL:
         RLOG("  DT_JMPREL addr=%p\n", dyn_addr);
-        plt_relocations_ = reinterpret_cast<ELF::Rel*>(dyn_addr);
+        plt_relocations_ = dyn_addr;
         break;
       case DT_PLTRELSZ:
-        plt_relocations_count_ = dyn_value / sizeof(ELF::Rel);
-        RLOG("  DT_PLTRELSZ size=%d count=%d\n",
-             dyn_value,
-             plt_relocations_count_);
+        plt_relocations_size_ = dyn_value;
+        RLOG("  DT_PLTRELSZ size=%d\n", dyn_value);
         break;
+      case DT_RELA:
       case DT_REL:
-        RLOG("  DT_REL addr=%p\n", dyn_addr);
-        relocations_ = reinterpret_cast<ELF::Rel*>(dyn_addr);
+        RLOG("  %s addr=%p\n",
+             (tag == DT_RELA) ? "DT_RELA" : "DT_REL",
+             dyn_addr);
+        if (relocations_) {
+          *error = "Unsupported DT_RELA/DT_REL combination in dynamic section";
+          return false;
+        }
+        relocations_ = dyn_addr;
+        if (tag == DT_RELA)
+          has_rela_relocations = true;
+        else
+          has_rel_relocations = true;
         break;
+      case DT_RELASZ:
       case DT_RELSZ:
-        relocations_count_ = dyn_value / sizeof(ELF::Rel);
-        RLOG("  DT_RELSZ size=%d count=%d\n", dyn_value, relocations_count_);
+        RLOG("  %s size=%d\n",
+             (tag == DT_RELASZ) ? "DT_RELASZ" : "DT_RELSZ",
+             dyn_addr);
+        if (relocations_size_) {
+          *error = "Unsupported DT_RELASZ/DT_RELSZ combination in dyn section";
+          return false;
+        }
+        relocations_size_ = dyn_value;
+        if (tag == DT_RELASZ)
+          has_rela_relocations = true;
+        else
+          has_rel_relocations = true;
         break;
       case DT_PLTGOT:
         // Only used on MIPS currently. Could also be used on other platforms
         // when lazy binding (i.e. RTLD_LAZY) is implemented.
         RLOG("  DT_PLTGOT addr=%p\n", dyn_addr);
-        plt_got_ = reinterpret_cast<uintptr_t*>(dyn_addr);
+        plt_got_ = reinterpret_cast<ELF::Addr*>(dyn_addr);
         break;
-      case DT_RELA:
-        *error = "Unsupported DT_RELA entry in dynamic section";
-        return false;
       case DT_TEXTREL:
         RLOG("  DT_TEXTREL\n");
         has_text_relocations_ = true;
@@ -195,6 +242,20 @@
     }
   }
 
+  if (relocations_type_ != DT_REL && relocations_type_ != DT_RELA) {
+    *error = "Unsupported or missing DT_PLTREL in dynamic section";
+    return false;
+  }
+
+  if (relocations_type_ == DT_REL && has_rela_relocations) {
+    *error = "Found DT_RELA in dyn section, but DT_PLTREL is DT_REL";
+    return false;
+  }
+  if (relocations_type_ == DT_RELA && has_rel_relocations) {
+    *error = "Found DT_REL in dyn section, but DT_PLTREL is DT_RELA";
+    return false;
+  }
+
   return true;
 }
 
@@ -210,14 +271,34 @@
     }
   }
 
-  if (!ApplyRelocs(plt_relocations_,
-                   plt_relocations_count_,
-                   symbols,
-                   resolver,
-                   error) ||
-      !ApplyRelocs(
-           relocations_, relocations_count_, symbols, resolver, error)) {
-    return false;
+  if (relocations_type_ == DT_REL) {
+    if (!ApplyRelRelocs(reinterpret_cast<ELF::Rel*>(plt_relocations_),
+                        plt_relocations_size_ / sizeof(ELF::Rel),
+                        symbols,
+                        resolver,
+                        error))
+      return false;
+    if (!ApplyRelRelocs(reinterpret_cast<ELF::Rel*>(relocations_),
+                        relocations_size_ / sizeof(ELF::Rel),
+                        symbols,
+                        resolver,
+                        error))
+      return false;
+  }
+
+  else if (relocations_type_ == DT_RELA) {
+    if (!ApplyRelaRelocs(reinterpret_cast<ELF::Rela*>(plt_relocations_),
+                         plt_relocations_size_ / sizeof(ELF::Rela),
+                         symbols,
+                         resolver,
+                         error))
+      return false;
+    if (!ApplyRelaRelocs(reinterpret_cast<ELF::Rela*>(relocations_),
+                         relocations_size_ / sizeof(ELF::Rela),
+                         symbols,
+                         resolver,
+                         error))
+      return false;
   }
 
 #ifdef __mips__
@@ -236,19 +317,249 @@
   return true;
 }
 
-bool ElfRelocations::ApplyRelocs(const ELF::Rel* rel,
-                                 size_t rel_count,
-                                 const ElfSymbols* symbols,
-                                 SymbolResolver* resolver,
-                                 Error* error) {
+bool ElfRelocations::ApplyRelaReloc(const ELF::Rela* rela,
+                                    ELF::Addr sym_addr,
+                                    bool resolved CRAZY_UNUSED,
+                                    Error* error) {
+  const ELF::Word rela_type = ELF_R_TYPE(rela->r_info);
+  const ELF::Word CRAZY_UNUSED rela_symbol = ELF_R_SYM(rela->r_info);
+  const ELF::Sword CRAZY_UNUSED addend = rela->r_addend;
+
+  const ELF::Addr reloc = static_cast<ELF::Addr>(rela->r_offset + load_bias_);
+
+  RLOG("  rela reloc=%p offset=%p type=%d addend=%p\n",
+       reloc,
+       rela->r_offset,
+       rela_type,
+       addend);
+
+  // Apply the relocation.
+  ELF::Addr* CRAZY_UNUSED target = reinterpret_cast<ELF::Addr*>(reloc);
+  switch (rela_type) {
+#ifdef __aarch64__
+    case R_AARCH64_JUMP_SLOT:
+      RLOG("  R_AARCH64_JUMP_SLOT target=%p addr=%p\n",
+           target,
+           sym_addr + addend);
+      *target = sym_addr + addend;
+      break;
+
+    case R_AARCH64_GLOB_DAT:
+      RLOG("  R_AARCH64_GLOB_DAT target=%p addr=%p\n",
+           target,
+           sym_addr + addend);
+      *target = sym_addr + addend;
+      break;
+
+    case R_AARCH64_ABS64:
+      RLOG("  R_AARCH64_ABS64 target=%p (%p) addr=%p\n",
+           target,
+           *target,
+           sym_addr + addend);
+      *target += sym_addr + addend;
+      break;
+
+    case R_AARCH64_RELATIVE:
+      RLOG("  R_AARCH64_RELATIVE target=%p (%p) bias=%p\n",
+           target,
+           *target,
+           load_bias_ + addend);
+      if (__builtin_expect(rela_symbol, 0)) {
+        *error = "Invalid relative relocation with symbol";
+        return false;
+      }
+      *target = load_bias_ + addend;
+      break;
+
+    case R_AARCH64_COPY:
+      // NOTE: These relocations are forbidden in shared libraries.
+      RLOG("  R_AARCH64_COPY\n");
+      *error = "Invalid R_AARCH64_COPY relocation in shared library";
+      return false;
+#endif  // __aarch64__
+
+    default:
+      error->Format("Invalid relocation type (%d)", rela_type);
+      return false;
+  }
+
+  return true;
+}
+
+bool ElfRelocations::ApplyRelReloc(const ELF::Rel* rel,
+                                   ELF::Addr sym_addr,
+                                   bool resolved CRAZY_UNUSED,
+                                   Error* error) {
+  const ELF::Word rel_type = ELF_R_TYPE(rel->r_info);
+  const ELF::Word CRAZY_UNUSED rel_symbol = ELF_R_SYM(rel->r_info);
+
+  const ELF::Addr reloc = static_cast<ELF::Addr>(rel->r_offset + load_bias_);
+
+  RLOG("  rel reloc=%p offset=%p type=%d\n", reloc, rel->r_offset, rel_type);
+
+  // Apply the relocation.
+  ELF::Addr* CRAZY_UNUSED target = reinterpret_cast<ELF::Addr*>(reloc);
+  switch (rel_type) {
+#ifdef __arm__
+    case R_ARM_JUMP_SLOT:
+      RLOG("  R_ARM_JUMP_SLOT target=%p addr=%p\n", target, sym_addr);
+      *target = sym_addr;
+      break;
+
+    case R_ARM_GLOB_DAT:
+      RLOG("  R_ARM_GLOB_DAT target=%p addr=%p\n", target, sym_addr);
+      *target = sym_addr;
+      break;
+
+    case R_ARM_ABS32:
+      RLOG("  R_ARM_ABS32 target=%p (%p) addr=%p\n",
+           target,
+           *target,
+           sym_addr);
+      *target += sym_addr;
+      break;
+
+    case R_ARM_REL32:
+      RLOG("  R_ARM_REL32 target=%p (%p) addr=%p offset=%p\n",
+           target,
+           *target,
+           sym_addr,
+           rel->r_offset);
+      *target += sym_addr - rel->r_offset;
+      break;
+
+    case R_ARM_RELATIVE:
+      RLOG("  R_ARM_RELATIVE target=%p (%p) bias=%p\n",
+           target,
+           *target,
+           load_bias_);
+      if (__builtin_expect(rel_symbol, 0)) {
+        *error = "Invalid relative relocation with symbol";
+        return false;
+      }
+      *target += load_bias_;
+      break;
+
+    case R_ARM_COPY:
+      // NOTE: These relocations are forbidden in shared libraries.
+      // The Android linker has special code to deal with this, which
+      // is not needed here.
+      RLOG("  R_ARM_COPY\n");
+      *error = "Invalid R_ARM_COPY relocation in shared library";
+      return false;
+#endif  // __arm__
+
+#ifdef __i386__
+    case R_386_JMP_SLOT:
+      *target = sym_addr;
+      break;
+
+    case R_386_GLOB_DAT:
+      *target = sym_addr;
+      break;
+
+    case R_386_RELATIVE:
+      if (rel_symbol) {
+        *error = "Invalid relative relocation with symbol";
+        return false;
+      }
+      *target += load_bias_;
+      break;
+
+    case R_386_32:
+      *target += sym_addr;
+      break;
+
+    case R_386_PC32:
+      *target += (sym_addr - reloc);
+      break;
+#endif  // __i386__
+
+#ifdef __mips__
+    case R_MIPS_REL32:
+      if (resolved)
+        *target += sym_addr;
+      else
+        *target += load_bias_;
+      break;
+#endif  // __mips__
+
+    default:
+      error->Format("Invalid relocation type (%d)", rel_type);
+      return false;
+  }
+
+  return true;
+}
+
+bool ElfRelocations::ResolveSymbol(ELF::Word rel_type,
+                                   ELF::Word rel_symbol,
+                                   const ElfSymbols* symbols,
+                                   SymbolResolver* resolver,
+                                   ELF::Addr reloc,
+                                   ELF::Addr* sym_addr,
+                                   Error* error) {
+  const char* sym_name = symbols->LookupNameById(rel_symbol);
+  RLOG("    symbol name='%s'\n", sym_name);
+  void* address = resolver->Lookup(sym_name);
+
+  if (address) {
+    // The symbol was found, so compute its address.
+    RLOG("%s: symbol %s resolved to %p\n", __FUNCTION__, sym_name, address);
+    *sym_addr = reinterpret_cast<ELF::Addr>(address);
+    return true;
+  }
+
+  // The symbol was not found. Normally this is an error except
+  // if this is a weak reference.
+  if (!symbols->IsWeakById(rel_symbol)) {
+    error->Format("Could not find symbol '%s'", sym_name);
+    return false;
+  }
+
+  RLOG("%s: weak reference to unresolved symbol %s\n", __FUNCTION__, sym_name);
+
+  // IHI0044C AAELF 4.5.1.1:
+  // Libraries are not searched to resolve weak references.
+  // It is not an error for a weak reference to remain
+  // unsatisfied.
+  //
+  // During linking, the value of an undefined weak reference is:
+  // - Zero if the relocation type is absolute
+  // - The address of the place if the relocation is pc-relative
+  // - The address of nominal base address if the relocation
+  //   type is base-relative.
+  RelocationType r = GetRelocationType(rel_type);
+  if (r == RELOCATION_TYPE_ABSOLUTE || r == RELOCATION_TYPE_RELATIVE) {
+    *sym_addr = 0;
+    return true;
+  }
+
+  if (r == RELOCATION_TYPE_PC_RELATIVE) {
+    *sym_addr = reloc;
+    return true;
+  }
+
+  error->Format(
+      "Invalid weak relocation type (%d) for unknown symbol '%s'",
+      r,
+      sym_name);
+  return false;
+}
+
+bool ElfRelocations::ApplyRelRelocs(const ELF::Rel* rel,
+                                    size_t rel_count,
+                                    const ElfSymbols* symbols,
+                                    SymbolResolver* resolver,
+                                    Error* error) {
   RLOG("%s: rel=%p rel_count=%d\n", __FUNCTION__, rel, rel_count);
 
   if (!rel)
     return true;
 
   for (size_t rel_n = 0; rel_n < rel_count; rel++, rel_n++) {
-    unsigned rel_type = ELF_R_TYPE(rel->r_info);
-    unsigned rel_symbol = ELF_R_SYM(rel->r_info);
+    const ELF::Word rel_type = ELF_R_TYPE(rel->r_info);
+    const ELF::Word rel_symbol = ELF_R_SYM(rel->r_info);
 
     ELF::Addr sym_addr = 0;
     ELF::Addr reloc = static_cast<ELF::Addr>(rel->r_offset + load_bias_);
@@ -263,147 +574,68 @@
     if (rel_type == 0)
       continue;
 
-    bool CRAZY_UNUSED resolved = false;
+    bool resolved = false;
 
     // If this is a symbolic relocation, compute the symbol's address.
     if (__builtin_expect(rel_symbol != 0, 0)) {
-      const char* sym_name = symbols->LookupNameById(rel_symbol);
-      RLOG("    symbol name='%s'\n", sym_name);
-      void* address = resolver->Lookup(sym_name);
-      if (address) {
-        // The symbol was found, so compute its address.
-        RLOG("%s: symbol %s resolved to %p\n", __FUNCTION__, sym_name, address);
-        resolved = true;
-        sym_addr = reinterpret_cast<ELF::Addr>(address);
-      } else {
-        // The symbol was not found. Normally this is an error except
-        // if this is a weak reference.
-        if (!symbols->IsWeakById(rel_symbol)) {
-          error->Format("Could not find symbol '%s'", sym_name);
-          return false;
-        }
-
-        resolved = true;
-        RLOG("%s: weak reference to unresolved symbol %s\n",
-             __FUNCTION__,
-             sym_name);
-
-        // IHI0044C AAELF 4.5.1.1:
-        // Libraries are not searched to resolve weak references.
-        // It is not an error for a weak reference to remain
-        // unsatisfied.
-        //
-        // During linking, the value of an undefined weak reference is:
-        // - Zero if the relocation type is absolute
-        // - The address of the place if the relocation is pc-relative
-        // - The address of nominal base address if the relocation
-        //   type is base-relative.
-        RelocationType r = GetRelocationType(rel_type);
-        if (r == RELOCATION_TYPE_ABSOLUTE || r == RELOCATION_TYPE_RELATIVE)
-          sym_addr = 0;
-        else if (r == RELOCATION_TYPE_PC_RELATIVE)
-          sym_addr = reloc;
-        else {
-          error->Format(
-              "Invalid weak relocation type (%d) for unknown symbol '%s'",
-              r,
-              sym_name);
-          return false;
-        }
-      }
+      resolved = ResolveSymbol(rel_type,
+                               rel_symbol,
+                               symbols,
+                               resolver,
+                               reloc,
+                               &sym_addr,
+                               error);
     }
 
-    // Apply the relocation.
-    ELF::Addr* target = reinterpret_cast<ELF::Addr*>(reloc);
-    switch (rel_type) {
-#ifdef __arm__
-      case R_ARM_JUMP_SLOT:
-        RLOG("  R_ARM_JUMP_SLOT target=%p addr=%p\n", target, sym_addr);
-        *target = sym_addr;
-        break;
+    if (!ApplyRelReloc(rel, sym_addr, resolved, error))
+      return false;
+  }
 
-      case R_ARM_GLOB_DAT:
-        RLOG("  R_ARM_GLOB_DAT target=%p addr=%p\n", target, sym_addr);
-        *target = sym_addr;
-        break;
+  return true;
+}
 
-      case R_ARM_ABS32:
-        RLOG("  R_ARM_ABS32 target=%p (%p) addr=%p\n",
-             target,
-             *target,
-             sym_addr);
-        *target += sym_addr;
-        break;
+bool ElfRelocations::ApplyRelaRelocs(const ELF::Rela* rela,
+                                     size_t rela_count,
+                                     const ElfSymbols* symbols,
+                                     SymbolResolver* resolver,
+                                     Error* error) {
+  RLOG("%s: rela=%p rela_count=%d\n", __FUNCTION__, rela, rela_count);
 
-      case R_ARM_REL32:
-        RLOG("  R_ARM_REL32 target=%p (%p) addr=%p offset=%p\n",
-             target,
-             *target,
-             sym_addr,
-             rel->r_offset);
-        *target += sym_addr - rel->r_offset;
-        break;
+  if (!rela)
+    return true;
 
-      case R_ARM_RELATIVE:
-        RLOG("  R_ARM_RELATIVE target=%p (%p) bias=%p\n",
-             target,
-             *target,
-             load_bias_);
-        if (__builtin_expect(rel_symbol, 0)) {
-          *error = "Invalid relative relocation with symbol";
-          return false;
-        }
-        *target += load_bias_;
-        break;
+  for (size_t rel_n = 0; rel_n < rela_count; rela++, rel_n++) {
+    const ELF::Word rel_type = ELF_R_TYPE(rela->r_info);
+    const ELF::Word rel_symbol = ELF_R_SYM(rela->r_info);
 
-      case R_ARM_COPY:
-        // NOTE: These relocations are forbidden in shared libraries.
-        // The Android linker has special code to deal with this, which
-        // is not needed here.
-        RLOG("  R_ARM_COPY\n");
-        *error = "Invalid R_ARM_COPY relocation in shared library";
-        return false;
-#endif  // __arm__
+    ELF::Addr sym_addr = 0;
+    ELF::Addr reloc = static_cast<ELF::Addr>(rela->r_offset + load_bias_);
+    RLOG("  %d/%d reloc=%p offset=%p type=%d symbol=%d\n",
+         rel_n + 1,
+         rela_count,
+         reloc,
+         rela->r_offset,
+         rel_type,
+         rel_symbol);
 
-#ifdef __i386__
-      case R_386_JMP_SLOT:
-        *target = sym_addr;
-        break;
+    if (rel_type == 0)
+      continue;
 
-      case R_386_GLOB_DAT:
-        *target = sym_addr;
-        break;
+    bool resolved = false;
 
-      case R_386_RELATIVE:
-        if (rel_symbol) {
-          *error = "Invalid relative relocation with symbol";
-          return false;
-        }
-        *target += load_bias_;
-        break;
-
-      case R_386_32:
-        *target += sym_addr;
-        break;
-
-      case R_386_PC32:
-        *target += (sym_addr - reloc);
-        break;
-#endif  // __i386__
-
-#ifdef __mips__
-      case R_MIPS_REL32:
-        if (resolved)
-          *target += sym_addr;
-        else
-          *target += load_bias_;
-        break;
-#endif  // __mips__
-
-      default:
-        error->Format("Invalid relocation type (%d)", rel_type);
-        return false;
+    // If this is a symbolic relocation, compute the symbol's address.
+    if (__builtin_expect(rel_symbol != 0, 0)) {
+      resolved = ResolveSymbol(rel_type,
+                               rel_symbol,
+                               symbols,
+                               resolver,
+                               reloc,
+                               &sym_addr,
+                               error);
     }
+
+    if (!ApplyRelaReloc(rela, sym_addr, resolved, error))
+      return false;
   }
 
   return true;
@@ -457,27 +689,58 @@
 }
 #endif  // __mips__
 
-void ElfRelocations::CopyAndRelocate(size_t src_addr,
-                                     size_t dst_addr,
-                                     size_t map_addr,
-                                     size_t size) {
-  // First, a straight copy.
-  ::memcpy(reinterpret_cast<void*>(dst_addr),
-           reinterpret_cast<void*>(src_addr),
-           size);
+void ElfRelocations::AdjustRelocation(ELF::Word rel_type,
+                                      ELF::Addr src_reloc,
+                                      size_t dst_delta,
+                                      size_t map_delta) {
+  ELF::Addr* dst_ptr = reinterpret_cast<ELF::Addr*>(src_reloc + dst_delta);
 
+  switch (rel_type) {
+#ifdef __arm__
+    case R_ARM_RELATIVE:
+      *dst_ptr += map_delta;
+      break;
+#endif  // __arm__
+
+#ifdef __aarch64__
+    case R_AARCH64_RELATIVE:
+      *dst_ptr += map_delta;
+      break;
+#endif  // __aarch64__
+
+#ifdef __i386__
+    case R_386_RELATIVE:
+      *dst_ptr += map_delta;
+      break;
+#endif
+
+#ifdef __mips__
+    case R_MIPS_REL32:
+      *dst_ptr += map_delta;
+      break;
+#endif
+    default:
+      ;
+  }
+}
+
+void ElfRelocations::RelocateRela(size_t src_addr,
+                                  size_t dst_addr,
+                                  size_t map_addr,
+                                  size_t size) {
   // Add this value to each source address to get the corresponding
   // destination address.
-  size_t dst_delta = dst_addr - src_addr;
-  size_t map_delta = map_addr - src_addr;
+  const size_t dst_delta = dst_addr - src_addr;
+  const size_t map_delta = map_addr - src_addr;
 
   // Ignore PLT relocations, which all target symbols (ignored here).
-  const ELF::Rel* rel = relocations_;
-  const ELF::Rel* rel_limit = rel + relocations_count_;
+  const ELF::Rela* rel = reinterpret_cast<ELF::Rela*>(relocations_);
+  const size_t relocations_count = relocations_size_ / sizeof(ELF::Rela);
+  const ELF::Rela* rel_limit = rel + relocations_count;
 
   for (; rel < rel_limit; ++rel) {
-    unsigned rel_type = ELF_R_TYPE(rel->r_info);
-    unsigned rel_symbol = ELF_R_SYM(rel->r_info);
+    const ELF::Word rel_type = ELF_R_TYPE(rel->r_info);
+    const ELF::Word rel_symbol = ELF_R_SYM(rel->r_info);
     ELF::Addr src_reloc = static_cast<ELF::Addr>(rel->r_offset + load_bias_);
 
     if (rel_type == 0 || rel_symbol != 0) {
@@ -490,32 +753,65 @@
       continue;
     }
 
-    ELF::Addr* dst_ptr = reinterpret_cast<ELF::Addr*>(src_reloc + dst_delta);
-
-    switch (rel_type) {
-#ifdef __arm__
-      case R_ARM_RELATIVE:
-        *dst_ptr += map_delta;
-        break;
-#endif  // __arm__
-
-#ifdef __i386__
-      case R_386_RELATIVE:
-        *dst_ptr += map_delta;
-        break;
-#endif
-
-#ifdef __mips__
-      case R_MIPS_REL32:
-        *dst_ptr += map_delta;
-        break;
-#endif
-      default:
-        ;
-    }
+    AdjustRelocation(rel_type, src_reloc, dst_delta, map_delta);
   }
+}
+
+void ElfRelocations::RelocateRel(size_t src_addr,
+                                 size_t dst_addr,
+                                 size_t map_addr,
+                                 size_t size) {
+  // Add this value to each source address to get the corresponding
+  // destination address.
+  const size_t dst_delta = dst_addr - src_addr;
+  const size_t map_delta = map_addr - src_addr;
+
+  // Ignore PLT relocations, which all target symbols (ignored here).
+  const ELF::Rel* rel = reinterpret_cast<ELF::Rel*>(relocations_);
+  const size_t relocations_count = relocations_size_ / sizeof(ELF::Rel);
+  const ELF::Rel* rel_limit = rel + relocations_count;
+
+  for (; rel < rel_limit; ++rel) {
+    const ELF::Word rel_type = ELF_R_TYPE(rel->r_info);
+    const ELF::Word rel_symbol = ELF_R_SYM(rel->r_info);
+    ELF::Addr src_reloc = static_cast<ELF::Addr>(rel->r_offset + load_bias_);
+
+    if (rel_type == 0 || rel_symbol != 0) {
+      // Ignore empty and symbolic relocations
+      continue;
+    }
+
+    if (src_reloc < src_addr || src_reloc >= src_addr + size) {
+      // Ignore entries that don't relocate addresses inside the source section.
+      continue;
+    }
+
+    AdjustRelocation(rel_type, src_reloc, dst_delta, map_delta);
+  }
+}
+
+void ElfRelocations::CopyAndRelocate(size_t src_addr,
+                                     size_t dst_addr,
+                                     size_t map_addr,
+                                     size_t size) {
+  // First, a straight copy.
+  ::memcpy(reinterpret_cast<void*>(dst_addr),
+           reinterpret_cast<void*>(src_addr),
+           size);
+
+  // Relocate relocations.
+  if (relocations_type_ == DT_REL)
+    RelocateRel(src_addr, dst_addr, map_addr, size);
+
+  else if (relocations_type_ == DT_RELA)
+    RelocateRela(src_addr, dst_addr, map_addr, size);
 
 #ifdef __mips__
+  // Add this value to each source address to get the corresponding
+  // destination address.
+  const size_t dst_delta = dst_addr - src_addr;
+  const size_t map_delta = map_addr - src_addr;
+
   // Only relocate local GOT entries.
   ELF::Addr* got = plt_got_;
   if (got) {
@@ -528,8 +824,6 @@
     }
   }
 #endif
-
-  // Done
 }
 
 }  // namespace crazy
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_relocations.h b/sources/android/crazy_linker/src/crazy_linker_elf_relocations.h
index 3973fc0..56220ce 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_relocations.h
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_relocations.h
@@ -56,11 +56,43 @@
                        size_t size);
 
  private:
-  bool ApplyRelocs(const ELF::Rel* relocs,
-                   size_t relocs_count,
-                   const ElfSymbols* symbols,
-                   SymbolResolver* resolver,
-                   Error* error);
+  bool ResolveSymbol(unsigned rel_type,
+                     unsigned rel_symbol,
+                     const ElfSymbols* symbols,
+                     SymbolResolver* resolver,
+                     ELF::Addr reloc,
+                     ELF::Addr* sym_addr,
+                     Error* error);
+  bool ApplyRelaReloc(const ELF::Rela* rela,
+                      ELF::Addr sym_addr,
+                      bool resolved,
+                      Error* error);
+  bool ApplyRelReloc(const ELF::Rel* rel,
+                     ELF::Addr sym_addr,
+                     bool resolved,
+                     Error* error);
+  bool ApplyRelaRelocs(const ELF::Rela* relocs,
+                       size_t relocs_count,
+                       const ElfSymbols* symbols,
+                       SymbolResolver* resolver,
+                       Error* error);
+  bool ApplyRelRelocs(const ELF::Rel* relocs,
+                      size_t relocs_count,
+                      const ElfSymbols* symbols,
+                      SymbolResolver* resolver,
+                      Error* error);
+  void AdjustRelocation(ELF::Word rel_type,
+                        ELF::Addr src_reloc,
+                        size_t dst_delta,
+                        size_t map_delta);
+  void RelocateRela(size_t src_addr,
+                    size_t dst_addr,
+                    size_t map_addr,
+                    size_t size);
+  void RelocateRel(size_t src_addr,
+                   size_t dst_addr,
+                   size_t map_addr,
+                   size_t size);
 
 #if defined(__mips__)
   bool RelocateMipsGot(const ElfSymbols* symbols,
@@ -72,12 +104,13 @@
   size_t phdr_count_;
   size_t load_bias_;
 
-  const ELF::Rel* plt_relocations_;
-  size_t plt_relocations_count_;
+  ELF::Addr relocations_type_;
+  ELF::Addr plt_relocations_;
+  size_t plt_relocations_size_;
   ELF::Addr* plt_got_;
 
-  const ELF::Rel* relocations_;
-  size_t relocations_count_;
+  ELF::Addr relocations_;
+  size_t relocations_size_;
 
 #if defined(__mips__)
   // MIPS-specific relocation fields.
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_symbols.cpp b/sources/android/crazy_linker/src/crazy_linker_elf_symbols.cpp
index 704076f..cc2c7d2 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_symbols.cpp
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_symbols.cpp
@@ -35,7 +35,7 @@
       case DT_HASH:
         LOG("  DT_HASH addr=%p\n", dyn_addr);
         {
-          ELF::Addr* data = reinterpret_cast<uintptr_t*>(dyn_addr);
+          ELF::Word* data = reinterpret_cast<ELF::Word*>(dyn_addr);
           hash_bucket_size_ = data[0];
           hash_chain_size_ = data[1];
           hash_bucket_ = data + 2;
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_symbols.h b/sources/android/crazy_linker/src/crazy_linker_elf_symbols.h
index 9e79b22..a2172e9 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_symbols.h
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_symbols.h
@@ -66,9 +66,9 @@
  private:
   const ELF::Sym* symbol_table_;
   const char* string_table_;
-  ELF::Addr* hash_bucket_;
+  ELF::Word* hash_bucket_;
   size_t hash_bucket_size_;
-  ELF::Addr* hash_chain_;
+  ELF::Word* hash_chain_;
   size_t hash_chain_size_;
 };
 
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_view.cpp b/sources/android/crazy_linker/src/crazy_linker_elf_view.cpp
index 5fa16df..cc45931 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_view.cpp
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_view.cpp
@@ -8,12 +8,12 @@
 
 namespace crazy {
 
-bool ElfView::InitUnmapped(size_t load_address,
+bool ElfView::InitUnmapped(ELF::Addr load_address,
                            const ELF::Phdr* phdr,
                            size_t phdr_count,
                            Error* error) {
   // Compute load size and bias.
-  size_t min_vaddr = 0;
+  ELF::Addr min_vaddr = 0;
   load_size_ = phdr_table_get_load_size(phdr, phdr_count, &min_vaddr, NULL);
   if (load_size_ == 0) {
     *error = "Invalid program header table";
diff --git a/sources/android/crazy_linker/src/crazy_linker_elf_view.h b/sources/android/crazy_linker/src/crazy_linker_elf_view.h
index c60dd6e..7bb3f0a 100644
--- a/sources/android/crazy_linker/src/crazy_linker_elf_view.h
+++ b/sources/android/crazy_linker/src/crazy_linker_elf_view.h
@@ -35,7 +35,7 @@
   // appropriate values. Note that functions phdr() or dynamic() will always
   // return an address relative to |load_address|, even if the binary was
   // not loaded yet in the process.
-  bool InitUnmapped(size_t load_address,
+  bool InitUnmapped(ELF::Addr load_address,
                     const ELF::Phdr* phdr,
                     size_t phdr_count,
                     Error* error);
@@ -75,7 +75,7 @@
     ELF::Addr GetValue() const { return dyn_->d_un.d_val; }
 
     ELF::Addr* GetValuePointer() const {
-      return const_cast<ELF::Addr*>(&dyn_->d_un.d_val);
+      return const_cast<ELF::Addr*>(&dyn_->d_un.d_ptr);
     }
 
     uintptr_t GetOffset() const { return dyn_->d_un.d_ptr; }
@@ -98,8 +98,8 @@
   size_t phdr_count_;
   const ELF::Dyn* dynamic_;
   size_t dynamic_count_;
-  size_t dynamic_flags_;
-  size_t load_address_;
+  ELF::Word dynamic_flags_;
+  ELF::Addr load_address_;
   size_t load_size_;
   size_t load_bias_;
 };
diff --git a/sources/android/crazy_linker/src/crazy_linker_proc_maps_unittest.cpp b/sources/android/crazy_linker/src/crazy_linker_proc_maps_unittest.cpp
index 7ce8697..00f013d 100644
--- a/sources/android/crazy_linker/src/crazy_linker_proc_maps_unittest.cpp
+++ b/sources/android/crazy_linker/src/crazy_linker_proc_maps_unittest.cpp
@@ -4,6 +4,7 @@
 
 #include "crazy_linker_proc_maps.h"
 
+#include <limits.h>
 #include <minitest/minitest.h>
 #include "crazy_linker_system_mock.h"
 
diff --git a/sources/android/crazy_linker/src/crazy_linker_shared_library.cpp b/sources/android/crazy_linker/src/crazy_linker_shared_library.cpp
index 406346e..1011c39 100644
--- a/sources/android/crazy_linker/src/crazy_linker_shared_library.cpp
+++ b/sources/android/crazy_linker/src/crazy_linker_shared_library.cpp
@@ -8,7 +8,6 @@
 #include <stdlib.h>
 #include <sys/mman.h>
 #include <elf.h>
-#include <sys/exec_elf.h>
 
 #include "crazy_linker_ashmem.h"
 #include "crazy_linker_debug.h"
diff --git a/sources/android/crazy_linker/src/crazy_linker_shared_library.h b/sources/android/crazy_linker/src/crazy_linker_shared_library.h
index 8ce381e..a8087c1 100644
--- a/sources/android/crazy_linker/src/crazy_linker_shared_library.h
+++ b/sources/android/crazy_linker/src/crazy_linker_shared_library.h
@@ -170,8 +170,8 @@
   ElfView view_;
   ElfSymbols symbols_;
 
-  size_t relro_start_;
-  size_t relro_size_;
+  ELF::Addr relro_start_;
+  ELF::Addr relro_size_;
   bool relro_used_;
 
   SharedLibrary* list_next_;
@@ -205,4 +205,4 @@
 
 }  // namespace crazy
 
-#endif  // CRAZY_LINKER_SHARED_LIBRARY_H
\ No newline at end of file
+#endif  // CRAZY_LINKER_SHARED_LIBRARY_H
diff --git a/sources/android/crazy_linker/src/elf_traits.h b/sources/android/crazy_linker/src/elf_traits.h
index 6fbe139..82c17af 100644
--- a/sources/android/crazy_linker/src/elf_traits.h
+++ b/sources/android/crazy_linker/src/elf_traits.h
@@ -16,28 +16,48 @@
   typedef Elf32_Ehdr Ehdr;
   typedef Elf32_Phdr Phdr;
   typedef Elf32_Word Word;
+  typedef Elf32_Sword Sword;
   typedef Elf32_Addr Addr;
   typedef Elf32_Dyn Dyn;
   typedef Elf32_Sym Sym;
   typedef Elf32_Rel Rel;
+  typedef Elf32_Rela Rela;
   typedef Elf32_auxv_t auxv_t;
 
   enum { kElfClass = ELFCLASS32 };
   enum { kElfBits = 32 };
+
+#ifndef ELF_R_TYPE
+#define ELF_R_TYPE ELF32_R_TYPE
+#endif
+
+#ifndef ELF_R_SYM
+#define ELF_R_SYM ELF32_R_SYM
+#endif
 };
 #elif __SIZEOF_POINTER__ == 8
 struct ELF {
   typedef Elf64_Ehdr Ehdr;
   typedef Elf64_Phdr Phdr;
   typedef Elf64_Word Word;
+  typedef Elf64_Sword Sword;
   typedef Elf64_Addr Addr;
   typedef Elf64_Dyn Dyn;
   typedef Elf64_Sym Sym;
   typedef Elf64_Rel Rel;
+  typedef Elf64_Rela Rela;
   typedef Elf64_auxv_t auxv_t;
 
   enum { kElfClass = ELFCLASS64 };
   enum { kElfBits = 64 };
+
+#ifndef ELF_R_TYPE
+#define ELF_R_TYPE ELF64_R_TYPE
+#endif
+
+#ifndef ELF_R_SYM
+#define ELF_R_SYM ELF64_R_SYM
+#endif
 };
 #else
 #error "Unsupported target CPU bitness"
@@ -47,8 +67,10 @@
 #define ELF_MACHINE EM_ARM
 #elif defined(__i386__)
 #define ELF_MACHINE EM_386
-#elif defined(__mips__)
+#elif defined(__mips__) && !defined(__LP64__)  // mips64el defines __mips__ too
 #define ELF_MACHINE EM_MIPS
+#elif defined(__aarch64__)
+#define ELF_MACHINE EM_AARCH64
 #else
 #error "Unsupported target CPU architecture"
 #endif
diff --git a/sources/android/crazy_linker/src/linker_phdr.cpp b/sources/android/crazy_linker/src/linker_phdr.cpp
index c22f5a1..1dd52fd 100644
--- a/sources/android/crazy_linker/src/linker_phdr.cpp
+++ b/sources/android/crazy_linker/src/linker_phdr.cpp
@@ -142,7 +142,7 @@
                                 size_t phdr_count,
                                 ELF::Addr* out_min_vaddr,
                                 ELF::Addr* out_max_vaddr) {
-  ELF::Addr min_vaddr = 0xFFFFFFFFU;
+  ELF::Addr min_vaddr = ~static_cast<ELF::Addr>(0);
   ELF::Addr max_vaddr = 0x00000000U;
 
   bool found_pt_load = false;
diff --git a/sources/android/crazy_linker/tests/bar_with_relro.cpp b/sources/android/crazy_linker/tests/bar_with_relro.cpp
index 46a05f6..9e35a0f 100644
--- a/sources/android/crazy_linker/tests/bar_with_relro.cpp
+++ b/sources/android/crazy_linker/tests/bar_with_relro.cpp
@@ -30,7 +30,7 @@
   for (size_t n = 0; n < sizeof(kStrings) / sizeof(kStrings[0]); ++n) {
     const char* ptr = kStrings[n];
     if (strcmp(ptr, "another example string")) {
-      printf("%s: Bad string at offset=%d\n", __FUNCTION__, n);
+      printf("%s: Bad string at offset=%zu\n", __FUNCTION__, n);
       exit(1);
     }
   }
diff --git a/sources/android/crazy_linker/tests/foo_with_relro.cpp b/sources/android/crazy_linker/tests/foo_with_relro.cpp
index 67ef98e..c69a319 100644
--- a/sources/android/crazy_linker/tests/foo_with_relro.cpp
+++ b/sources/android/crazy_linker/tests/foo_with_relro.cpp
@@ -21,7 +21,7 @@
   for (size_t n = 0; n < sizeof(kStrings) / sizeof(kStrings[0]); ++n) {
     const char* ptr = kStrings[n];
     if (strcmp(ptr, "some example string")) {
-      printf("%s: Bad string at offset=%d\n", __FUNCTION__, n);
+      printf("%s: Bad string at offset=%zu\n", __FUNCTION__, n);
       exit(1);
     }
   }
diff --git a/sources/android/crazy_linker/tests/foo_with_static_constructor.cpp b/sources/android/crazy_linker/tests/foo_with_static_constructor.cpp
index f9d291a..7374881 100644
--- a/sources/android/crazy_linker/tests/foo_with_static_constructor.cpp
+++ b/sources/android/crazy_linker/tests/foo_with_static_constructor.cpp
@@ -7,9 +7,16 @@
 // like __aeabi_atexit(), which are not normally returned by
 // a call to dlsym().
 
+// Libc is not required to copy strings passed to putenv(). If it does
+// not then env pointers become invalid when rodata is unmapped on
+// library unload. To guard against this, putenv() strings are first
+// strdup()'ed. This is a mild memory leak.
+
 #include <stdlib.h>
 
+#ifdef __arm__
 extern "C" void __aeabi_atexit(void*);
+#endif
 
 class A {
  public:
@@ -17,17 +24,17 @@
     x_ = rand();
     const char* env = getenv("TEST_VAR");
     if (!env || strcmp(env, "INIT"))
-      putenv("TEST_VAR=LOAD_ERROR");
+      putenv(strdup("TEST_VAR=LOAD_ERROR"));
     else
-      putenv("TEST_VAR=LOADED");
+      putenv(strdup("TEST_VAR=LOADED"));
   }
 
   ~A() {
     const char* env = getenv("TEST_VAR");
     if (!env || strcmp(env, "LOADED"))
-      putenv("TEST_VAR=UNLOAD_ERROR");
+      putenv(strdup("TEST_VAR=UNLOAD_ERROR"));
     else
-      putenv("TEST_VAR=UNLOADED");
+      putenv(strdup("TEST_VAR=UNLOADED"));
   }
 
   int Get() const { return x_; }
diff --git a/sources/android/crazy_linker/tests/test_util.h b/sources/android/crazy_linker/tests/test_util.h
index 28fd39f..0b876c2 100644
--- a/sources/android/crazy_linker/tests/test_util.h
+++ b/sources/android/crazy_linker/tests/test_util.h
@@ -23,6 +23,10 @@
 #include <sys/stat.h>
 #include <sys/uio.h>
 #include <unistd.h>
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS // to get PRI and SCN in 32-bit inttypes.h
+#endif
+#include <inttypes.h>
 
 namespace {
 
@@ -341,8 +345,8 @@
         if (!strstr(line, " r--"))
           Panic("Shared RELRO mapping is not readonly!\n");
         // Check that they can't be remapped read-write.
-        unsigned vma_start, vma_end;
-        if (sscanf(line, "%x-%x", &vma_start, &vma_end) != 2)
+        uint64_t vma_start, vma_end;
+        if (sscanf(line, "%" SCNx64 "-%" SCNx64, &vma_start, &vma_end) != 2)
           Panic("Could not parse VM address range!\n");
         int ret = ::mprotect(
             (void*)vma_start, vma_end - vma_start, PROT_READ | PROT_WRITE);
diff --git a/sources/android/support/Android.mk b/sources/android/support/Android.mk
index d340ba6..495450d 100644
--- a/sources/android/support/Android.mk
+++ b/sources/android/support/Android.mk
@@ -10,6 +10,8 @@
     src/musl-locale/catgets.c \
     src/musl-locale/catopen.c \
     src/musl-locale/isdigit_l.c \
+    src/musl-locale/islower_l.c \
+    src/musl-locale/isupper_l.c \
     src/musl-locale/iswalpha_l.c \
     src/musl-locale/iswblank_l.c \
     src/musl-locale/iswcntrl_l.c \
@@ -35,6 +37,7 @@
 # 32-bit ABIs
 
 android_support_sources := \
+    src/libdl_support.c \
     src/locale_support.c \
     src/math_support.c \
     src/stdlib_support.c \
@@ -57,22 +60,6 @@
     src/msun/e_log2.c \
     src/msun/e_log2f.c \
     src/msun/s_nan.c \
-    src/musl-multibyte/btowc.c \
-    src/musl-multibyte/internal.c \
-    src/musl-multibyte/mblen.c \
-    src/musl-multibyte/mbrlen.c \
-    src/musl-multibyte/mbrtowc.c \
-    src/musl-multibyte/mbsinit.c \
-    src/musl-multibyte/mbsnrtowcs.c \
-    src/musl-multibyte/mbsrtowcs.c \
-    src/musl-multibyte/mbstowcs.c \
-    src/musl-multibyte/mbtowc.c \
-    src/musl-multibyte/wcrtomb.c \
-    src/musl-multibyte/wcsnrtombs.c \
-    src/musl-multibyte/wcsrtombs.c \
-    src/musl-multibyte/wcstombs.c \
-    src/musl-multibyte/wctob.c \
-    src/musl-multibyte/wctomb.c \
     src/musl-ctype/iswalnum.c \
     src/musl-ctype/iswalpha.c \
     src/musl-ctype/iswblank.c \
@@ -121,31 +108,41 @@
     src/musl-locale/iswxdigit_l.c \
     src/musl-locale/isxdigit_l.c \
     src/musl-locale/langinfo.c \
-    src/musl-locale/nl_langinfo_l.c \
     src/musl-locale/strcasecmp_l.c \
     src/musl-locale/strcoll.c \
-    src/musl-locale/strcoll_l.c \
     src/musl-locale/strerror_l.c \
     src/musl-locale/strfmon.c \
     src/musl-locale/strftime_l.c \
     src/musl-locale/strncasecmp_l.c \
     src/musl-locale/strxfrm.c \
-    src/musl-locale/strxfrm_l.c \
     src/musl-locale/tolower_l.c \
     src/musl-locale/toupper_l.c \
     src/musl-locale/towctrans_l.c \
     src/musl-locale/towlower_l.c \
     src/musl-locale/towupper_l.c \
     src/musl-locale/wcscoll.c \
-    src/musl-locale/wcscoll_l.c \
     src/musl-locale/wcsxfrm.c \
-    src/musl-locale/wcsxfrm_l.c \
     src/musl-locale/wctrans_l.c \
     src/musl-locale/wctype_l.c \
     src/musl-math/frexp.c \
     src/musl-math/frexpf.c \
     src/musl-math/frexpl.c \
-    src/musl-math/s_scalbln.c \
+    src/musl-multibyte/btowc.c \
+    src/musl-multibyte/internal.c \
+    src/musl-multibyte/mblen.c \
+    src/musl-multibyte/mbrlen.c \
+    src/musl-multibyte/mbrtowc.c \
+    src/musl-multibyte/mbsinit.c \
+    src/musl-multibyte/mbsnrtowcs.c \
+    src/musl-multibyte/mbsrtowcs.c \
+    src/musl-multibyte/mbstowcs.c \
+    src/musl-multibyte/mbtowc.c \
+    src/musl-multibyte/wcrtomb.c \
+    src/musl-multibyte/wcsnrtombs.c \
+    src/musl-multibyte/wcsrtombs.c \
+    src/musl-multibyte/wcstombs.c \
+    src/musl-multibyte/wctob.c \
+    src/musl-multibyte/wctomb.c \
     src/musl-stdio/printf.c \
     src/musl-stdio/snprintf.c \
     src/musl-stdio/sprintf.c \
@@ -154,8 +151,23 @@
     src/musl-stdio/swprintf.c \
     src/musl-stdio/vwprintf.c \
     src/musl-stdio/wprintf.c \
+    src/wcstox/floatscan.c \
+    src/wcstox/intscan.c \
+    src/wcstox/shgetc.c \
+    src/wcstox/wcstol.c \
+    src/wcstox/wcstod.c \
 
-endif # 64-/32-bit ABIs
+# Replaces broken implementations in x86 libm.so
+ifeq (x86,$(TARGET_ARCH_ABI))
+android_support_sources += \
+    src/musl-math/scalbln.c \
+    src/musl-math/scalblnf.c \
+    src/musl-math/scalblnl.c \
+    src/musl-math/scalbnl.c \
+
+endif
+
+endif  # 64-/32-bit ABIs
 
 # This is only available as a static library for now.
 include $(CLEAR_VARS)
diff --git a/sources/android/support/include/ctype.h b/sources/android/support/include/ctype.h
index 1fb81b7..79af4b3 100644
--- a/sources/android/support/include/ctype.h
+++ b/sources/android/support/include/ctype.h
@@ -44,13 +44,13 @@
 int isblank_l(int, locale_t);
 int iscntrl_l(int, locale_t);
 int isgraph_l(int, locale_t);
-int islower_l(int, locale_t);
 int isprint_l(int, locale_t);
 int ispunct_l(int, locale_t);
 int isspace_l(int, locale_t);
-int isupper_l(int, locale_t);
 #endif // !__LP64__
 
+int islower_l(int, locale_t);
+int isupper_l(int, locale_t);
 int isdigit_l(int, locale_t);
 int isxdigit_l(int, locale_t);
 int tolower_l(int, locale_t);
diff --git a/sources/android/support/include/math.h b/sources/android/support/include/math.h
index a59eec6..46398a6 100644
--- a/sources/android/support/include/math.h
+++ b/sources/android/support/include/math.h
@@ -41,7 +41,7 @@
 typedef float       float_t;
 
 // Missing long double functions. Note that 'long double' is the same
-// than 'double' on Android, so this will define stubs.
+// as 'double' on 32-bit Android, so this will define stubs.
 #define LLVM_LIBCXX_LONG_DOUBLE_FUNCTIONS
 
 long double     acosl(long double);
diff --git a/sources/android/support/src/libdl_support.c b/sources/android/support/src/libdl_support.c
new file mode 100644
index 0000000..230d0d1
--- /dev/null
+++ b/sources/android/support/src/libdl_support.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+// Contains wrapper to missing dladdr in API < 8
+
+#if !__LP64__
+
+#include <dlfcn.h>
+#include <android/api-level.h>
+
+#if __ANDROID_API__ < 8
+typedef int Dl_info;
+#endif // __ANDROID_API__ >= 8
+
+typedef int (*dladdr_func_t)(const void *addr, Dl_info *info);
+
+#if defined(__cplusplus)
+extern "C"
+#endif
+int my_dladdr(const void *addr, Dl_info *info)
+{
+    static int initialized = 0;
+    static dladdr_func_t p_dladdr = 0;
+    if (!p_dladdr && !initialized) {
+        void *libdl = dlopen("libdl.so", RTLD_NOW);
+      // Other thread may enter here simultaneously but p_dladdr should be
+      // set to the same addres for "dladdr"
+        if (libdl) {
+#if __ANDROID_API__ < 8
+	   p_dladdr = 0;
+#else
+	   p_dladdr = (dladdr_func_t)dlsym(libdl, "dladdr");
+#endif
+        }
+        initialized = 1;
+    }
+    return p_dladdr? p_dladdr(addr, info) : 0;
+}
+
+
+#ifdef TEST
+#include <stdio.h>
+int main()
+{
+    void *libdl = dlopen("libc.so", RTLD_NOW);
+    void *h = dlsym(libdl, "printf");
+    Dl_info info;
+    int r = my_dladdr((char*)h+1, &info);
+    if (r)
+        printf("%p: %s, %x, %s, %p\n", h, info.dli_fname, info.dli_fbase, info.dli_sname, info.dli_saddr);
+}
+
+#endif // TEST
+#endif // __LP64__
diff --git a/sources/android/support/src/math_support.c b/sources/android/support/src/math_support.c
index d470906..24cdade 100644
--- a/sources/android/support/src/math_support.c
+++ b/sources/android/support/src/math_support.c
@@ -29,20 +29,25 @@
 #include <math.h>
 #include <assert.h>
 
+/* Any 64-bit Android math library should provide these functions,
+ * so these wrappers are only needed for 32-bit systems.
+ */
+#ifndef __LP64__
+
 /*
- * On Android, long double and double are identical, hence nexttoward is the
- * same as nextafter.
+ * On 32-bit Android, long double and double are identical, hence
+ * nexttoward is the same as nextafter.
  */
 
-double nexttoward(double d, long double td) {
+__attribute__((weak)) double nexttoward(double d, long double td) {
   return nextafter(d, (double)td);
 }
 
-float nexttowardf(float f, long double td) {
+__attribute__((weak)) float nexttowardf(float f, long double td) {
   return nextafterf(f, (float)td);
 }
 
-long double nexttowardl(long double ld, long double td) {
+__attribute__((weak)) long double nexttowardl(long double ld, long double td) {
   return nextafter((double)ld, (double)td);
 }
 
@@ -84,3 +89,5 @@
 __attribute__((weak)) long double tgammal(long double x) { return tgamma((double)x); }
 __attribute__((weak)) long double modfl(long double x, long double* y) { return modf((double)x, (double *)y); }
 __attribute__((weak)) long double exp2l(long double x) { return exp2((double)x); }
+
+#endif  // !__LP64__
diff --git a/sources/android/support/src/musl-ctype/iswspace.c b/sources/android/support/src/musl-ctype/iswspace.c
index 99d517e..b0c0ae1 100644
--- a/sources/android/support/src/musl-ctype/iswspace.c
+++ b/sources/android/support/src/musl-ctype/iswspace.c
@@ -14,6 +14,5 @@
 		0x2006, 0x2008, 0x2009, 0x200a,
 		0x2028, 0x2029, 0x205f, 0x3000, 0
 	};
-	if (wcschr(spaces, wc)) return 1;
-	return 0;
+	return wc && wcschr(spaces, wc);
 }
diff --git a/sources/android/support/src/musl-locale/big5.h b/sources/android/support/src/musl-locale/big5.h
new file mode 100644
index 0000000..332ea3b
--- /dev/null
+++ b/sources/android/support/src/musl-locale/big5.h
@@ -0,0 +1,1085 @@
+12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,
+65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,
+9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,
+65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,
+65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,
+65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,
+167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,
+12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,
+65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,
+8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,
+8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,
+8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,
+65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,
+13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,
+31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,
+9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,
+9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,
+65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,
+8548,8549,8550,8551,8552,8553,12321,
+12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,
+65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,
+65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,
+65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,
+65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,
+916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,
+936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,
+963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,
+12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,
+12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,
+12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,
+9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,
+9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19968,20057,19969,19971,20035,20061,20102,
+20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,
+19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,
+20800,20995,21242,21315,21449,21475,22303,
+22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,
+24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,
+20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,
+20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,
+20887,20982,20998,20999,21000,21243,21246,21247,21270,21305,21320,21319,21317,
+21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,
+23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,
+25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,
+27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,
+19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,
+20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,
+21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,
+21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,
+21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,
+22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,
+24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,
+26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,
+29916,29926,29976,29983,29992,29993,30000,30001,30002,30003,30091,30333,30382,
+30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,
+20073,20121,20132,20134,20133,20223,20233,20249,20234,
+20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,
+20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,
+21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,
+21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,
+22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,
+22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,
+24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,
+25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,
+27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,
+27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,
+32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,
+33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,
+20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,
+20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,
+20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,
+21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,
+21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,
+21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,
+22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,
+22930,22952,22942,22947,22937,22934,22925,22948,22931,
+22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,
+23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,
+24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,
+25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,
+25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,
+26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,
+27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,
+27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,
+27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,
+29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,
+32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,
+35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,
+36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,
+38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,
+20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,
+20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,
+20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,
+21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,
+21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,
+21658,21602,21608,21643,21629,21646,22266,22403,22391,
+22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,
+22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,
+22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,
+23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,
+24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,
+24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,
+24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,
+25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,
+25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,
+25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,
+26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,
+26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,
+26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,
+27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,
+27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,
+27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,
+29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,
+30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,
+31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,
+32937,32948,32938,32943,33253,33278,33293,33459,33437,
+33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,
+33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,
+37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,
+38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,
+20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,
+20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,
+21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,
+21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,
+21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,
+22865,22863,22862,22864,23004,23000,23039,23011,23016,23043,23013,23018,23002,
+23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,
+23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,
+24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,
+24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,
+25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,
+25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,
+26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,
+26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,
+26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,
+27954,27946,27969,27941,27916,27953,27934,27927,27963,
+27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,
+28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,
+29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,
+30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,
+30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,
+30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,
+31361,31487,31485,31869,32002,32005,32000,32009,32007,32004,32006,32568,32654,
+32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,
+32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,
+33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,
+33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,
+35331,35998,36000,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,
+36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,
+38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,
+39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,
+20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,
+20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,
+20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,
+21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,
+21769,21742,21738,21734,21799,21767,21757,21775,22275,
+22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,
+23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,
+23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,
+23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,
+24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,
+24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,
+25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,
+25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,
+26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,
+26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,
+26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,
+28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,
+28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,
+29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,
+29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,
+30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,
+30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,
+31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,
+31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,
+32020,32016,32021,32026,32028,32013,32025,32027,32570,
+32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,
+33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,
+33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,
+33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,
+34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,
+34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,
+35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,
+36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,
+37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,
+38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,
+20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,
+20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,
+21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,
+21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,
+21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,
+22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,
+23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,
+23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,
+23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,
+24246,24245,24254,24373,24375,24407,24428,24425,24427,
+24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,
+24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,
+24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,
+25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,
+25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,
+21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,
+26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,
+26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,
+26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,
+28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,
+28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,
+28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,
+29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,
+29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,
+30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,
+30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,
+31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,
+32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,
+32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,
+33333,33335,33334,33337,33678,33694,33688,33656,33698,
+33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,
+34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,
+34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,
+35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,
+36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,
+36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,
+37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,
+38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,
+40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,
+26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,
+21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,
+21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,
+22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,
+23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,
+23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,
+24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,
+24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,
+25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,
+25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,
+25954,25955,26001,26000,26031,26222,26224,26228,26230,
+26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,
+26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,
+26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,
+27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,
+28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,
+28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,
+28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,
+29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,
+29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,
+30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,
+31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,
+31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,
+32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,
+33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,
+33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,
+33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,
+34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,
+35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,
+35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,
+36024,36234,36229,36225,36302,36317,36299,36314,36305,
+36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,
+37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,
+37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,
+38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,
+38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,
+40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,
+20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,
+21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,
+21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,
+22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,
+23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,
+24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,
+24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,
+25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,
+26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,
+26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,
+27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,
+28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,
+28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,
+28998,29032,29014,29242,29266,29495,29509,29503,29502,
+29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,
+30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,
+30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,
+30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,
+31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,
+31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,
+32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,
+33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,
+33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,
+34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,
+35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,
+35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,
+35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,
+36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,
+36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,
+36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,
+37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,
+37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,
+38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,
+39156,39165,39166,39347,39345,39348,39649,40169,40578,
+40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,
+20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,
+22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,
+22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,
+22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,
+23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,
+24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,
+24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,
+25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,
+27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,
+27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,
+28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,
+28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,
+29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,
+29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,
+30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,
+31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,
+31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,
+32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,
+32862,32858,32903,33104,33152,33167,33160,33162,33151,
+33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,
+33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,
+34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,
+35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,
+35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,
+36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,
+36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,
+37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,
+38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,
+39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,
+40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,
+20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,
+22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,
+22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,
+23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,
+24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,
+24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,
+25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,
+25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,
+26292,26289,27171,27167,27112,27137,27166,27161,27133,
+27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,
+28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,
+28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,
+29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,
+30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,
+30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,
+31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,
+32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,
+32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,
+34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,
+34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,
+34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,
+35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,
+35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,
+36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,
+36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,
+37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,
+37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,
+38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,
+39389,39376,39391,39387,39377,39381,39378,39385,39607,
+39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,
+22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,
+22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,
+22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,
+24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,
+25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,
+26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,
+27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,
+28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,
+29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,
+29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,
+30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,
+31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,
+32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,
+33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,
+34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,
+35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,
+35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,
+36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,
+36986,37172,37266,37664,37686,37624,37683,37679,37666,
+37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,
+38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,
+38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,
+39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,
+40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,
+22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,
+23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,
+25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,
+26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,
+27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,
+28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,
+29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,
+30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,
+31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,
+31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,
+32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,
+32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,
+33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,
+34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,
+35140,35128,35133,35244,35598,35607,35609,35611,35594,
+35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,
+36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,
+36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,
+37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,
+38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,
+39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,
+22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,
+25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,
+27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,
+29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,
+30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,
+31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,
+33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,
+34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,
+36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37000,37291,37292,
+37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,
+38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,
+38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,
+39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,
+40672,40725,40748,20787,22181,22750,22751,22754,23541,
+40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,
+27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,
+29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,
+31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,
+32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,
+34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,
+35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,
+36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,
+37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,
+38876,38907,39006,39000,39003,39100,39237,39241,39446,39449,39693,39912,39911,
+39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,
+22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,
+25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,
+31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,
+32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,
+34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,
+36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,
+39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,
+40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,
+25885,25884,26005,26345,27387,27396,27386,27570,28748,
+29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,
+34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,
+36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,
+38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,
+39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,
+20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,
+28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,
+35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,
+38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,
+40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,
+27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,
+35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,
+39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,
+30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,
+37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,
+40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,
+38002,38000,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,
+39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,
+40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,
+9319,9320,9321,9332,9333,9334,9335,9336,
+9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,
+20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,
+24027,24186,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,
+710,12541,12542,12445,12446,0,0,12293,12294,12295,12540,65339,65341,10045,
+12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,
+12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,
+12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,
+12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,
+12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,
+12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,
+12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,
+12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,
+12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,
+12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,
+12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,
+12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,
+12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,
+1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,
+1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,
+1069,1070,
+1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,
+1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,
+1100,1101,1102,1103,8679,8632,8633,12751,204,20058,138,20994,17553,40880,
+20872,40881,30215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,
+11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,
+11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,
+12003,0,0,0,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,
+21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,
+20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,
+26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,
+21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,
+24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,
+29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,
+20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,
+21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,
+22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,
+23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,
+25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,
+26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,
+28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,
+33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,
+20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,
+20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,
+21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,
+21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,
+22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,
+23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,
+24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,
+24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,
+24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,
+25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,
+26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,
+27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,
+27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,
+29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,
+32917,32921,32912,32914,32924,33424,33423,33413,33422,
+33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,
+37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,
+20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,
+20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,
+21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,
+21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,
+21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,
+22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,
+22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,
+23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,
+23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,
+24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,
+24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,
+24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,
+25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,
+26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,
+26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,
+26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,
+27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,
+27842,27834,27843,27846,27885,27890,27858,27869,27828,
+27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,
+28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,
+29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,
+29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,
+30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,
+31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,
+33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,
+33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,
+36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,
+38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,
+20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,
+21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,
+21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,
+21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,
+22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,
+23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,
+23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,
+23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,
+24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,
+24631,24633,24660,24690,24670,24645,24659,24647,24649,
+24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,
+25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,
+25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,
+26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,
+26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,
+26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,
+26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,
+27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,
+27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,
+27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,
+27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,
+29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,
+29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,
+29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,
+30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,
+30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,
+31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,
+31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,
+32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,
+32969,32975,32983,32998,32973,33279,33313,33428,33497,
+33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,
+33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,
+34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,
+36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,
+38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,
+20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,
+20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,
+21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,
+21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,
+21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,
+22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,
+23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,
+23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,
+24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,
+24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,
+25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,
+25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,
+25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,
+26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,
+26702,26692,26676,26653,26642,26644,26662,26664,26670,
+26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,
+27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,
+27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28000,28055,
+28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,
+28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,
+28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,
+29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,
+29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,
+29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,
+30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,
+30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,
+30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,
+31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,
+31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,
+31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,
+32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,
+32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,
+33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,
+33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,
+33607,33605,33612,33619,33566,33580,33611,33575,33608,
+34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,
+34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,
+34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,
+35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,
+36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,
+37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,
+38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,
+20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,
+20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,
+21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,
+21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,
+21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,
+22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,
+22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,
+23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,
+23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,
+23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,
+23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,
+24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,
+24720,24710,24766,24752,24762,24787,24788,24783,24804,
+24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,
+25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,
+25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,
+25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,
+26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,
+26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,
+26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,
+27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,
+28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,
+28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,
+28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,
+28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,
+28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,
+29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,
+29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,
+30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,
+30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,
+31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,
+31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,
+31531,31533,31535,31538,31544,31514,31523,31892,31896,
+31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,
+32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,
+32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,
+33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,
+33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,
+33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,
+33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,
+34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,
+34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,
+34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,
+35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,
+36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,
+36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,
+37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,
+37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,
+38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,
+20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,
+20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,
+21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,
+21902,22284,22569,22583,22553,22558,22567,22563,22568,
+22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,
+22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,
+23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,
+23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,
+23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,
+23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,
+24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,
+24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,
+24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,
+25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,
+25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,
+25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,
+26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,
+26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,
+26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,
+26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,
+26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,
+27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,
+28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,
+28252,28257,28209,28200,28256,28273,28267,28217,28194,
+28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,
+28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,
+28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,
+29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,
+29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,
+30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,
+30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,
+30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,
+31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,
+31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,
+32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,
+32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,
+32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,
+33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,
+33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,
+33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,
+33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,
+33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,
+34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,
+35000,35008,35006,34998,35004,34999,35005,34994,35073,
+35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,
+35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,
+36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,
+36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,
+36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,
+37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,
+37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,
+37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,
+38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,
+38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,
+20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,
+20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,
+21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,
+21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,
+22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,
+23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,
+23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,
+23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,
+24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,
+24886,24882,24878,24902,24879,24911,24873,24896,25120,
+37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,
+25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,
+25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,
+25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,
+26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,
+27002,26952,26953,26933,26988,26931,26941,26981,26864,27000,26932,26985,26944,
+26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,
+26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,
+27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,
+28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,
+28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,
+28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,
+29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,
+28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,
+29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,
+29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,
+30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,
+30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,
+30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,
+30873,30848,30870,30843,31100,31106,31101,31097,31249,
+31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,
+31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,
+31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,
+32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,
+32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,
+26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,
+34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,
+33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,
+33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,
+33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,
+33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,
+34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,
+35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,
+35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,
+35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,
+36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,
+36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,
+36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,
+37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,
+37470,37507,37422,37450,37446,37485,37484,37455,37472,
+37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,
+37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,
+38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,
+39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,
+20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,
+20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,
+22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,
+22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,
+22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,
+23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,
+23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,
+23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,
+24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,
+24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,
+25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,
+25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,
+25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,
+27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,
+27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,
+27050,27041,27038,27097,27031,27024,27074,27061,27045,
+27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,
+28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,
+28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,
+28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,
+28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,
+29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,
+29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,
+30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,
+30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,
+31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,
+31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,
+31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,
+31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,
+32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,
+32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,
+33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,
+33972,33985,33997,33962,33946,33969,34000,33949,33959,33979,33954,33940,33991,
+33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,
+34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,
+34587,34627,34604,34625,34622,34630,34592,34610,34602,
+34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,
+34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,
+35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,
+35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,
+36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,
+37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,
+37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,
+37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,
+37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,
+38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,
+39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,
+39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,
+20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,
+21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,
+22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,
+22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,
+23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,
+23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,
+24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,
+25005,24991,24978,25002,24993,24973,24934,25011,25133,
+25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,
+25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,
+26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,
+27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,
+27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,
+27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,
+28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,
+28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,
+28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,
+29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,
+29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,
+29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,
+29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,
+30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,
+30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,
+31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,
+31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,
+32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,
+32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,
+33362,33360,33358,33361,34084,34107,34063,34048,34089,
+34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,
+34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,
+34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,
+34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,
+34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,
+34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,
+34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,
+35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,
+35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,
+36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,
+36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,
+36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,
+36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,
+37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,
+37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,
+37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,
+38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,
+38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,
+39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,
+39382,39384,39371,39383,39372,39603,39660,39659,39667,
+39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,
+39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,
+40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,
+22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,
+22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,
+23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,
+23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,
+24296,24293,24395,24508,24989,25000,24982,25029,25012,25030,25025,25036,25018,
+25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,
+25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,
+26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,
+27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,
+27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,
+27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,
+28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,
+28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,
+29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,
+29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,
+29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,
+30261,30258,30256,30395,30438,30618,30621,30625,30620,
+30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,
+30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,
+31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,
+31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,
+32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,
+32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,
+33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,
+33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,
+34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,
+34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,
+34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,
+34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,
+35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,
+35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,
+36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,
+36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,
+36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,
+37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,
+37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,
+37634,37668,37631,37673,37689,37685,37674,37652,37644,
+37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,
+38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,
+38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,
+39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,
+39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,
+40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,
+40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,
+20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,
+22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,
+23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,
+25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,
+26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,
+27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,
+27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,
+28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,
+29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,
+30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,
+30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,
+31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,
+31730,31744,31743,31739,31758,31732,31755,31731,31746,
+31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,
+32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,
+32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,
+33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,
+34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,
+34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,
+34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,
+34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,
+34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,
+35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,
+35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,
+35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,
+37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,
+37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,
+37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,
+37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,
+38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,
+38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,
+39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,
+39421,39422,39420,39427,39614,39678,39677,39681,39676,
+39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,
+40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,
+40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,
+40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,
+22169,22896,23356,23657,23658,24000,24173,24174,25048,25055,25069,25070,25073,
+25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,
+26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,
+27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,
+28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,
+29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,
+30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,
+30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,
+31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,
+32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,
+34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,
+34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,
+34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,
+34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,
+35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,
+35621,35639,35622,35638,35630,35620,35643,35645,35642,
+35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,
+36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,
+36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,
+37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,
+37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,
+38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,
+38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,
+39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,
+39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,
+39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,
+40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,
+40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,
+21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,
+23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,
+25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,
+27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,
+28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,
+29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,
+30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,
+31788,31803,31980,31978,32374,32373,32376,32368,32375,
+32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,
+33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,
+34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,
+34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,
+34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,
+35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,
+35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,
+36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,
+37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,
+37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,
+38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,
+38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,
+39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,
+39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,
+39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,
+40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,
+40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,
+40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,
+22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,
+26079,26344,26339,26340,27379,27376,27370,27368,27385,
+27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,
+28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,
+30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,
+31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,
+32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,
+34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,
+34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,
+35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,
+37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,
+37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,
+37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,
+38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,
+39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,
+39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,40000,
+39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,
+40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,
+40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,
+40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,
+23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,
+28740,28746,28744,28745,28741,28742,29213,29210,29209,
+29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,
+32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,
+34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,
+34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,
+36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,
+37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,
+38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,
+39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,
+39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,
+40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,
+40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,
+40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,
+23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,
+28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,
+31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,
+32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,
+34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,
+36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,
+37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,
+39502,39507,39508,39500,39503,39496,39498,39497,39506,
+39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,
+40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,
+40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,
+40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,
+34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,
+28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,
+34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,
+35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,
+37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,
+40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,
+40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,
+40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,
+40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,
+28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,
+34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,
+37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,
+40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,
+40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,
+26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,
+31990,32410,32408,32411,32409,33248,33249,34374,34375,
+34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,
+37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,
+40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,
+34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,
+40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,
+35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,
+40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,
+39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,
+28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,
+9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,
+9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,
+9584,9583,9619,
diff --git a/sources/android/support/src/musl-locale/codepages.h b/sources/android/support/src/musl-locale/codepages.h
index 35acd5a..ab146e8 100644
--- a/sources/android/support/src/musl-locale/codepages.h
+++ b/sources/android/support/src/musl-locale/codepages.h
@@ -4,145 +4,148 @@
 
 "iso88592\0"
 "\0\40"
-"\0\124\0\211\22\0\40\1\6\0\0\230\101\206\32\177\0\60\110\40\0\130\40\311\22"
-"\0\44\21\306\43\0\234\121\306\32\200\120\102\210\40\132\0\0\300\4\0\20\161\1\0"
-"\35\0\160\2\0\51\0\0\300\7\41\60\1\5\0\0\130\1\0\0\136\320\1\200\35"
-"\0\0\200\6\0\133\0\0\0\5\0\24\201\1\0\36\0\200\2\0\52\0\0\0\10\42\64\21\5\0"
-"\0\134\1\0\0\137\324\1\300\35\0\0\220\106\44"
+"\0\330\20\313\32\0\244\21\10\0\0\34\122\310\42\240\0\100\212\50\0\334\60\13\33"
+"\0\250\41\10\54\0\40\142\10\43\241\324\122\312\50\173\0\0\0\15\0\224\201\3\0"
+"\76\0\200\4\0\112\0\0\0\20\102\264\21\7\0\0\334\1\0\0\177\124\2\300\45"
+"\0\0\220\10\0\174\0\0\100\15\0\230\221\3\0\77\0\220\4\0\113\0\0\100\20"
+"\103\270\41\7\0\0\340\1\0\0\200\130\2\0\46\0\0\240\210\54"
 
 "iso88593\0"
 "\0\40"
-"\0\324\0\11\0\0\4\60\3\0\0\364\100\106\13\77\0\20\100\40\0\330\0\0\0"
-"\0\0\100\3\0\0\370\120\206\13\100\0\20\200\40\0\0\0\100\0\0\154\220\1\0"
-"\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\274\0\0\0\53\0\0\0\0\0\310\41\6\0\0\0\0\100\0"
-"\0\160\240\1\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\300\0\0\0\54\0\0\0\0"
-"\0\314\61\106\44"
+"\0\130\21\13\0\0\4\100\5\0\0\170\121\210\23\140\0\20\200\50\0\134\1\0\0"
+"\0\0\120\5\0\0\174\141\310\23\141\0\20\300\50\0\0\0\100\0\0\360\240\3\0"
+"\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\100\1\0\0\114\0\0\0\0\0\114\62\10\0"
+"\0\0\0\100\0\0\364\260\3\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\104\1\0\0"
+"\115\0\0\0\0\0\120\102\210\54"
 
 "iso88594\0"
 "\0\40"
-"\0\124\60\4\27\0\334\140\4\0\0\230\61\102\14\154\0\60\10\0\0\130\40\111\27"
-"\0\340\160\304\43\0\234\101\202\14\155\110\101\310\24\21\0\0\0\0\0\0\0\300\16"
-"\35\0\160\2\0\45\0\0\100\16\41\70\101\105\20\0\0\0\0\0\0\340\1\0\0\0\270\1\7\0"
-"\22\0\0\0\0\0\0\0\0\17\36\0\200\2\0\46\0\0\200\16\42\74\121\205\20\0\0\0\0\0"
-"\0\344\1\0\0\0\274\21\107\44"
+"\0\330\100\106\37\0\140\161\6\0\0\34\102\204\24\215\0\100\12\0\0\334\60\213\37"
+"\0\144\201\6\54\0\40\122\304\24\216\314\121\12\35\62\0\0\0\0\0\0\0\0\27"
+"\76\0\200\4\0\106\0\0\200\26\102\274\121\207\30\0\0\0\0\0\0\144\2\0\0"
+"\0\74\22\11\0\63\0\0\0\0\0\0\0\100\27\77\0\220\4\0\107\0\0\300\26"
+"\103\300\141\307\30\0\0\0\0\0\0\150\2\0\0\0\100\42\211\54"
 
 "iso88595\0"
 "\0\40"
-"\0\210\63\16\71\345\230\163\16\72\351\250\263\16\73\355\0\340\316\73"
-"\360\304\43\317\74\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77"
-"\0\5\44\320\100\4\25\144\320\101\10\45\244\320\102\14\65\344\320\103"
-"\20\105\44\321\104\24\125\144\321\105\30\145\244\321\106\34\165\344\321\107"
-"\40\205\44\322\110\44\225\144\322\111\50\245\244\322\112\54\265\344\322\113"
-"\65\302\24\223\114\63\321\124\223\115\67\341\224\223\116\73\15\300\123\117"
+"\0\14\104\120\101\6\35\204\120\102\12\55\304\120\103\16\1\360\20\104"
+"\21\111\64\21\105\25\131\164\21\106\31\151\264\21\107\35\171\364\21\110"
+"\41\211\64\22\111\45\231\164\22\112\51\251\264\22\113\55\271\364\22\114"
+"\61\311\64\23\115\65\331\164\23\116\71\351\264\23\117\75\371\364\23\120"
+"\101\11\65\24\121\105\31\165\24\122\111\51\265\24\123\115\71\365\24\124"
+"\127\106\45\325\124\124\125\145\325\125\130\145\245\325\126\134\15\320\225\127"
 
 "iso88596\0"
 "\0\40"
-"\0\4\20\100\0\0\4\20\100\0\1\4\20\100\0\163\1\20\100\0\1\4\20\100\0"
-"\1\4\20\100\0\1\4\20\0\135\1\4\20\100\135\1\330\165\27\136\171\351\265\27\137"
-"\175\371\365\27\140\201\11\66\30\141\205\31\166\30\142\211\51\266\30\143"
-"\215\71\366\130\0\1\4\20\100\0\220\105\46\331\144\224\125\146\331\145"
-"\230\145\246\331\146\234\165\346\331\147\240\205\46\132\0\1\4\20\100\0"
-"\1\4\20\100\0\1\4\20\100\0"
+"\0\4\20\100\0\0\4\20\100\0\1\4\20\100\0\224\1\20\100\0\1\4\20\100\0"
+"\1\4\20\100\0\1\4\20\100\145\1\4\20\200\145\1\134\206\131\146"
+"\232\155\306\131\147\236\175\6\132\150\242\215\106\132\151\246\235\206\132\152"
+"\252\255\306\132\153\256\275\6\133\0\1\4\20\100\0\261\311\66\33\155"
+"\265\331\166\33\156\271\351\266\33\157\275\371\366\33\160\301\11\67\134\0"
+"\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0"
 
 "iso88597\0"
 "\0\40"
-"\0\220\130\42\0\63\322\10\0\0\0\0\240\11\0\0\0\20\200\210\0\0\0\0\0"
-"\233\160\322\11\0\236\174\2\12\0\241\0\40\312\50\244\224\142\312\51"
-"\250\244\242\312\52\254\264\342\312\53\260\304\42\313\54\264\324\22\200\55"
-"\267\340\222\213\56\273\360\322\213\57\277\0\23\214\60\303\20\123\214\61"
-"\307\40\223\214\62\313\60\323\214\63\317\100\23\215\64\323\120\123\215\65"
-"\327\140\223\215\66\333\160\323\215\67\337\200\23\116\0"
+"\0\24\151\44\0\124\126\11\0\0\0\0\260\13\0\0\0\20\300\220\0\0\0\0\0"
+"\274\364\342\13\0\277\0\23\14\0\302\0\60\14\61\305\30\163\14\62"
+"\311\50\263\14\63\315\70\363\14\64\321\110\63\15\65\325\130\23\300\65"
+"\330\144\243\315\66\334\164\343\315\67\340\204\43\316\70\344\224\143\316\71"
+"\350\244\243\316\72\354\264\343\316\73\360\304\43\317\74\364\324\143\317\75"
+"\370\344\243\317\76\374\364\343\317\77\0\5\44\120\0"
 
 "iso88598\0"
 "\0\40"
 "\0\4\0\0\0\0\0\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0"
 "\0\0\0\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0\1\4\20\100\0"
-"\1\4\20\100\0\1\4\20\100\0\1\4\20\300\210\123\121\125\225\125"
-"\127\141\225\225\126\133\161\325\225\127\137\201\25\226\130"
-"\143\221\125\226\131\147\241\225\226\132\153\261\325\126\0\1\170\370\141\0"
+"\1\4\20\100\0\1\4\20\100\0\1\4\20\0\221\164\325\145\327\135"
+"\170\345\245\327\136\174\365\345\327\137\200\5\46\330\140\204\25\146\330\141"
+"\210\45\246\330\142\214\65\346\130\0\1\374\10\144\0"
 
 "iso88599\0"
 "\0\120"
-"\55\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\364\100\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\56\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\370\120\6\0"
+"\116\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\170\121\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+"\0\0\0\0\0\117\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\174\141\10\0"
 
 "iso885910\0"
 "\0\40"
-"\0\124\60\102\14\71\334\20\4\0\106\204\140\6\33\203\0\0\207\24"
-"\0\130\100\202\14\72\340\40\4\0\107\210\160\106\33\204\210\30\307\24"
-"\21\0\0\0\0\0\0\0\300\16\35\0\160\2\0\45\0\0\0\0\0\70\101\5\0\0\0\0\200\33"
-"\0\340\1\0\0\0\0\0\0\0\22\0\0\0\0\0\0\0\0\17\36\0\200\2\0\46\0\0\0\0"
-"\0\74\121\5\0\0\0\0\300\33\0\344\1\0\0\0\0\0\300\20"
+"\0\330\100\204\24\132\140\41\6\0\147\10\161\110\43\244\0\20\311\34"
+"\0\334\120\304\24\133\144\61\6\0\150\14\201\210\43\245\14\51\11\35\62\0\0\0\0"
+"\0\0\0\0\27\76\0\200\4\0\106\0\0\0\0\0\274\121\7\0\0\0\0\300\43\0\144\2\0\0"
+"\0\0\0\0\0\63\0\0\0\0\0\0\0\100\27\77\0\220\4\0\107\0\0\0\0\0\300\141\7\0"
+"\0\0\0\0\44\0\150\2\0\0\0\0\0\0\31"
 
 "iso885911\0"
 "tis620\0"
 "\0\40"
-"\0\274\6\133\154\262\315\106\133\155\266\335\206\133\156\272\355\306\133\157"
-"\276\375\6\134\160\302\15\107\134\161\306\35\207\134\162\312\55\307\134\163"
-"\316\75\7\135\164\322\115\107\135\165\326\135\207\135\166\332\155\307\135\167"
-"\336\175\7\136\170\342\215\107\136\171\346\235\207\136\0\1\4\20\100\172"
-"\352\255\307\136\173\356\275\7\137\174\362\315\107\137\175\366\335\207\137\176"
-"\372\355\307\137\177\376\375\7\140\200\2\16\110\140\201\1\4\20\100\0"
+"\0\100\27\235\164\323\121\127\235\165\327\141\227\235\166\333\161\327\235\167"
+"\337\201\27\236\170\343\221\127\236\171\347\241\227\236\172"
+"\353\261\327\236\173\357\301\27\237\174\363\321\127\237\175"
+"\367\341\227\237\176\373\361\327\237\177\377\1\30\240\200\3\22\130\240\201"
+"\7\42\230\140\0\1\4\20\200\202\13\62\330\240\203\17\102\30\241\204"
+"\23\122\130\241\205\27\142\230\241\206\33\162\330\241\207\37\202\30\242\210"
+"\43\222\130\242\211\1\4\20\100\0"
 
 "iso885913\0"
 "\0\40"
-"\0\240\10\0\0\0\244\10\0\0\15\0\300\5\0\0\0\0\300\2\0\0\0\0\0\47\2\0\0\0"
-"\20\0\320\5\0\0\0\0\200\3\25\354\20\301\5\0\0\160\302\10\35\0\360\107\11"
-"\61\4\221\203\21\146\60\341\4\0\124\0\0\0\0\170\50\1\6\34\0\4\62\10\0"
-"\26\360\40\1\6\0\0\200\2\11\36\0\0\210\11\62\10\241\303\21\147\64\361\4\0"
-"\125\0\0\0\0\171\54\21\106\34\0\10\102\110\211"
+"\0\44\11\0\0\0\50\11\0\0\15\0\320\7\0\0\0\0\300\2\0\0\0\0\0\110\2\0\0\0"
+"\20\0\340\7\0\0\0\0\200\3\66\160\41\3\16\0\0\200\4\21\76\0\0\212\21"
+"\122\210\241\305\31\207\264\361\6\0\165\0\0\0\0\231\254\21\110\44"
+"\0\210\102\12\0\67\164\61\103\16\0\0\220\104\21\77\0\20\312\21"
+"\123\214\261\5\32\210\270\1\7\0\166\0\0\0\0\232\260\41\210\44"
+"\0\214\122\212\221"
 
 "iso885914\0"
 "\0\40"
-"\0\30\170\40\0\33\160\200\40\0\24\2\140\141\202\32\2\0\200\37\12\56\370\2\14"
-"\14\66\10\200\203\25\76\170\41\204\33\142\230\141\204\0\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\172\0\0\0\0\0\0\0\200\204\0\0\0\0\0\0\0\300\7\0\0\0\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\173\0\0\0\0\0\0\0\300\204\0\0\0\0\0\0\0\320\7\0"
+"\0\234\210\42\0\74\364\220\42\0\65\2\160\243\212\73\2\0\300\47"
+"\53\262\10\105\24\55\272\10\300\213\66\302\210\143\214\74\346\250\243\214"
+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\233\0\0\0\0\0\0\0\300\214\0\0\0\0\0"
+"\0\0\320\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\234\0\0\0\0\0\0\0\0\215"
+"\0\0\0\0\0\0\0\340\11\0"
 
 "iso885915\0"
 "latin9\0"
 "\0\44"
-"\63\2\140\6\0\147\0\0\0\0\0\0\0\0\0\0\0\0\0\0\203\0\0\0\0\204\0\0\0\0"
-"\130\144\341\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+"\124\2\160\10\0\210\0\0\0\0\0\0\0\0\0\0\0\0\0\0\244\0\0\0\0\245\0\0\0\0"
+"\171\350\361\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 
 "iso885916\0"
 "\0\40"
-"\0\124\140\201\22\63\246\150\6\0\147\0\240\10\0\177\0\0\110\40\0\0\320\301\22"
-"\203\240\10\0\0\204\170\260\10\0\130\144\341\207\40\0\0\0\300\4\0\134\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\41\60\1\0\0\0\130\1\0\30\166\0\0\0\0\0\234\300\10\0"
-"\0\0\0\0\5\0\140\0\0\0\0\0\0\0\0\0\0\0\0\0\42\64\1\0\0\0\134\1\100\30"
-"\167\0\0\0\0\0\240\320\10\0"
+"\0\330\160\303\32\124\52\171\10\0\210\0\260\12\0\240\0\20\212\50\0\0\340\3\33"
+"\244\44\11\0\0\245\374\300\12\0\171\350\361\311\50\0\0\0\0\15\0\340\0\0\0"
+"\0\0\0\0\0\0\0\0\0\0\102\264\1\0\0\0\334\1\100\40\227\0\0\0\0\0\40\321\12\0"
+"\0\0\0\100\15\0\344\0\0\0\0\0\0\0\0\0\0\0\0\0\103\270\1\0\0\0\340\1\200\40"
+"\230\0\0\0\0\0\44\341\12\0"
 
 "cp1250\0"
 "windows1250\0"
 "\0\0"
-"\63\6\140\142\0\51\266\250\342\212\1\270\150\306\213\140\250\61\310\37"
-"\1\220\130\342\211\50\262\10\142\210\1\330\170\6\214\141\254\101\10\40"
-"\0\74\2\211\22\0\124\0\0\0\0\0\100\6\0\0\0\0\100\40\0\0\40\311\22\0\0\0\0\0"
-"\0\130\120\6\0\110\120\222\204\40\132\0\0\300\4\0\20\161\1\0\35\0\160\2\0"
-"\51\0\0\300\7\41\60\1\5\0\0\130\1\0\0\136\320\1\200\35\0\0\200\6\0\133\0\0\0\5"
-"\0\24\201\1\0\36\0\200\2\0\52\0\0\0\10\42\64\21\5\0\0\134\1\0\0"
-"\137\324\1\300\35\0\0\220\106\44"
+"\124\6\160\144\0\112\72\271\44\223\1\74\171\10\224\201\54\102\12\50"
+"\1\24\151\44\222\111\66\31\244\220\1\140\211\110\224\202\60\122\112\50"
+"\0\300\22\313\32\0\330\0\0\0\0\0\120\10\0\0\0\0\200\50\0\0\60\13\33\0\0\0\0\0"
+"\0\334\140\10\0\151\324\242\306\50\173\0\0\0\15\0\224\201\3\0\76\0\200\4\0"
+"\112\0\0\0\20\102\264\21\7\0\0\334\1\0\0\177\124\2\300\45\0\0\220\10\0"
+"\174\0\0\100\15\0\230\221\3\0\77\0\220\4\0\113\0\0\100\20\103\270\41\7\0"
+"\0\340\1\0\0\200\130\2\0\46\0\0\240\210\54"
 
 "cp1251\0"
 "windows1251\0"
 "\0\0"
-"\343\220\143\242\114\51\266\250\342\212\63\272\250\316\213\353\264\303\316\73"
-"\61\221\130\342\211\50\262\10\142\210\1\330\210\23\214\71\355\244\123\117"
-"\0\270\303\123\72\0\370\4\0\0\342\0\120\16\0\0\0\0\0\72\0\0\160\116\115"
-"\77\1\0\0\0\60\325\70\23\0\67\231\103\223\115\360\304\43\317\74"
-"\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77\0\5\44\320\100"
-"\4\25\144\320\101\10\45\244\320\102\14\65\344\320\103\20\105\44\321\104"
-"\24\125\144\321\105\30\145\244\321\106\34\165\344\321\107\40\205\44\322\110"
-"\44\225\144\322\111\50\245\244\322\112\54\265\344\322\113"
+"\4\25\164\344\124\112\72\271\44\223\124\76\271\20\224\14\71\324\20\104"
+"\122\25\151\44\222\111\66\31\244\220\1\140\231\125\224\132\161\265\225\127"
+"\0\74\324\225\102\0\174\5\0\0\3\1\140\20\0\0\0\0\100\102\0\0\200\220\125"
+"\140\1\0\0\0\121\135\111\25\0\130\35\124\325\125\21\111\64\21\105"
+"\25\131\164\21\106\31\151\264\21\107\35\171\364\21\110\41\211\64\22\111"
+"\45\231\164\22\112\51\251\264\22\113\55\271\364\22\114\61\311\64\23\115"
+"\65\331\164\23\116\71\351\264\23\117\75\371\364\23\120\101\11\65\24\121"
+"\105\31\165\24\122\111\51\265\24\123\115\71\365\24\124"
 
 "cp1252\0"
 "windows1252\0"
 "\0\0"
-"\63\6\140\142\41\51\266\250\342\212\216\270\150\306\213\130\4\60\110\0"
-"\1\220\130\342\211\50\262\10\142\210\223\330\170\6\214\131\4\100\210\37"
+"\124\6\160\244\51\112\72\271\44\223\257\74\171\10\224\171\4\100\112\0"
+"\1\24\151\44\222\111\66\31\244\220\264\140\211\110\224\172\4\120\312\47"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -151,88 +154,112 @@
 "cp1253\0"
 "windows1253\0"
 "\0\0"
-"\63\6\140\142\41\51\266\250\342\212\1\270\30\300\213\1\4\20\100\0"
-"\1\220\130\342\211\50\262\10\142\210\1\330\30\0\214\1\4\20\100\0"
-"\0\160\322\11\0\0\0\0\0\0\0\0\20\0\0\0\0\0\200\210\0\0\0\0\0\233\0\0\0\0"
-"\236\174\2\12\0\241\0\40\312\50\244\224\142\312\51\250\244\242\312\52"
-"\254\264\342\312\53\260\304\42\313\54\264\324\22\200\55\267\340\222\213\56"
-"\273\360\322\213\57\277\0\23\214\60\303\20\123\214\61\307\40\223\214\62"
-"\313\60\323\214\63\317\100\23\215\64\323\120\123\215\65\327\140\223\215\66"
-"\333\160\323\215\67\337\200\23\116\0"
+"\124\6\160\244\51\112\72\271\44\223\1\74\31\0\224\1\4\20\100\0\1\24\151\44\222"
+"\111\66\31\244\220\1\140\31\100\224\1\4\20\100\0\0\364\342\13\0\0\0\0\0\0"
+"\0\0\20\0\0\0\0\0\300\220\0\0\0\0\0\274\0\0\0\0\277\0\23\14\0\302\0\60\14\61"
+"\305\30\163\14\62\311\50\263\14\63\315\70\363\14\64\321\110\63\15\65"
+"\325\130\23\300\65\330\144\243\315\66\334\164\343\315\67\340\204\43\316\70"
+"\344\224\143\316\71\350\244\243\316\72\354\264\343\316\73\360\304\43\317\74"
+"\364\324\143\317\75\370\344\243\317\76\374\364\343\317\77\0\5\44\120\0"
 
 "cp1254\0"
 "windows1254\0"
 "\0\0"
-"\63\6\140\142\41\51\266\250\342\212\216\270\150\306\213\130\4\20\100\0"
-"\1\220\130\342\211\50\262\10\142\210\223\330\170\6\214\131\4\20\200\37"
+"\124\6\160\244\51\112\72\271\44\223\257\74\171\10\224\171\4\20\100\0"
+"\1\24\151\44\222\111\66\31\244\220\264\140\211\110\224\172\4\20\300\47"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\55\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\0\364\100\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\56\0\0\0\0"
-"\0\0\0\0\0\0\0\0\0\0\0\370\120\6\0"
+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\116\0\0\0\0\0\0\0\0\0"
+"\0\0\0\0\0\0\170\121\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\117\0\0\0\0"
+"\0\0\0\0\0\0\0\0\0\0\0\174\141\10\0"
 
 "cp1255\0"
 "windows1255\0"
 "\0\0"
-"\63\6\140\142\41\51\266\250\342\212\216\270\30\300\213\1\4\20\100\0"
-"\1\220\130\342\211\50\262\10\142\210\223\330\30\0\214\1\4\20\100\0\0\0\0\0\0"
-"\61\2\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\0\0\0\0\0"
-"\100\5\45\324\120\104\25\145\324\121\110\45\25\200\122\113\61\325\224\123"
-"\117\101\25\225\124\156\275\5\127\134\162\5\20\100\0\1\4\20\100\0"
-"\123\121\125\225\125\127\141\225\225\126\133\161\325\225\127"
-"\137\201\25\226\130\143\221\125\226\131\147\241\225\226\132\153\261\325\126\0"
-"\1\170\370\141\0"
+"\124\6\160\244\51\112\72\271\44\223\257\74\31\0\224\1\4\20\100\0"
+"\1\24\151\44\222\111\66\31\244\220\264\140\31\100\224\1\4\20\100\0\0\0\0\0\0"
+"\122\2\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\0\0\0\0\0"
+"\141\211\65\26\131\145\231\165\26\132\151\251\25\300\132\154\265\345\326\133"
+"\160\305\45\327\134\217\101\26\231\144\223\5\20\100\0\1\4\20\100\0"
+"\164\325\145\327\135\170\345\245\327\136\174\365\345\327\137\200\5\46\330\140"
+"\204\25\146\330\141\210\45\246\330\142\214\65\346\130\0\1\374\10\144\0"
 
 "cp1256\0"
 "windows1256\0"
 "\0\0"
-"\63\222\146\142\41\51\266\250\342\212\216\270\70\332\213\130\224\206\232\151"
-"\252\221\130\342\211\50\262\10\142\210\251\331\170\32\214\131\160\330\341\152"
-"\0\314\5\0\0\0\0\0\0\0\0\0\300\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\100\27\0"
-"\0\0\0\100\135\255\331\165\27\136\171\351\265\27\137\175\371\365\27\140"
-"\201\11\66\30\141\205\31\166\30\142\211\51\266\30\0\214\65\346\330\143"
-"\220\105\46\331\144\0\120\6\100\145\226\135\206\31\0\0\0\0\0\0\231\151\6\0\0"
-"\233\161\326\231\147\0\174\6\32\0\241\1\40\32\0\0\170\370\241\153"
+"\124\26\167\244\51\112\72\271\44\223\257\74\111\34\224\171\30\227\334\161"
+"\313\25\151\44\222\111\66\31\244\220\312\141\211\134\224\172\364\350\43\163"
+"\0\120\6\0\0\0\0\0\0\0\0\0\320\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\120\31\0"
+"\0\0\0\200\145\316\135\206\131\146\232\155\306\131\147\236\175\6\132\150"
+"\242\215\106\132\151\246\235\206\132\152\252\255\306\32\0\255\271\366\32\154"
+"\261\311\66\33\155\0\324\6\200\155\267\341\226\33\0\0\0\0\0\0\272\355\6\0\0"
+"\274\365\346\333\157\0\0\27\34\0\302\1\60\34\0\0\374\10\344\163"
 
 "cp1257\0"
 "windows1257\0"
 "\0\0"
-"\63\6\140\142\0\51\266\250\342\212\1\270\30\300\213\1\20\360\210\2"
-"\1\220\130\342\211\50\262\10\142\210\1\330\30\0\214\1\30\40\111\0\0\4\0\0\0"
-"\0\4\0\0\0\15\0\300\5\0\0\0\0\300\2\0\0\0\0\0\0\0\0\0\0\20\0\320\5\0"
-"\0\0\0\200\3\25\354\20\301\5\0\0\160\302\10\35\0\360\107\11\61\4\221\203\21"
-"\146\60\341\4\0\124\0\0\0\0\170\50\1\6\34\0\4\62\10\0\26\360\40\1\6"
-"\0\0\200\2\11\36\0\0\210\11\62\10\241\303\21\147\64\361\4\0\125\0\0\0\0"
-"\171\54\21\106\34\0\10\102\110\44"
+"\124\6\160\144\0\112\72\271\44\223\1\74\31\0\224\1\20\0\213\2\1\24\151\44\222"
+"\111\66\31\244\220\1\140\31\100\224\1\30\60\113\0\0\4\0\0\0\0\4\0\0\0"
+"\15\0\320\7\0\0\0\0\300\2\0\0\0\0\0\0\0\0\0\0\20\0\340\7\0\0\0\0\200\3"
+"\66\160\41\3\16\0\0\200\4\21\76\0\0\212\21\122\210\241\305\31\207\264\361\6\0"
+"\165\0\0\0\0\231\254\21\110\44\0\210\102\12\0\67\164\61\103\16\0\0\220\104\21"
+"\77\0\20\312\21\123\214\261\5\32\210\270\1\7\0\166\0\0\0\0\232\260\41\210\44"
+"\0\214\122\212\54"
 
 "cp1258\0"
 "windows1258\0"
 "\0\0"
-"\63\6\140\142\41\51\266\250\342\212\216\270\30\300\213\130\4\20\100\0"
-"\1\220\130\342\211\50\262\10\142\210\223\330\30\0\214\131\4\20\200\37"
+"\124\6\160\244\51\112\72\271\44\223\257\74\31\0\224\171\4\20\100\0"
+"\1\24\151\44\222\111\66\31\244\220\264\140\31\100\224\172\4\20\300\47"
 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-"\0\0\0\0\0\0\0\0\300\4\0\0\0\0\0\0\0\0\0\0\225\0\0\0\0\41\0\200\11\0"
-"\0\30\2\0\0\0\0\0\0\0\0\40\162\11\0\0\0\0\0\5\0\0\0\0\0\0\0\0\0\0\226\0\0\0\0"
-"\42\0\220\11\0\0\34\2\0\0\0\0\0\0\0\0\44\42\43\0"
+"\0\0\0\0\0\0\0\0\0\15\0\0\0\0\0\0\0\0\0\0\266\0\0\0\0\102\0\220\13\0"
+"\0\234\2\0\0\0\0\0\0\0\0\244\202\13\0\0\0\0\100\15\0\0\0\0\0\0\0\0\0\0"
+"\267\0\0\0\0\103\0\240\13\0\0\240\2\0\0\0\0\0\0\0\0\250\62\45\0"
 
 "koi8r\0"
 "\0\0"
-"\76\376\10\144\220\102\16\111\144\221\106\36\211\244\231\147\242\231\246\232"
-"\153\262\331\46\217\156\336\210\143\216\72\356\50\100\217\7\40\220\300\3"
-"\111\52\271\44\114\114\66\351\344\223\120\106\51\345\224\124\126\151\345\225"
-"\130\146\251\245\70\133\162\331\245\227\137\202\31\246\230\143\222\131\146\1"
-"\56\101\24\221\111\24\125\104\322\104\45\141\224\221\106\33\161\324\221\107"
-"\37\275\4\122\110\42\215\144\221\104\54\255\164\21\112\55\245\164\222\112"
-"\16\301\23\217\101\364\324\103\320\74\5\341\223\217\76\373\360\323\217\77"
-"\377\74\4\120\100\2\15\144\217\74\14\55\164\17\102\15\45\164\220\102"
+"\140\206\51\346\230\144\226\151\346\231\150\246\251\46\242\211\52\272\50\243"
+"\215\72\372\250\227\220\146\251\345\226\134\166\51\300\227\7\40\220\300\3"
+"\153\262\331\146\124\156\276\11\147\234\162\316\111\147\235"
+"\166\336\211\147\236\172\356\311\347\100\175\372\371\47\240\201\12\72\50\241"
+"\205\32\172\150\1\117\305\44\323\121\65\331\124\24\115\106\345\244\323\116"
+"\74\365\344\323\117\100\101\25\224\120\103\21\165\323\114\115\61\205\123\122"
+"\116\51\205\324\122\57\105\44\321\111\25\131\124\22\105\46\145\244\321\106"
+"\34\165\344\321\107\40\301\24\222\110\43\221\164\321\104\55\261\204\121\112"
+"\56\251\204\322\112"
 
 "koi8u\0"
 "\0\0"
-"\76\376\10\144\220\102\16\111\144\221\106\36\211\244\231\147\242\231\246\232"
-"\153\262\331\46\217\156\336\210\143\216\72\356\50\100\217\7\40\220\300\3"
-"\111\52\271\44\114\63\65\131\223\115\120\106\51\345\224\124\376\144\345\225"
-"\130\146\251\245\70\345\160\171\16\72\137\202\31\246\230\143\372\124\146\1"
-"\56\101\24\221\111\24\125\104\322\104\45\141\224\221\106\33\161\324\221\107"
-"\37\275\4\122\110\42\215\144\221\104\54\255\164\21\112\55\245\164\222\112"
-"\16\301\23\217\101\364\324\103\320\74\5\341\223\217\76\373\360\323\217\77"
-"\377\74\4\120\100\2\15\144\217\74\14\55\164\17\102\15\45\164\220\102"
+"\140\206\51\346\230\144\226\151\346\231\150\246\251\46\242\211\52\272\50\243"
+"\215\72\372\250\227\220\146\251\345\226\134\166\51\300\227\7\40\220\300\3"
+"\153\262\331\146\124\124\275\151\325\125\162\316\111\147\235"
+"\166\202\205\147\236\172\356\311\347\100\6\371\211\120\102\201\12\72\50\241"
+"\205\176\165\150\1\117\305\44\323\121\65\331\124\24\115\106\345\244\323\116"
+"\74\365\344\323\117\100\101\25\224\120\103\21\165\323\114\115\61\205\123\122"
+"\116\51\205\324\122\57\105\44\321\111\25\131\124\22\105\46\145\244\321\106"
+"\34\165\344\321\107\40\301\24\222\110\43\221\164\321\104\55\261\204\121\112"
+"\56\251\204\322\112"
+
+"cp437\0"
+"\0\0"
+"\27\300\100\202\7\37\164\0\202\10\45\230\60\102\12\50\234\100\101\5"
+"\30\70\260\300\12\54\250\360\202\13\61\144\300\101\4\22\114\140\245\51"
+"\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
+"\215\72\372\150\230\147\362\331\147\234\160\372\311\246\234"
+"\170\336\151\347\230\144\246\211\246\231\140\252\231\247\236"
+"\165\276\111\150\240\173\256\171\250\240\203\376\11\50\235\163\266\351\246\241"
+"\205\226\51\246\242\211\56\312\50\242\345\104\212\14\75\327\334\23\51\76"
+"\332\64\323\15\72\221\352\223\116\244\221\106\332\45\227\136\176\371\300\226"
+"\7\144\231\200\226\221\42\0\251\0"
+
+"cp850\0"
+"\0\0"
+"\27\300\100\202\7\37\164\0\202\10\45\230\60\102\12\50\234\100\101\5"
+"\30\70\260\300\12\54\250\360\202\13\61\144\300\1\4\22\64\300\200\51"
+"\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
+"\215\72\372\150\230\147\106\32\151\244\5\370\311\246\234\170\106\60\301\230"
+"\144\246\211\246\231\140\252\31\151\244\165\276\111\150\240"
+"\173\256\171\150\244\221\106\32\151\244\221\176\21\151\244\221\226\51\246\242"
+"\211\106\32\51\242\221\106\32\151\244\221\106\32\151\244\221\106\32\151\244"
+"\221\106\152\100\244\221\106\112\144\244\221\16\360\200\2\7\20\220\100\244"
+"\221\42\0\251\0"
 
diff --git a/sources/android/support/src/musl-locale/hkscs.h b/sources/android/support/src/musl-locale/hkscs.h
new file mode 100644
index 0000000..d356517
--- /dev/null
+++ b/sources/android/support/src/musl-locale/hkscs.h
@@ -0,0 +1,390 @@
+17392,19506,17923,17830,17784,29287,19831,17843,31921,19682,31941,15253,18230,
+18244,19527,19520,17087,13847,29522,28299,28882,19543,41809,18255,17882,19589,
+31852,19719,19108,18081,27427,29221,23124,6755,15878,16225,26189,22267,0,
+32149,22813,35769,15860,38708,31727,23515,7518,23204,13861,40624,23249,23479,
+23804,26478,34195,39237,29793,29853,14453,7507,13982,24609,16108,22750,15093,
+31484,40855,16737,35085,12778,2698,12894,17162,33924,40854,37935,18736,34323,
+22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,
+36934,13542,29636,23993,29894,40903,22451,18735,21580,16689,13966,22552,31346,
+31589,35727,18094,28296,16769,23961,31662,9404,40904,9409,9417,9420,40905,
+34052,13755,16564,40906,17633,44543,25281,28782,40907,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12736,12737,12738,12739,12740,268,12741,
+209,205,12742,12743,203,8168,12744,202,12745,12746,12747,12748,270,12749,
+12750,256,193,461,192,274,201,282,200,332,211,465,210,56320,7870,56324,7872,
+202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,
+250,468,249,470,472,474,476,252,56328,7871,56332,7873,234,609,9178,9179,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41897,4421,0,25866,0,0,20029,28381,
+40270,37343,0,0,30517,25745,20250,20264,20392,20822,20852,20892,20964,21153,
+21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,
+23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,
+32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,
+36711,36718,29713,31996,32205,26950,31433,21031,0,0,0,0,37260,30904,37214,
+32956,0,36107,33014,2535,0,0,32927,40647,19661,40393,40460,19518,40438,28686,
+40458,41267,13761,0,28314,33342,29977,0,18705,39532,39567,40857,31111,33900,
+7626,1488,10982,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,
+20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,
+21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,
+21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,
+32132,21797,0,3138,3349,20779,21904,11462,14828,833,36422,19896,38117,16467,
+32958,30586,11320,14900,18389,33117,27122,19946,25821,3452,4020,3285,4340,
+25741,36478,3734,3083,3940,11433,33366,17619,0,3398,39501,33001,18420,
+20135,11458,39602,14951,38388,16365,13574,21191,38868,30920,11588,40302,38933,
+0,17369,24741,25780,21731,11596,11210,4215,14843,4207,26330,26390,31136,25834,
+20562,3139,36456,8609,35660,1841,0,18443,425,16378,22643,11661,0,17864,1276,
+24727,3916,3478,21881,16571,17338,0,19124,10854,4253,33194,39157,3484,25465,
+14846,10101,36288,22177,25724,15939,0,42497,3593,10959,11465,0,4296,14786,
+14738,14854,33435,13688,24137,8391,22098,3889,11442,38688,13500,27709,20027,0,
+0,30068,11915,8712,42587,36045,3706,3124,26652,32659,4303,10243,10553,13819,
+20963,3724,3981,3754,16275,3888,3399,4431,3660,0,3755,2985,3400,4288,4413,
+16377,9878,25650,4013,13300,30265,11214,3454,3455,11345,11349,14872,3736,4295,
+3886,42546,27472,36050,36249,36042,38314,21708,33476,21945,0,40643,39974,
+39606,30558,11758,28992,33133,33004,23580,25970,33076,14231,21343,32957,37302,
+3834,3599,3703,3835,13789,19947,13833,3286,22191,10165,4297,3600,3704,4216,
+4424,33287,5205,3705,20048,11684,23124,4125,4126,4341,4342,22428,3601,30356,
+33485,4021,3707,20862,14083,4022,4480,21208,41661,18906,6202,16759,33404,
+22681,21096,13850,22333,31666,23400,18432,19244,40743,18919,39967,39821,23412,
+12605,22011,13810,22153,20008,22786,7105,63608,38737,134,20059,20155,13630,
+23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,
+18665,32594,31035,31993,32595,25194,13505,0,25419,32770,32896,26130,26961,
+21341,34916,35265,30898,35744,36125,38021,38264,38271,38376,
+36367,38886,39029,39118,39134,39267,38928,40060,40479,40644,27503,63751,20023,
+135,38429,25143,38050,0,20539,28158,40051,40870,15817,34959,16718,28791,23797,
+19232,20941,13657,23856,24866,35378,36775,37366,29073,26393,29626,12929,41223,
+15499,6528,19216,30948,29698,20910,34575,16393,27235,41658,16931,34319,2671,
+31274,39239,35562,38741,28749,21284,8318,37876,30425,35299,40871,30685,20131,
+20464,20668,20015,20247,40872,21556,32139,22674,22736,7606,24210,24217,24514,
+10002,25995,13305,26905,27203,15459,27903,0,29184,17669,29580,16091,18963,
+23317,29881,35715,23716,22165,31379,31724,31939,32364,33528,34199,40873,34960,
+40874,36537,40875,36815,34143,39392,37409,40876,36281,5183,16497,17058,23066,
+0,0,0,39016,26475,17014,22333,0,34262,18811,33471,28941,19585,28020,23931,
+27413,28606,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,12886,
+10134,17306,17718,0,23765,15130,35577,23672,15634,13649,23928,40882,29015,
+17752,16620,7715,19575,14712,13386,420,27713,35532,20404,569,22975,33132,
+38998,39162,24379,2975,0,8641,35181,16642,18107,36985,16135,40883,41397,16632,
+14294,18167,27718,16764,34482,29695,17773,14548,21658,17761,17691,19849,19579,
+19830,17898,16328,19215,13921,17630,17597,16877,23870,23880,23894,15868,14351,
+23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,
+24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,
+14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,
+26111,26195,15090,26258,15138,
+26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,
+26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,
+27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,
+28033,15599,28068,28081,28181,28184,28201,28294,35264,28347,28386,28378,40831,
+28392,28393,28452,28468,15686,16193,28545,28606,15722,15733,29111,23705,15754,
+28716,15761,28752,28756,28783,28799,28809,805,17345,13809,3800,16087,22462,
+28371,28990,22496,13902,27042,35817,23412,31305,22753,38105,31333,31357,22956,
+31419,31408,31426,31427,29137,25741,16842,31450,31453,31466,16879,21682,23553,
+31499,31573,31529,21262,23806,31650,31599,33692,23476,27775,31696,33825,31634,
+0,23840,15789,23653,33938,31738,0,31797,23745,31812,31875,18562,31910,26237,
+17784,31945,31943,31974,31860,31987,31989,0,32359,17693,28228,32093,28374,
+29837,32137,32171,28981,32179,0,16471,24617,32228,15635,32245,6137,32229,
+33645,0,24865,24922,32366,32402,17195,37996,32295,32576,32577,32583,31030,
+25296,39393,32663,25425,32675,5729,104,17756,14182,17667,33594,32762,25737,0,
+32776,32797,0,32815,41095,27843,32827,32828,32865,10004,18825,26150,15843,
+26344,26405,32935,35400,33031,33050,22704,9974,27775,25752,20408,25831,5258,
+33304,6238,27219,19045,19093,17530,33321,2829,27218,15742,20473,5373,34018,
+33634,27402,18855,13616,6003,15864,33450,26907,63892,16859,34123,33488,33562,
+3606,6068,14017,12669,13658,33403,33506,33560,16011,28067,27397,27543,13774,
+15807,33565,21996,33669,17675,28069,33708,
+0,33747,13438,28372,27223,34138,13462,28226,12015,33880,23524,33905,15827,
+17636,27303,33866,15541,31064,0,27542,28279,28227,34014,0,33681,17568,33939,
+34020,23697,16960,23744,17731,34100,23282,28313,17703,34163,17686,26559,34326,
+34341,34363,34241,28808,34306,5506,28877,63922,17770,34344,13896,6306,21495,
+29594,34430,34673,41208,34798,11303,34737,34778,34831,22113,34412,26710,17935,
+34885,34886,30176,15801,30180,34910,34972,18011,34996,34997,25537,35013,30583,
+30479,35207,35210,0,0,35239,35260,35365,35303,31012,31421,35484,30611,37374,
+35472,31321,31465,31546,16271,18195,31544,29052,35596,35615,21552,21861,35647,
+35660,35661,35497,19066,35728,35739,35503,5855,17941,34895,35995,32084,32143,
+63956,14117,32083,36054,32152,32189,36114,36099,6416,36059,28764,36113,19657,
+16080,0,36265,32770,4116,18826,15228,33212,28940,31463,36525,36534,36547,
+37588,36633,36653,33637,33810,36773,37635,41631,2640,36787,18730,35294,34109,
+15803,24312,12898,36857,40980,34492,34049,8997,14720,28375,36919,34108,31422,
+36961,34156,34315,37032,34579,37060,34534,37038,0,37223,15088,37289,37316,
+31916,35123,7817,37390,27807,37441,37474,21945,0,35526,15515,35596,21979,3377,
+37676,37739,35553,35819,28815,23235,35554,35557,18789,37444,35820,35897,35839,
+37747,37979,36540,38277,38310,37926,38304,28662,17081,9850,34520,4732,15918,
+18911,27676,38523,38550,16748,38563,28373,25050,38582,30965,35552,38589,21452,
+18849,27832,628,25616,37039,37093,19153,6421,13066,38705,34370,38710,18959,
+17725,17797,19177,28789,23361,38683,
+0,37333,38743,23370,37355,38751,37925,20688,12471,12476,38793,38815,38833,
+38846,38848,38866,38880,21612,38894,29724,37939,0,38901,37917,31098,19153,
+38964,38963,38987,39014,15118,29045,15697,1584,16732,22278,39114,39095,39112,
+39111,19199,27943,5843,21936,39137,39142,39148,37752,39225,18985,19314,38999,
+39173,39413,39436,39483,39440,39512,22309,14020,37041,39893,39648,39650,39685,
+39668,19470,39700,39725,34304,20532,39732,27048,14531,12413,39760,39744,40254,
+23109,6243,39822,16971,39938,39935,39948,40552,40404,40887,41362,41387,41185,
+41251,41439,40318,40323,41268,40462,26760,40388,8539,41363,41504,6459,41523,
+40249,41145,41652,40592,40597,40606,40610,19764,40618,40623,17252,40641,15200,
+14821,15645,20274,14270,35883,40706,40712,19350,37924,28066,40727,0,40761,
+22175,22154,40773,39352,37003,38898,33919,40802,40809,31452,40846,29206,19390,
+18805,18875,29047,18936,17224,19025,29598,35802,6394,31135,35198,36406,37737,
+37875,35396,37612,37761,37835,35180,17593,29207,16107,30578,31299,28880,17523,
+17400,29054,6127,28835,6334,13721,16071,6277,21551,6136,14114,5883,6201,14049,
+6004,6353,24395,14115,5824,22363,18981,5118,4776,5062,5302,34051,13990,0,
+33877,18836,29029,15921,21852,16123,28754,17652,14062,39325,28454,26617,14131,
+15381,15847,22636,6434,26640,16471,14143,16609,16523,16655,27681,21707,22174,
+26289,22162,4063,2984,3597,37830,35603,37788,20216,20779,14361,17462,20156,
+1125,895,20299,20362,22097,23144,427,971,14745,778,1044,13365,20265,704,36531,
+629,35546,524,20120,20685,
+20749,20386,20227,18958,16010,20290,20526,20588,20609,20428,20453,20568,20732,
+0,0,0,0,28278,13717,15929,16063,28018,6276,16009,20904,20931,1504,17629,1187,
+1170,1169,36218,35484,1806,21081,21156,2163,21217,0,18042,29068,17292,3104,
+18860,4324,27089,3613,0,16094,29849,29716,29782,29592,19342,19132,16525,21456,
+13700,29199,16585,21940,837,21709,3014,22301,37469,38644,37734,22493,22413,
+22399,13886,22731,23193,35398,5882,5999,5904,23084,22968,37519,23166,23247,
+23058,22854,6643,6241,17045,14069,27909,29763,23073,24195,23169,35799,1043,
+37856,29836,4867,28933,18802,37896,35323,37821,14240,23582,23710,24158,24136,
+6550,6524,15086,24269,23375,6403,6404,14081,6304,14045,5886,14035,33066,35399,
+7610,13426,35240,24332,24334,6439,6059,23147,5947,23364,34324,30205,34912,
+24702,10336,9771,24539,16056,9647,9662,37000,28531,25024,62,70,9755,24985,
+24984,24693,11419,11527,18132,37197,25713,18021,11114,14889,11042,13392,39146,
+11896,25399,42075,25782,25393,25553,18915,11623,25252,11425,25659,25963,26994,
+15348,12430,12973,18825,12971,21773,13024,6361,37951,26318,12937,12723,15072,
+16784,21892,35618,21903,5884,21851,21541,30958,12547,6186,12852,13412,12815,
+12674,17097,26254,27940,26219,19347,26160,30832,7659,26211,13010,13025,26142,
+22642,14545,14394,14268,15257,14242,13310,29904,15254,26511,17962,26806,26654,
+15300,27326,14435,14293,17543,27187,27218,27337,27397,6418,25873,26776,27212,
+15319,27258,27479,16320,15514,37792,37618,35818,35531,37513,32798,35292,37991,
+28069,28427,
+18924,0,16255,15759,28164,16444,23101,28170,22599,27940,30786,28987,17178,
+17014,28913,29264,29319,29332,18319,18213,20857,19108,1515,29818,16120,13919,
+19018,18711,24545,16134,16049,19167,35875,16181,24743,16115,29900,29756,37767,
+29751,17567,28138,17745,30083,16227,19673,19718,16216,30037,30323,42438,15129,
+29800,35532,18859,18830,15099,15821,19022,16127,18885,18675,37370,22322,37698,
+35555,6244,20703,21025,20967,30584,12850,30478,30479,30587,18071,14209,14942,
+18672,29752,29851,16063,19130,19143,16584,19094,25006,37639,21889,30750,30861,
+30856,30930,29648,31065,30529,22243,16654,0,33942,31141,27181,16122,31290,
+31220,16750,5862,16690,37429,31217,3404,18828,665,15802,5998,13719,21867,
+13680,13994,468,3085,31458,23129,9973,23215,23196,23053,603,30960,23082,23494,
+31486,16889,31837,31853,16913,23475,24252,24230,31949,18937,6064,31886,31868,
+31918,27314,32220,32263,32211,32590,25185,24924,31560,32151,24194,17002,27509,
+2326,26582,78,13775,22468,25618,25592,18786,32733,31527,2092,23273,23875,
+31500,24078,39398,34373,39523,27164,13375,14818,18935,26029,39455,26016,33920,
+28967,27857,17642,33079,17410,32966,33033,33090,26548,39107,27202,33378,33381,
+27217,33875,28071,34320,29211,23174,16767,6208,23339,6305,23268,6360,34464,
+63932,15759,34861,29730,23042,34926,20293,34951,35007,35046,35173,35149,22147,
+35156,30597,30596,35829,35801,35740,35321,16045,33955,18165,18127,14322,35389,
+35356,37960,24397,37419,17028,26068,28969,28868,6213,40301,35999,36073,32220,
+22938,30659,23024,17262,14036,36394,36519,19465,
+36656,36682,17140,27736,28603,8993,18587,28537,28299,6106,39913,14005,18735,
+37051,0,21873,18694,37307,37892,35403,16482,35580,37927,35869,35899,34021,
+35371,38297,38311,38295,38294,36148,29765,16066,18687,19010,17386,16103,12837,
+38543,36583,36454,36453,16076,18925,19064,16366,29714,29803,16124,38721,37040,
+26695,18973,37011,22495,0,37736,35209,35878,35631,25534,37562,23313,35689,
+18748,29689,16923,38811,38769,39224,3878,24001,35781,19122,38943,38106,37622,
+38359,37349,17600,35664,19047,35684,39132,35397,16128,37418,18725,33812,39227,
+39245,31494,15869,39323,19311,39338,39516,35685,22728,27279,39457,23294,39471,
+39153,19344,39240,39356,19389,19351,37757,22642,4866,22562,18872,5352,30788,
+10015,15800,26821,15741,37976,14631,24912,10113,10603,24839,40015,40019,40059,
+39989,39952,39807,39887,40493,39839,41461,41214,40225,19630,16644,40472,19632,
+40204,41396,41197,41203,39215,40357,33981,28178,28639,27522,34300,17715,28068,
+28292,28144,33824,34286,28160,14295,24676,31202,13724,13888,18733,18910,15714,
+37851,37566,37704,703,30905,37495,37965,20452,13376,36964,21853,30781,30804,
+30902,30795,5975,12745,18753,13978,20338,28634,28633,0,28702,21524,16821,
+22459,22771,22410,40214,22487,28980,13487,16812,29163,27712,20375,0,6069,
+35401,24844,23246,23051,17084,17544,14124,19323,35324,37819,37816,6358,3869,
+33906,27840,5139,17146,11302,17345,22932,15799,26433,32168,24923,24740,18873,
+18827,35322,37605,29666,16105,29876,35683,6303,16097,19123,27352,29683,29691,
+16086,19006,19092,6105,19046,935,5156,18917,29768,
+18710,28837,18806,37508,29670,37727,1278,37681,35534,35350,37766,35815,21973,
+18741,35458,29035,18755,3327,22180,1562,3051,3256,21762,31172,6138,32254,5826,
+19024,6226,17710,37889,14090,35520,18861,22960,6335,6275,29828,23201,14050,
+15707,14000,37471,23161,35457,6242,37748,15565,2740,19094,14730,20724,15721,
+15692,5020,29045,17147,33304,28175,37092,17643,27991,32335,28775,27823,15574,
+16365,15917,28162,28428,15727,1013,30033,14012,13512,18048,16090,18545,22980,
+37486,18750,36673,35868,27584,22546,22472,14038,5202,28926,17250,19057,12259,
+4784,9149,26809,26983,5016,13541,31732,14047,35459,14294,13306,19615,27162,
+13997,27831,33854,17631,17614,27942,27985,27778,28638,28439,28937,33597,5946,
+33773,27776,28755,6107,22921,23170,6067,23137,23153,6405,16892,14125,23023,
+5948,14023,29070,37776,26266,17061,23150,23083,17043,27179,16121,30518,17499,
+17098,28957,16985,35297,20400,27944,23746,17614,32333,17341,27148,16982,4868,
+28838,28979,17385,15781,27871,63525,19023,32357,23019,23855,15859,24412,19037,
+6111,32164,33830,21637,15098,13056,532,22398,2261,1561,16357,8094,41654,28675,
+37211,23920,29583,31955,35417,37920,20424,32743,29389,29456,31476,29496,29497,
+22262,29505,29512,16041,31512,36972,29173,18674,29665,33270,16074,30476,16081,
+27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,
+30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,20316,
+29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,
+23646,30654,30667,22770,30744,28857,30748,
+16552,30777,30791,30801,30822,33864,21813,31027,26627,31026,16643,16649,31121,
+31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,
+20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,
+31981,36755,28864,3279,32207,32212,32208,32253,32686,32692,29343,17303,32800,
+32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,
+33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,
+17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,
+33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,
+34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,
+38469,34699,17926,17943,34990,35071,35108,35143,35217,31079,35369,35384,35476,
+35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,
+36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,
+36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,
+37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,
+37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,
+38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,
+20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,
+39809,39901,39921,39924,19565,39968,14191,7106,40265,39994,40702,22096,40339,
+40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,
+40696,31432,40772,148,695,928,26906,38083,22956,
+1239,22592,38081,14265,1493,1557,1654,5818,22359,29043,2754,2765,3007,21610,
+63547,3019,21662,3067,3131,3155,3173,3196,24807,3213,22138,3253,3293,3309,
+3439,3506,3528,26965,39983,34725,3588,3598,3799,3984,3885,3699,23584,4028,
+24075,4188,4175,4214,26398,4219,4232,4246,13895,4287,4307,4399,4411,21348,
+33965,4835,4981,4918,35713,5495,5657,6083,6087,20088,28859,6189,6506,6701,
+6725,7210,7280,7340,7880,25283,7893,7957,29080,26709,8261,27113,14024,8828,
+9175,9210,10026,10353,10575,33533,10599,10643,10965,35237,10984,36768,11022,
+38840,11071,38983,39613,11340,0,11400,11447,23528,11528,11538,11703,11669,
+11842,12148,12236,12339,12390,13087,13278,24497,26184,26303,31353,13671,13811,
+0,18874,0,13850,14102,0,838,22709,26382,26904,15015,30295,24546,15889,16057,
+30206,8346,18640,19128,16665,35482,17134,17165,16443,17204,17302,19013,1482,
+20946,1553,22943,7848,15294,15615,17412,17622,22408,18036,14747,18223,34280,
+39369,14178,8643,35678,35662,0,18450,18683,18965,29193,19136,3192,22885,20133,
+20358,1913,36570,20524,21135,22335,29041,21145,21529,16202,19111,21948,21574,
+21614,27474,0,13427,21823,30258,21854,18200,21858,21862,22471,18751,22621,
+20582,13563,13260,0,22787,18300,35144,23214,23433,23558,7568,22433,29009,0,
+24834,31762,36950,25010,20378,35682,25602,25674,23899,27639,0,25732,6428,
+35562,18934,25736,16367,25874,19392,26047,26293,10011,37989,22497,24981,23079,
+63693,0,22201,17697,26364,20074,18740,38486,28047,27837,13848,35191,
+26521,26734,25617,26718,0,26823,31554,37056,2577,26918,0,26937,31301,0,27130,
+39462,27181,13919,25705,33,31107,27188,27483,23852,13593,0,27549,18128,27812,
+30011,34917,28078,22710,14108,9613,28747,29133,15444,29312,29317,37505,8570,
+29323,37680,29414,18896,27705,38047,29776,3832,34855,35061,10534,33907,6065,
+28344,18986,6176,14756,14009,0,0,17727,26294,40109,39076,35139,30668,30808,
+22230,16607,5642,14753,14127,33000,5061,29101,33638,31197,37288,0,19639,28847,
+35243,31229,31242,31499,32102,16762,31555,31102,32777,28597,41695,27139,33560,
+21410,28167,37823,26678,38749,33135,32803,27061,5101,12847,32840,23941,35888,
+32899,22293,38947,35145,23979,18824,26046,27093,21458,19109,16257,15377,26422,
+32912,33012,33070,8097,33103,33161,33199,33306,33542,33583,33674,13770,33896,
+34474,18682,25574,35158,30728,37461,35256,17394,35303,17375,35304,35654,35796,
+23032,35849,0,36805,37100,0,37136,37180,15863,37214,19146,36816,29327,22155,
+38119,38377,38320,38328,38706,39121,39241,39274,39363,39464,39694,40282,40347,
+32415,40696,40739,19620,38215,41619,29090,41727,19857,36882,42443,19868,3228,
+36798,21953,36794,9392,36793,19091,17673,32383,28502,27313,20202,13540,35628,
+30877,14138,36480,6133,32804,35692,35737,31294,26287,15851,30293,15543,22069,
+22870,20122,24193,25176,22207,3693,36366,23405,16008,19614,25566,0,6134,6267,
+25904,22061,23626,21530,21265,15814,40344,19581,22050,22046,32585,24280,22901,
+15680,34672,19996,4074,3401,14010,33047,40286,36120,30267,40005,30286,30649,
+37701,21554,
+33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,3741,13774,22021,
+22001,26353,33506,13869,30004,22000,21946,21655,21874,3137,3222,24272,20808,
+3702,11362,3746,40619,32090,21982,4213,25245,38765,21652,36045,29174,37238,
+25596,25529,25598,21865,11075,40050,11955,20890,13535,3495,20903,21581,21790,
+21779,30310,36397,26762,30129,32950,34820,34694,35015,33206,33820,4289,17644,
+29444,18182,23440,33547,26771,22139,9972,32047,16803,32115,28368,29366,37232,
+4569,37384,15612,42665,3756,3833,29286,7330,18254,20418,32761,4075,16634,
+40029,25887,11680,18675,18400,40316,4076,3594,0,30115,4077,0,24648,4487,29091,
+32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,17944,
+22682,19310,33325,21579,22442,23189,2425,0,14930,9317,29556,40620,19721,39917,
+15614,40752,19547,20393,38302,40926,33884,15798,29362,26547,14112,25390,32037,
+16119,15916,14890,36872,21196,15988,13946,17897,1166,30272,23280,3766,30842,
+32558,22695,16575,22140,39819,23924,30292,42036,40581,19681,0,14331,24857,
+12506,17394,0,22109,4777,22439,18787,40454,21044,28846,13741,0,40316,31830,
+39737,22494,5996,23635,25811,38096,25397,29028,34477,3368,27938,19170,3441,0,
+20990,7951,23950,38659,7633,40577,36940,31519,39682,23761,31651,25192,25397,
+39679,31695,39722,31870,0,31810,31878,39957,31740,39689,0,39963,18750,40794,
+21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,
+40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,
+38465,27008,20646,
+30022,5997,39386,21107,0,37209,38529,37212,0,37201,36503,25471,27939,27338,
+22033,37262,30074,25221,1020,29519,31856,23585,15613,0,18713,30422,39837,
+20010,3284,33726,34882,0,23626,27072,0,22394,21023,24053,20174,27697,498,
+20281,21660,21722,21146,36226,13822,0,13811,0,27474,37244,40869,39831,38958,
+39092,39610,40616,40580,29050,31508,0,27642,34840,32632,0,22048,42570,36471,
+40787,0,36308,36431,40476,36353,25218,33661,36392,36469,31443,19063,31294,
+30936,27882,35431,30215,35418,40742,27854,34774,30147,41650,30803,63552,36108,
+29410,29553,35629,29442,29937,36075,19131,34351,24506,34976,17591,0,6203,
+28165,0,35454,9499,0,24829,30311,39639,40260,37742,39823,34805,0,0,36087,
+29484,38689,39856,13782,29362,19463,31825,39242,24921,24921,19460,40598,24957,
+0,22367,24943,25254,25145,0,14940,25058,21418,13301,25444,26626,13778,23895,
+35778,36826,36409,0,20697,7494,30982,21298,38456,3899,16485,0,30718,0,31938,
+24346,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,29830,
+32859,29936,33027,30500,35209,26572,30035,28369,34729,34766,33224,34700,35401,
+36013,35651,30507,29944,34010,13877,27058,36262,0,35241,0,28089,34753,16401,
+29927,15835,29046,24740,24988,15569,0,24695,0,32625,35629,0,24809,19326,21024,
+15384,15559,24279,30294,21809,6468,4862,39171,28124,28845,23745,25005,35343,
+13943,238,26694,20238,17762,23327,25420,40784,40614,25195,1351,37595,1503,
+16325,34124,17077,29679,20917,13897,18754,35300,37700,6619,
+33518,15560,30780,26436,25311,18739,35242,672,27571,4869,20395,9453,20488,
+27945,31364,13824,19121,9491,0,894,24484,896,839,28379,1055,0,20737,13434,
+20750,39020,14147,33814,18852,1159,20832,13236,20842,3071,8444,741,9520,1422,
+12851,6531,23426,34685,1459,15513,20914,20920,40244,20937,20943,20945,15580,
+20947,19110,20915,20962,21314,20973,33741,26942,14125,24443,21003,21030,21052,
+21173,21079,21140,21177,21189,31765,34114,21216,34317,27411,0,35550,21833,
+28377,16256,2388,16364,21299,0,3042,27851,5926,26651,29653,24650,16042,14540,
+5864,29149,17570,21357,21364,34475,21374,0,5526,5651,30694,21395,35483,21408,
+21419,21422,29607,22386,16217,29596,21441,21445,27721,20041,22526,21465,15019,
+2959,21472,16363,11683,21494,3191,21523,28793,21803,26199,27995,21613,27475,
+3444,21853,21647,21668,18342,5901,3805,15796,3405,35260,9880,21831,19693,
+21551,29719,21894,21929,0,6359,16442,17746,17461,26291,4276,22071,26317,12938,
+26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,35686,13859,
+4687,22342,16805,27758,28811,22338,14001,27774,22502,5142,22531,5204,17251,
+22566,19445,22620,22698,13665,22752,22748,4668,22779,23551,22339,41296,17016,
+37843,13729,22815,26790,14019,28249,5694,23076,21843,5778,34053,22985,3406,
+27777,27946,6108,23001,6139,6066,28070,28017,6184,5845,23033,28229,23211,
+23139,14054,18857,0,14088,23190,29797,23251,28577,9556,15749,6417,14130,5816,
+24195,21200,23414,25992,23420,31246,16388,18525,516,23509,24928,6708,22988,
+1445,23539,
+23453,19728,23557,6980,23571,29646,23572,7333,27432,23625,18653,23685,23785,
+23791,23947,7673,7735,23824,23832,23878,7844,23738,24023,33532,14381,18689,
+8265,8563,33415,14390,15298,24110,27274,0,24186,17596,3283,21414,20151,0,
+21416,6001,24073,24308,33922,24313,24315,14496,24316,26686,37915,24333,449,
+63636,15070,18606,4922,24378,26760,9168,0,9329,24419,38845,28270,24434,37696,
+35382,24487,23990,15711,21072,8042,28920,9832,37334,670,35369,24625,26245,
+6263,14691,15815,13881,22416,10164,31089,15936,24734,0,24755,18818,18831,
+31315,29860,20705,23200,24932,33828,24898,63654,28370,24961,20980,1622,24967,
+23466,16311,10335,25043,35741,39261,25040,14642,10624,10433,24611,24924,25886,
+25483,280,25285,6000,25301,11789,25452,18911,14871,25656,25592,5006,6140,0,
+28554,11830,38932,16524,22301,25825,25829,38011,14950,25658,14935,25933,28438,
+18984,18979,25989,25965,25951,12414,26037,18752,19255,26065,16600,6185,26080,
+26083,24543,13312,26136,12791,12792,26180,12708,12709,26187,3701,26215,20966,
+26227,0,7741,12849,34292,12744,21267,30661,10487,39332,26370,17308,18977,
+15147,27130,14274,0,26471,26466,16845,37101,26583,17641,26658,28240,37436,
+26625,13286,28064,26717,13423,27105,27147,35551,26995,26819,13773,26881,26880,
+15666,14849,13884,15232,26540,26977,35402,17148,26934,27032,15265,969,33635,
+20624,27129,13913,8490,27205,14083,27293,15347,26545,27336,37276,15373,27421,
+2339,24798,27445,27508,10189,28341,15067,949,6488,14144,21537,15194,27617,
+16124,27612,27703,9355,18673,27473,
+27738,33318,27769,15804,17605,15805,16804,18700,18688,15561,14053,15595,3378,
+39811,12793,9361,32655,26679,27941,28065,28139,28054,27996,28284,28420,18815,
+16517,28274,34099,28532,20935,0,0,33838,35617,0,15919,29779,16258,31180,28239,
+23185,12363,28664,14093,28573,15920,28410,5271,16445,17749,37872,28484,28508,
+15694,28532,37232,15675,28575,16708,28627,16529,16725,16441,16368,16308,16703,
+20959,16726,16727,16704,25053,28747,28798,28839,28801,28876,28885,28886,28895,
+16644,15848,29108,29078,17015,28971,28997,23176,29002,0,23708,17253,29007,
+37730,17089,28972,17498,18983,18978,29114,35816,28861,29198,37954,29205,22801,
+37955,29220,37697,22021,29230,29248,18804,26813,29269,29271,15957,12356,26637,
+28477,29314,0,29483,18467,34859,18669,34820,29480,29486,29647,29610,3130,
+27182,29641,29769,16866,5863,18980,26147,14021,18871,18829,18939,29687,29717,
+26883,18982,29753,1475,16087,0,10413,29792,36530,29767,29668,29814,33721,
+29804,14128,29812,37873,27180,29826,18771,19084,16735,19065,35727,23366,35843,
+6302,29896,6536,29966,0,29982,36569,6731,23511,36524,37765,30029,30026,30055,
+30062,20354,16132,19731,30094,29789,30110,30132,30210,30252,30289,30287,30319,
+30326,25589,30352,33263,14328,26897,26894,30369,30373,30391,30412,28575,33890,
+20637,20861,7708,30494,30502,30528,25775,21024,30552,12972,30639,35172,35176,
+5825,30708,0,4982,18962,26826,30895,30919,30931,38565,31022,21984,30935,31028,
+30897,30220,36792,34948,35627,24707,9756,31110,35072,26882,31104,22615,31133,
+31545,31036,31145,28202,28966,
+16040,31174,37133,31188,1312,17503,21007,47234,248,16384,43296,1102,0,0,2868,
+1,0,0,0,0,0,0,0,3072,64,0,0,0,1024,88,60,0,0,23680,56493,48115,17353,60910,
+4004,49446,30363,61426,64478,63482,12815,44868,61438,65277,24593,176,8448,
+33049,4128,43144,8544,9321,17408,50313,0,16387,53,33859,20785,26771,514,0,0,0,
+0,0,16384,256,44160,33380,35904,37025,20484,54368,53760,6186,26781,38709,
+55375,8440,33476,10268,30082,660,16440,41376,4293,19825,3524,47512,23390,
+17153,39327,30723,57888,2079,393,16585,775,39437,21136,20433,892,8450,49184,
+4974,46467,62939,30693,20368,39447,5942,12,47726,12041,21600,7680,26744,28706,
+40534,62245,46990,2839,59119,6007,7003,4289,36248,6162,53174,12545,6770,11355,
+49334,57888,23747,7042,56032,34254,16598,21673,53259,18447,16452,2320,16596,
+15278,7780,11076,2071,33414,6198,35232,40167,2139,900,55810,60560,34779,49029,
+44450,36509,39069,9504,70,40774,58239,51669,62596,19926,58118,6326,2322,0,
+1024,0,32,0,512,0,0,0,0,8192,0,0,0,0,0,0,8,36352,28280,16223,56702,63293,
+39932,44796,65490,27535,59377,47807,28334,61207,42972,46654,30645,37577,42455,
+19126,39790,33209,26445,21758,39921,65122,21103,14039,49150,17705,63873,26045,
+17062,57,16896,36704,37888,16448,45010,53719,219,39072,31666,20998,38944,
+51222,2365,0,1,0,2561,2226,128,0,34820,5152,19472,0,4,17569,16,321,
+2048,61504,20447,22582,62961,32949,26613,16512,20480,16718,33992,23040,55392,
+11009,20481,5793,16580,28402,44049,14624,49348,1800,2316,38552,39876,7184,
+27800,10886,422,4422,58733,50379,37568,8464,4630,29341,27124,5902,41514,62593,
+123,41992,36875,11280,14796,330,5872,2571,3136,59933,17420,17678,2,
diff --git a/sources/android/support/src/musl-locale/iconv.c b/sources/android/support/src/musl-locale/iconv.c
index 570084c..0dc54a4 100644
--- a/sources/android/support/src/musl-locale/iconv.c
+++ b/sources/android/support/src/musl-locale/iconv.c
@@ -20,6 +20,8 @@
 #define GB18030     0330
 #define GBK         0331
 #define GB2312      0332
+#define BIG5        0340
+#define EUC_KR      0350
 
 /* FIXME: these are not implemented yet
  * EUC:   A1-FE A1-FE
@@ -47,6 +49,8 @@
 "gb18030\0\0\330"
 "gbk\0\0\331"
 "gb2312\0\0\332"
+"big5\0bigfive\0cp950\0big5hkscs\0\0\340"
+"euckr\0ksc5601\0ksx1001\0cp949\0\0\350"
 #include "codepages.h"
 ;
 
@@ -62,6 +66,18 @@
 #include "gb18030.h"
 };
 
+static const unsigned short big5[89][157] = {
+#include "big5.h"
+};
+
+static const unsigned short hkscs[] = {
+#include "hkscs.h"
+};
+
+static const unsigned short ksc[93][94] = {
+#include "ksc.h"
+};
+
 static int fuzzycmp(const unsigned char *a, const unsigned char *b)
 {
 	for (; *a && *b; a++, b++) {
@@ -265,7 +281,7 @@
 				c += 128;
 				for (d=0; d<=c; ) {
 					k = 0;
-                                      int i, j;
+                                       int i, j;
 					for (i=0; i<126; i++)
 						for (j=0; j<190; j++)
 							if (gb18030[i][j]-d <= c-d)
@@ -279,6 +295,76 @@
 			if (d>63) d--;
 			c = gb18030[c][d];
 			break;
+		case BIG5:
+			l = 2;
+			if (*inb < 2) goto starved;
+			d = *((unsigned char *)*in + 1);
+			if (d-0x40>=0xff-0x40 || d-0x7f<0xa1-0x7f) goto ilseq;
+			d -= 0x40;
+			if (d > 0x3e) d -= 0x22;
+			if (c-0xa1>=0xfa-0xa1) {
+				if (c-0x87>=0xff-0x87) goto ilseq;
+				if (c < 0xa1) c -= 0x87;
+				else c -= 0x87 + (0xfa-0xa1);
+				c = (hkscs[4867+(c*157+d)/16]>>(c*157+d)%16)%2<<17
+					| hkscs[c*157+d];
+				/* A few HKSCS characters map to pairs of UCS
+				 * characters. These are mapped to surrogate
+				 * range in the hkscs table then hard-coded
+				 * here. Ugly, yes. */
+				if (c/256 == 0xdc) {
+					if (totype-0300U > 8) k = 2;
+					else k = "\10\4\4\10\4\4\10\2\4"[totype-0300];
+					if (k > *outb) goto toobig;
+					x += iconv((iconv_t)(uintptr_t)to,
+						&(char *){"\303\212\314\204"
+						"\303\212\314\214"
+						"\303\252\314\204"
+						"\303\252\314\214"
+						+c%256}, &(size_t){4},
+						out, outb);
+					continue;
+				}
+				if (!c) goto ilseq;
+				break;
+			}
+			c -= 0xa1;
+			c = big5[c][d]|(c==0x27&&(d==0x3a||d==0x3c||d==0x42))<<17;
+			if (!c) goto ilseq;
+			break;
+		case EUC_KR:
+			l = 2;
+			if (*inb < 2) goto starved;
+			d = *((unsigned char *)*in + 1);
+			c -= 0xa1;
+			d -= 0xa1;
+			if (c >= 93 || d >= 94) {
+				c += (0xa1-0x81);
+				d += 0xa1;
+				if (c >= 93 || c>=0xc6-0x81 && d>0x52)
+					goto ilseq;
+				if (d-'A'<26) d = d-'A';
+				else if (d-'a'<26) d = d-'a'+26;
+				else if (d-0x81<0xff-0x81) d = d-0x81+52;
+				else goto ilseq;
+				if (c < 0x20) c = 178*c + d;
+				else c = 178*0x20 + 84*(c-0x20) + d;
+				c += 0xac00;
+				for (d=0xac00; d<=c; ) {
+					k = 0;
+                                       int i, j;
+					for (i=0; i<93; i++)
+						for (j=0; j<94; j++)
+							if (ksc[i][j]-d <= c-d)
+								k++;
+					d = c+1;
+					c += k;
+				}
+				break;
+			}
+			c = ksc[c][d];
+			if (!c) goto ilseq;
+			break;
 		default:
 			if (c < 128+type) break;
 			c -= 128+type;
@@ -317,8 +403,8 @@
 			}
 			d = c;
 			for (c=0; c<128-totype; c++) {
-				if (d == legacy_chars[ map[c*5/4]>>2*c%8 |
-					map[c*5/4+1]<<8-2*c%8 & 1023 ]) {
+				if (d == legacy_chars[ tomap[c*5/4]>>2*c%8 |
+					tomap[c*5/4+1]<<8-2*c%8 & 1023 ]) {
 					c += 128;
 					goto revout;
 				}
diff --git a/sources/android/support/src/musl-locale/iswctype_l.c b/sources/android/support/src/musl-locale/iswctype_l.c
index 1dccef6..13dfb1e 100644
--- a/sources/android/support/src/musl-locale/iswctype_l.c
+++ b/sources/android/support/src/musl-locale/iswctype_l.c
@@ -1,6 +1,9 @@
 #include <wctype.h>
+#include "libc.h"
 
 int iswctype_l(wint_t c, wctype_t t, locale_t l)
 {
 	return iswctype(c, t);
 }
+
+weak_alias(iswctype_l, __iswctype_l);
diff --git a/sources/android/support/src/musl-locale/ksc.h b/sources/android/support/src/musl-locale/ksc.h
new file mode 100644
index 0000000..8f6eca4
--- /dev/null
+++ b/sources/android/support/src/musl-locale/ksc.h
@@ -0,0 +1,640 @@
+12288,12289,12290,183,8229,8230,168,12291,173,8213,8741,65340,8764,8216,8217,
+8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12304,
+12305,177,215,247,8800,8804,8805,8734,8756,176,8242,8243,8451,8491,65504,
+65505,65509,9794,9792,8736,8869,8978,8706,8711,8801,8786,167,8251,9734,9733,
+9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8594,8592,8593,8595,
+8596,12307,8810,8811,8730,8765,8733,8757,8747,8748,8712,8715,8838,8839,8834,
+8835,8746,8745,8743,8744,65506,8658,8660,8704,8707,180,65374,711,728,733,730,
+729,184,731,161,191,720,8750,8721,8719,164,8457,8240,9665,9664,9655,9654,9828,
+9824,9825,9829,9831,9827,8857,9672,9635,9680,9681,9618,9636,9637,9640,9639,
+9638,9641,9832,9743,9742,9756,9758,182,8224,8225,8597,8599,8601,8598,8600,
+9837,9833,9834,9836,12927,12828,8470,13255,8482,13250,13272,8481,8364,174,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65281,65282,65283,65284,65285,65286,
+65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,
+65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,
+65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,
+65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,
+65339,65510,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,
+65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,
+65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,12593,12594,12595,
+12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,
+12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,
+12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,
+12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,
+12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,
+12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,
+12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,
+8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,0,0,0,0,0,8544,8545,8546,
+8547,8548,8549,8550,8551,8552,8553,0,0,0,0,0,0,0,913,914,915,916,917,918,919,
+920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,0,0,0,0,0,
+0,0,0,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,
+964,965,966,967,968,969,0,0,0,0,0,0,9472,9474,9484,9488,9496,9492,9500,9516,
+9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,
+9519,9512,9527,9535,9501,9520,9509,9528,9538,9490,9489,9498,9497,9494,9493,
+9486,9485,9502,9503,9505,9506,9510,9511,9513,9514,9517,9518,9521,9522,9525,
+9526,9529,9530,9533,9534,9536,9537,9539,9540,9541,9542,9543,9544,9545,9546,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13205,13206,13207,8467,
+13208,13252,13219,13220,13221,13222,13209,13210,13211,13212,13213,13214,13215,
+13216,13217,13218,13258,13197,13198,13199,13263,13192,13193,13256,13223,13224,
+13232,13233,13234,13235,13236,13237,13238,13239,13240,13241,13184,13185,13186,
+13187,13188,13242,13243,13244,13245,13246,13247,13200,13201,13202,13203,13204,
+8486,13248,13249,13194,13195,13196,13270,13253,13229,13230,13231,13275,13225,
+13226,13227,13228,13277,13264,13267,13251,13257,13276,13254,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,198,208,170,294,0,306,0,319,321,216,338,186,222,358,330,0,12896,
+12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,
+12910,12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,
+12923,9424,9425,9426,9427,9428,9429,9430,9431,9432,9433,9434,9435,9436,9437,
+9438,9439,9440,9441,9442,9443,9444,9445,9446,9447,9448,9449,9312,9313,9314,
+9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,189,8531,8532,188,
+190,8539,8540,8541,8542,230,273,240,295,305,307,312,320,322,248,339,223,254,
+359,331,329,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,
+12811,12812,12813,12814,12815,12816,12817,12818,12819,12820,12821,12822,12823,
+12824,12825,12826,12827,9372,9373,9374,9375,9376,9377,9378,9379,9380,9381,
+9382,9383,9384,9385,9386,9387,9388,9389,9390,9391,9392,9393,9394,9395,9396,
+9397,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,
+9346,185,178,179,8308,8319,8321,8322,8323,8324,12353,12354,12355,12356,12357,
+12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,
+12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,
+12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,
+12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,
+12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,
+12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,
+0,0,0,0,0,0,0,0,0,0,0,12449,12450,12451,12452,12453,12454,12455,12456,12457,
+12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,
+12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,
+12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,
+12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,
+12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,
+12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,0,0,0,
+0,0,0,0,0,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,
+1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,
+1067,1068,1069,1070,1071,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1072,1073,1074,1075,
+1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,
+1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44032,44033,44036,44039,44040,44041,44042,
+44048,44049,44050,44051,44052,44053,44054,44055,44057,44058,44059,44060,44061,
+44064,44068,44076,44077,44079,44080,44081,44088,44089,44092,44096,44107,44109,
+44116,44120,44124,44144,44145,44148,44151,44152,44154,44160,44161,44163,44164,
+44165,44166,44169,44170,44171,44172,44176,44180,44188,44189,44191,44192,44193,
+44200,44201,44202,44204,44207,44208,44216,44217,44219,44220,44221,44225,44228,
+44232,44236,44245,44247,44256,44257,44260,44263,44264,44266,44268,44271,44272,
+44273,44275,44277,44278,44284,44285,44288,44292,44294,44300,44301,44303,44305,
+44312,44316,44320,44329,44332,44333,44340,44341,44344,44348,44356,44357,44359,
+44361,44368,44372,44376,44385,44387,44396,44397,44400,44403,44404,44405,44406,
+44411,44412,44413,44415,44417,44418,44424,44425,44428,44432,44444,44445,44452,
+44471,44480,44481,44484,44488,44496,44497,44499,44508,44512,44516,44536,44537,
+44540,44543,44544,44545,44552,44553,44555,44557,44564,44592,44593,44596,44599,
+44600,44602,44608,44609,44611,44613,44614,44618,44620,44621,44622,44624,44628,
+44630,44636,44637,44639,44640,44641,44645,44648,44649,44652,44656,44664,44665,
+44667,44668,44669,44676,44677,44684,44732,44733,44734,44736,44740,44748,44749,
+44751,44752,44753,44760,44761,44764,44776,44779,44781,44788,44792,44796,44807,
+44808,44813,44816,44844,44845,44848,44850,44852,44860,44861,44863,44865,44866,
+44867,44872,44873,44880,44892,44893,44900,44901,44921,44928,44932,44936,44944,
+44945,44949,44956,44984,44985,44988,44992,44999,45000,45001,45003,45005,45006,
+45012,45020,45032,45033,45040,45041,45044,45048,45056,45057,45060,45068,45072,
+45076,45084,45085,45096,45124,45125,45128,45130,45132,45134,45139,45140,45141,
+45143,45145,45149,45180,45181,45184,45188,45196,45197,45199,45201,45208,45209,
+45210,45212,45215,45216,45217,45218,45224,45225,45227,45228,45229,45230,45231,
+45233,45235,45236,45237,45240,45244,45252,45253,45255,45256,45257,45264,45265,
+45268,45272,45280,45285,45320,45321,45323,45324,45328,45330,45331,45336,45337,
+45339,45340,45341,45347,45348,45349,45352,45356,45364,45365,45367,45368,45369,
+45376,45377,45380,45384,45392,45393,45396,45397,45400,45404,45408,45432,45433,
+45436,45440,45442,45448,45449,45451,45453,45458,45459,45460,45464,45468,45480,
+45516,45520,45524,45532,45533,45535,45544,45545,45548,45552,45561,45563,45565,
+45572,45573,45576,45579,45580,45588,45589,45591,45593,45600,45620,45628,45656,
+45660,45664,45672,45673,45684,45685,45692,45700,45701,45705,45712,45713,45716,
+45720,45721,45722,45728,45729,45731,45733,45734,45738,45740,45744,45748,45768,
+45769,45772,45776,45778,45784,45785,45787,45789,45794,45796,45797,45798,45800,
+45803,45804,45805,45806,45807,45811,45812,45813,45815,45816,45817,45818,45819,
+45823,45824,45825,45828,45832,45840,45841,45843,45844,45845,45852,45908,45909,
+45910,45912,45915,45916,45918,45919,45924,45925,45927,45929,45931,45934,45936,
+45937,45940,45944,45952,45953,45955,45956,45957,45964,45968,45972,45984,45985,
+45992,45996,46020,46021,46024,46027,46028,46030,46032,46036,46037,46039,46041,
+46043,46045,46048,46052,46056,46076,46096,46104,46108,46112,46120,46121,46123,
+46132,46160,46161,46164,46168,46176,46177,46179,46181,46188,46208,46216,46237,
+46244,46248,46252,46261,46263,46265,46272,46276,46280,46288,46293,46300,46301,
+46304,46307,46308,46310,46316,46317,46319,46321,46328,46356,46357,46360,46363,
+46364,46372,46373,46375,46376,46377,46378,46384,46385,46388,46392,46400,46401,
+46403,46404,46405,46411,46412,46413,46416,46420,46428,46429,46431,46432,46433,
+46496,46497,46500,46504,46506,46507,46512,46513,46515,46516,46517,46523,46524,
+46525,46528,46532,46540,46541,46543,46544,46545,46552,46572,46608,46609,46612,
+46616,46629,46636,46644,46664,46692,46696,46748,46749,46752,46756,46763,46764,
+46769,46804,46832,46836,46840,46848,46849,46853,46888,46889,46892,46895,46896,
+46904,46905,46907,46916,46920,46924,46932,46933,46944,46948,46952,46960,46961,
+46963,46965,46972,46973,46976,46980,46988,46989,46991,46992,46993,46994,46998,
+46999,47000,47001,47004,47008,47016,47017,47019,47020,47021,47028,47029,47032,
+47047,47049,47084,47085,47088,47092,47100,47101,47103,47104,47105,47111,47112,
+47113,47116,47120,47128,47129,47131,47133,47140,47141,47144,47148,47156,47157,
+47159,47160,47161,47168,47172,47185,47187,47196,47197,47200,47204,47212,47213,
+47215,47217,47224,47228,47245,47272,47280,47284,47288,47296,47297,47299,47301,
+47308,47312,47316,47325,47327,47329,47336,47337,47340,47344,47352,47353,47355,
+47357,47364,47384,47392,47420,47421,47424,47428,47436,47439,47441,47448,47449,
+47452,47456,47464,47465,47467,47469,47476,47477,47480,47484,47492,47493,47495,
+47497,47498,47501,47502,47532,47533,47536,47540,47548,47549,47551,47553,47560,
+47561,47564,47566,47567,47568,47569,47570,47576,47577,47579,47581,47582,47585,
+47587,47588,47589,47592,47596,47604,47605,47607,47608,47609,47610,47616,47617,
+47624,47637,47672,47673,47676,47680,47682,47688,47689,47691,47693,47694,47699,
+47700,47701,47704,47708,47716,47717,47719,47720,47721,47728,47729,47732,47736,
+47747,47748,47749,47751,47756,47784,47785,47787,47788,47792,47794,47800,47801,
+47803,47805,47812,47816,47832,47833,47868,47872,47876,47885,47887,47889,47896,
+47900,47904,47913,47915,47924,47925,47926,47928,47931,47932,47933,47934,47940,
+47941,47943,47945,47949,47951,47952,47956,47960,47969,47971,47980,48008,48012,
+48016,48036,48040,48044,48052,48055,48064,48068,48072,48080,48083,48120,48121,
+48124,48127,48128,48130,48136,48137,48139,48140,48141,48143,48145,48148,48149,
+48150,48151,48152,48155,48156,48157,48158,48159,48164,48165,48167,48169,48173,
+48176,48177,48180,48184,48192,48193,48195,48196,48197,48201,48204,48205,48208,
+48221,48260,48261,48264,48267,48268,48270,48276,48277,48279,48281,48282,48288,
+48289,48292,48295,48296,48304,48305,48307,48308,48309,48316,48317,48320,48324,
+48333,48335,48336,48337,48341,48344,48348,48372,48373,48374,48376,48380,48388,
+48389,48391,48393,48400,48404,48420,48428,48448,48456,48457,48460,48464,48472,
+48473,48484,48488,48512,48513,48516,48519,48520,48521,48522,48528,48529,48531,
+48533,48537,48538,48540,48548,48560,48568,48596,48597,48600,48604,48617,48624,
+48628,48632,48640,48643,48645,48652,48653,48656,48660,48668,48669,48671,48708,
+48709,48712,48716,48718,48724,48725,48727,48729,48730,48731,48736,48737,48740,
+48744,48746,48752,48753,48755,48756,48757,48763,48764,48765,48768,48772,48780,
+48781,48783,48784,48785,48792,48793,48808,48848,48849,48852,48855,48856,48864,
+48867,48868,48869,48876,48897,48904,48905,48920,48921,48923,48924,48925,48960,
+48961,48964,48968,48976,48977,48981,49044,49072,49093,49100,49101,49104,49108,
+49116,49119,49121,49212,49233,49240,49244,49248,49256,49257,49296,49297,49300,
+49304,49312,49313,49315,49317,49324,49325,49327,49328,49331,49332,49333,49334,
+49340,49341,49343,49344,49345,49349,49352,49353,49356,49360,49368,49369,49371,
+49372,49373,49380,49381,49384,49388,49396,49397,49399,49401,49408,49412,49416,
+49424,49429,49436,49437,49438,49439,49440,49443,49444,49446,49447,49452,49453,
+49455,49456,49457,49462,49464,49465,49468,49472,49480,49481,49483,49484,49485,
+49492,49493,49496,49500,49508,49509,49511,49512,49513,49520,49524,49528,49541,
+49548,49549,49550,49552,49556,49558,49564,49565,49567,49569,49573,49576,49577,
+49580,49584,49597,49604,49608,49612,49620,49623,49624,49632,49636,49640,49648,
+49649,49651,49660,49661,49664,49668,49676,49677,49679,49681,49688,49689,49692,
+49695,49696,49704,49705,49707,49709,49711,49713,49714,49716,49736,49744,49745,
+49748,49752,49760,49765,49772,49773,49776,49780,49788,49789,49791,49793,49800,
+49801,49808,49816,49819,49821,49828,49829,49832,49836,49837,49844,49845,49847,
+49849,49884,49885,49888,49891,49892,49899,49900,49901,49903,49905,49910,49912,
+49913,49915,49916,49920,49928,49929,49932,49933,49939,49940,49941,49944,49948,
+49956,49957,49960,49961,49989,50024,50025,50028,50032,50034,50040,50041,50044,
+50045,50052,50056,50060,50112,50136,50137,50140,50143,50144,50146,50152,50153,
+50157,50164,50165,50168,50184,50192,50212,50220,50224,50228,50236,50237,50248,
+50276,50277,50280,50284,50292,50293,50297,50304,50324,50332,50360,50364,50409,
+50416,50417,50420,50424,50426,50431,50432,50433,50444,50448,50452,50460,50472,
+50473,50476,50480,50488,50489,50491,50493,50500,50501,50504,50505,50506,50508,
+50509,50510,50515,50516,50517,50519,50520,50521,50525,50526,50528,50529,50532,
+50536,50544,50545,50547,50548,50549,50556,50557,50560,50564,50567,50572,50573,
+50575,50577,50581,50583,50584,50588,50592,50601,50612,50613,50616,50617,50619,
+50620,50621,50622,50628,50629,50630,50631,50632,50633,50634,50636,50638,50640,
+50641,50644,50648,50656,50657,50659,50661,50668,50669,50670,50672,50676,50678,
+50679,50684,50685,50686,50687,50688,50689,50693,50694,50695,50696,50700,50704,
+50712,50713,50715,50716,50724,50725,50728,50732,50733,50734,50736,50739,50740,
+50741,50743,50745,50747,50752,50753,50756,50760,50768,50769,50771,50772,50773,
+50780,50781,50784,50796,50799,50801,50808,50809,50812,50816,50824,50825,50827,
+50829,50836,50837,50840,50844,50852,50853,50855,50857,50864,50865,50868,50872,
+50873,50874,50880,50881,50883,50885,50892,50893,50896,50900,50908,50909,50912,
+50913,50920,50921,50924,50928,50936,50937,50941,50948,50949,50952,50956,50964,
+50965,50967,50969,50976,50977,50980,50984,50992,50993,50995,50997,50999,51004,
+51005,51008,51012,51018,51020,51021,51023,51025,51026,51027,51028,51029,51030,
+51031,51032,51036,51040,51048,51051,51060,51061,51064,51068,51069,51070,51075,
+51076,51077,51079,51080,51081,51082,51086,51088,51089,51092,51094,51095,51096,
+51098,51104,51105,51107,51108,51109,51110,51116,51117,51120,51124,51132,51133,
+51135,51136,51137,51144,51145,51148,51150,51152,51160,51165,51172,51176,51180,
+51200,51201,51204,51208,51210,51216,51217,51219,51221,51222,51228,51229,51232,
+51236,51244,51245,51247,51249,51256,51260,51264,51272,51273,51276,51277,51284,
+51312,51313,51316,51320,51322,51328,51329,51331,51333,51334,51335,51339,51340,
+51341,51348,51357,51359,51361,51368,51388,51389,51396,51400,51404,51412,51413,
+51415,51417,51424,51425,51428,51445,51452,51453,51456,51460,51461,51462,51468,
+51469,51471,51473,51480,51500,51508,51536,51537,51540,51544,51552,51553,51555,
+51564,51568,51572,51580,51592,51593,51596,51600,51608,51609,51611,51613,51648,
+51649,51652,51655,51656,51658,51664,51665,51667,51669,51670,51673,51674,51676,
+51677,51680,51682,51684,51687,51692,51693,51695,51696,51697,51704,51705,51708,
+51712,51720,51721,51723,51724,51725,51732,51736,51753,51788,51789,51792,51796,
+51804,51805,51807,51808,51809,51816,51837,51844,51864,51900,51901,51904,51908,
+51916,51917,51919,51921,51923,51928,51929,51936,51948,51956,51976,51984,51988,
+51992,52000,52001,52033,52040,52041,52044,52048,52056,52057,52061,52068,52088,
+52089,52124,52152,52180,52196,52199,52201,52236,52237,52240,52244,52252,52253,
+52257,52258,52263,52264,52265,52268,52270,52272,52280,52281,52283,52284,52285,
+52286,52292,52293,52296,52300,52308,52309,52311,52312,52313,52320,52324,52326,
+52328,52336,52341,52376,52377,52380,52384,52392,52393,52395,52396,52397,52404,
+52405,52408,52412,52420,52421,52423,52425,52432,52436,52452,52460,52464,52481,
+52488,52489,52492,52496,52504,52505,52507,52509,52516,52520,52524,52537,52572,
+52576,52580,52588,52589,52591,52593,52600,52616,52628,52629,52632,52636,52644,
+52645,52647,52649,52656,52676,52684,52688,52712,52716,52720,52728,52729,52731,
+52733,52740,52744,52748,52756,52761,52768,52769,52772,52776,52784,52785,52787,
+52789,52824,52825,52828,52831,52832,52833,52840,52841,52843,52845,52852,52853,
+52856,52860,52868,52869,52871,52873,52880,52881,52884,52888,52896,52897,52899,
+52900,52901,52908,52909,52929,52964,52965,52968,52971,52972,52980,52981,52983,
+52984,52985,52992,52993,52996,53000,53008,53009,53011,53013,53020,53024,53028,
+53036,53037,53039,53040,53041,53048,53076,53077,53080,53084,53092,53093,53095,
+53097,53104,53105,53108,53112,53120,53125,53132,53153,53160,53168,53188,53216,
+53217,53220,53224,53232,53233,53235,53237,53244,53248,53252,53265,53272,53293,
+53300,53301,53304,53308,53316,53317,53319,53321,53328,53332,53336,53344,53356,
+53357,53360,53364,53372,53373,53377,53412,53413,53416,53420,53428,53429,53431,
+53433,53440,53441,53444,53448,53449,53456,53457,53459,53460,53461,53468,53469,
+53472,53476,53484,53485,53487,53488,53489,53496,53517,53552,53553,53556,53560,
+53562,53568,53569,53571,53572,53573,53580,53581,53584,53588,53596,53597,53599,
+53601,53608,53612,53628,53636,53640,53664,53665,53668,53672,53680,53681,53683,
+53685,53690,53692,53696,53720,53748,53752,53767,53769,53776,53804,53805,53808,
+53812,53820,53821,53823,53825,53832,53852,53860,53888,53889,53892,53896,53904,
+53905,53909,53916,53920,53924,53932,53937,53944,53945,53948,53951,53952,53954,
+53960,53961,53963,53972,53976,53980,53988,53989,54000,54001,54004,54008,54016,
+54017,54019,54021,54028,54029,54030,54032,54036,54038,54044,54045,54047,54048,
+54049,54053,54056,54057,54060,54064,54072,54073,54075,54076,54077,54084,54085,
+54140,54141,54144,54148,54156,54157,54159,54160,54161,54168,54169,54172,54176,
+54184,54185,54187,54189,54196,54200,54204,54212,54213,54216,54217,54224,54232,
+54241,54243,54252,54253,54256,54260,54268,54269,54271,54273,54280,54301,54336,
+54340,54364,54368,54372,54381,54383,54392,54393,54396,54399,54400,54402,54408,
+54409,54411,54413,54420,54441,54476,54480,54484,54492,54495,54504,54508,54512,
+54520,54523,54525,54532,54536,54540,54548,54549,54551,54588,54589,54592,54596,
+54604,54605,54607,54609,54616,54617,54620,54624,54629,54632,54633,54635,54637,
+54644,54645,54648,54652,54660,54661,54663,54664,54665,54672,54693,54728,54729,
+54732,54736,54738,54744,54745,54747,54749,54756,54757,54760,54764,54772,54773,
+54775,54777,54784,54785,54788,54792,54800,54801,54803,54804,54805,54812,54816,
+54820,54829,54840,54841,54844,54848,54853,54856,54857,54859,54861,54865,54868,
+54869,54872,54876,54887,54889,54896,54897,54900,54915,54917,54924,54925,54928,
+54932,54941,54943,54945,54952,54956,54960,54969,54971,54980,54981,54984,54988,
+54993,54996,54999,55001,55008,55012,55016,55024,55029,55036,55037,55040,55044,
+55057,55064,55065,55068,55072,55080,55081,55083,55085,55092,55093,55096,55100,
+55108,55111,55113,55120,55121,55124,55126,55127,55128,55129,55136,55137,55139,
+55141,55145,55148,55152,55156,55164,55165,55169,55176,55177,55180,55184,55192,
+55193,55195,55197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20285,20339,20551,20729,
+21152,21487,21621,21733,22025,23233,23478,26247,26550,26551,26607,27468,29634,
+30146,31292,33499,33540,34903,34952,35382,36040,36303,36603,36838,39381,21051,
+21364,21508,24682,24932,27580,29647,33050,35258,35282,38307,20355,21002,22718,
+22904,23014,24178,24185,25031,25536,26438,26604,26751,28567,30286,30475,30965,
+31240,31487,31777,32925,33390,33393,35563,38291,20075,21917,26359,28212,30883,
+31469,33883,35088,34638,38824,21208,22350,22570,23884,24863,25022,25121,25954,
+26577,27204,28187,29976,30131,30435,30640,32058,37039,37969,37970,40853,21283,
+23724,30002,32987,37440,38296,21083,22536,23004,23713,23831,24247,24378,24394,
+24951,27743,30074,30086,31968,32115,32177,32652,33108,33313,34193,35137,35611,
+37628,38477,40007,20171,20215,20491,20977,22607,24887,24894,24936,25913,27114,
+28433,30117,30342,30422,31623,33445,33995,63744,37799,38283,21888,23458,22353,
+63745,31923,32697,37301,20520,21435,23621,24040,25298,25454,25818,25831,28192,
+28844,31067,36317,36382,63746,36989,37445,37624,20094,20214,20581,24062,24314,
+24838,26967,33137,34388,36423,37749,39467,20062,20625,26480,26688,20745,21133,
+21138,27298,30652,37392,40660,21163,24623,36850,20552,25001,25581,25802,26684,
+27268,28608,33160,35233,38548,22533,29309,29356,29956,32121,32365,32937,35211,
+35700,36963,40273,25225,27770,28500,32080,32570,35363,20860,24906,31645,35609,
+37463,37772,20140,20435,20510,20670,20742,21185,21197,21375,22384,22659,24218,
+24465,24950,25004,25806,25964,26223,26299,26356,26775,28039,28805,28913,29855,
+29861,29898,30169,30828,30956,31455,31478,32069,32147,32789,32831,33051,33686,
+35686,36629,36885,37857,38915,38968,39514,39912,20418,21843,22586,22865,23395,
+23622,24760,25106,26690,26800,26856,28330,30028,30328,30926,31293,31995,32363,
+32380,35336,35489,35903,38542,40388,21476,21481,21578,21617,22266,22993,23396,
+23611,24235,25335,25911,25925,25970,26272,26543,27073,27837,30204,30352,30590,
+31295,32660,32771,32929,33167,33510,33533,33776,34241,34865,34996,35493,63747,
+36764,37678,38599,39015,39640,40723,21741,26011,26354,26767,31296,35895,40288,
+22256,22372,23825,26118,26801,26829,28414,29736,34974,39908,27752,63748,39592,
+20379,20844,20849,21151,23380,24037,24656,24685,25329,25511,25915,29657,31354,
+34467,36002,38799,20018,23521,25096,26524,29916,31185,33747,35463,35506,36328,
+36942,37707,38982,24275,27112,34303,37101,63749,20896,23448,23532,24931,26874,
+27454,28748,29743,29912,31649,32592,33733,35264,36011,38364,39208,21038,24669,
+25324,36866,20362,20809,21281,22745,24291,26336,27960,28826,29378,29654,31568,
+33009,37979,21350,25499,32619,20054,20608,22602,22750,24618,24871,25296,27088,
+39745,23439,32024,32945,36703,20132,20689,21676,21932,23308,23968,24039,25898,
+25934,26657,27211,29409,30350,30703,32094,32761,33184,34126,34527,36611,36686,
+37066,39171,39509,39851,19992,20037,20061,20167,20465,20855,21246,21312,21475,
+21477,21646,22036,22389,22434,23495,23943,24272,25084,25304,25937,26552,26601,
+27083,27472,27590,27628,27714,28317,28792,29399,29590,29699,30655,30697,31350,
+32127,32777,33276,33285,33290,33503,34914,35635,36092,36544,36881,37041,37476,
+37558,39378,39493,40169,40407,40860,22283,23616,33738,38816,38827,40628,21531,
+31384,32676,35033,36557,37089,22528,23624,25496,31391,23470,24339,31353,31406,
+33422,36524,20518,21048,21240,21367,22280,25331,25458,27402,28099,30519,21413,
+29527,34152,36470,38357,26426,27331,28528,35437,36556,39243,63750,26231,27512,
+36020,39740,63751,21483,22317,22862,25542,27131,29674,30789,31418,31429,31998,
+33909,35215,36211,36917,38312,21243,22343,30023,31584,33740,37406,63752,27224,
+20811,21067,21127,25119,26840,26997,38553,20677,21156,21220,25027,26020,26681,
+27135,29822,31563,33465,33771,35250,35641,36817,39241,63753,20170,22935,25810,
+26129,27278,29748,31105,31165,33449,34942,34943,35167,63754,37670,20235,21450,
+24613,25201,27762,32026,32102,20120,20834,30684,32943,20225,20238,20854,20864,
+21980,22120,22331,22522,22524,22804,22855,22931,23492,23696,23822,24049,24190,
+24524,25216,26071,26083,26398,26399,26462,26827,26820,27231,27450,27683,27773,
+27778,28103,29592,29734,29738,29826,29859,30072,30079,30849,30959,31041,31047,
+31048,31098,31637,32000,32186,32648,32774,32813,32908,35352,35663,35912,36215,
+37665,37668,39138,39249,39438,39439,39525,40594,32202,20342,21513,25326,26708,
+37329,21931,20794,63755,63756,23068,25062,63757,25295,25343,63758,63759,63760,
+63761,63762,63763,37027,63764,63765,63766,63767,63768,35582,63769,63770,63771,
+63772,26262,63773,29014,63774,63775,38627,63776,25423,25466,21335,63777,26511,
+26976,28275,63778,30007,63779,63780,63781,32013,63782,63783,34930,22218,23064,
+63784,63785,63786,63787,63788,20035,63789,20839,22856,26608,32784,63790,22899,
+24180,25754,31178,24565,24684,25288,25467,23527,23511,21162,63791,22900,24361,
+24594,63792,63793,63794,29785,63795,63796,63797,63798,63799,63800,39377,63801,
+63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,28611,63812,63813,
+33215,36786,24817,63814,63815,33126,63816,63817,23615,63818,63819,63820,63821,
+63822,63823,63824,63825,23273,35365,26491,32016,63826,63827,63828,63829,63830,
+63831,33021,63832,63833,23612,27877,21311,28346,22810,33590,20025,20150,20294,
+21934,22296,22727,24406,26039,26086,27264,27573,28237,30701,31471,31774,32222,
+34507,34962,37170,37723,25787,28606,29562,30136,36948,21846,22349,25018,25812,
+26311,28129,28251,28525,28601,30192,32835,33213,34113,35203,35527,35674,37663,
+27795,30035,31572,36367,36957,21776,22530,22616,24162,25095,25758,26848,30070,
+31958,34739,40680,20195,22408,22382,22823,23565,23729,24118,24453,25140,25825,
+29619,33274,34955,36024,38538,40667,23429,24503,24755,20498,20992,21040,22294,
+22581,22615,23566,23648,23798,23947,24230,24466,24764,25361,25481,25623,26691,
+26873,27330,28120,28193,28372,28644,29182,30428,30585,31153,31291,33796,35241,
+36077,36339,36424,36867,36884,36947,37117,37709,38518,38876,27602,28678,29272,
+29346,29544,30563,31167,31716,32411,35712,22697,24775,25958,26109,26302,27788,
+28958,29129,35930,38931,20077,31361,20189,20908,20941,21205,21516,24999,26481,
+26704,26847,27934,28540,30140,30643,31461,33012,33891,37509,20828,26007,26460,
+26515,30168,31431,33651,63834,35910,36887,38957,23663,33216,33434,36929,36975,
+37389,24471,23965,27225,29128,30331,31561,34276,35588,37159,39472,21895,25078,
+63835,30313,32645,34367,34746,35064,37007,63836,27931,28889,29662,32097,33853,
+63837,37226,39409,63838,20098,21365,27396,27410,28734,29211,34349,40478,21068,
+36771,23888,25829,25900,27414,28651,31811,32412,34253,35172,35261,25289,33240,
+34847,24266,26391,28010,29436,29701,29807,34690,37086,20358,23821,24480,33802,
+20919,25504,30053,20142,20486,20841,20937,26753,27153,31918,31921,31975,33391,
+35538,36635,37327,20406,20791,21237,21570,24300,24942,25150,26053,27354,28670,
+31018,34268,34851,38317,39522,39530,40599,40654,21147,26310,27511,28701,31019,
+36706,38722,24976,25088,25891,28451,29001,29833,32244,32879,34030,36646,36899,
+37706,20925,21015,21155,27916,28872,35010,24265,25986,27566,28610,31806,29557,
+20196,20278,22265,63839,23738,23994,24604,29618,31533,32666,32718,32838,36894,
+37428,38646,38728,38936,40801,20363,28583,31150,37300,38583,21214,63840,25736,
+25796,27347,28510,28696,29200,30439,32769,34310,34396,36335,36613,38706,39791,
+40442,40565,30860,31103,32160,33737,37636,40575,40595,35542,22751,24324,26407,
+28711,29903,31840,32894,20769,28712,29282,30922,36034,36058,36084,38647,20102,
+20698,23534,24278,26009,29134,30274,30637,32842,34044,36988,39719,40845,22744,
+23105,23650,27155,28122,28431,30267,32047,32311,34078,35128,37860,38475,21129,
+26066,26611,27060,27969,28316,28687,29705,29792,30041,30244,30827,35628,39006,
+20845,25134,38520,20374,20523,23833,28138,32184,36650,24459,24900,26647,63841,
+38534,21202,32907,20956,20940,26974,31260,32190,33777,38517,20442,21033,21400,
+21519,21774,23653,24743,26446,26792,28012,29313,29432,29702,29827,63842,30178,
+31852,32633,32696,33673,35023,35041,37324,37328,38626,39881,21533,28542,29136,
+29848,34298,36522,38563,40023,40607,26519,28107,29747,33256,38678,30764,31435,
+31520,31890,25705,29802,30194,30908,30952,39340,39764,40635,23518,24149,28448,
+33180,33707,37000,19975,21325,23081,24018,24398,24930,25405,26217,26364,28415,
+28459,28771,30622,33836,34067,34875,36627,39237,39995,21788,25273,26411,27819,
+33545,35178,38778,20129,22916,24536,24537,26395,32178,32596,33426,33579,33725,
+36638,37017,22475,22969,23186,23504,26151,26522,26757,27599,29028,32629,36023,
+36067,36993,39749,33032,35978,38476,39488,40613,23391,27667,29467,30450,30431,
+33804,20906,35219,20813,20885,21193,26825,27796,30468,30496,32191,32236,38754,
+40629,28357,34065,20901,21517,21629,26126,26269,26919,28319,30399,30609,33559,
+33986,34719,37225,37528,40180,34946,20398,20882,21215,22982,24125,24917,25720,
+25721,26286,26576,27169,27597,27611,29279,29281,29761,30520,30683,32791,33468,
+33541,35584,35624,35980,26408,27792,29287,30446,30566,31302,40361,27519,27794,
+22818,26406,33945,21359,22675,22937,24287,25551,26164,26483,28218,29483,31447,
+33495,37672,21209,24043,25006,25035,25098,25287,25771,26080,26969,27494,27595,
+28961,29687,30045,32326,33310,33538,34154,35491,36031,38695,40289,22696,40664,
+20497,21006,21563,21839,25991,27766,32010,32011,32862,34442,38272,38639,21247,
+27797,29289,21619,23194,23614,23883,24396,24494,26410,26806,26979,28220,28228,
+30473,31859,32654,34183,35598,36855,38753,40692,23735,24758,24845,25003,25935,
+26107,26108,27665,27887,29599,29641,32225,38292,23494,34588,35600,21085,21338,
+25293,25615,25778,26420,27192,27850,29632,29854,31636,31893,32283,33162,33334,
+34180,36843,38649,39361,20276,21322,21453,21467,25292,25644,25856,26001,27075,
+27886,28504,29677,30036,30242,30436,30460,30928,30971,31020,32070,33324,34784,
+36820,38930,39151,21187,25300,25765,28196,28497,30332,36299,37297,37474,39662,
+39747,20515,20621,22346,22952,23592,24135,24439,25151,25918,26041,26049,26121,
+26507,27036,28354,30917,32033,32938,33152,33323,33459,33953,34444,35370,35607,
+37030,38450,40848,20493,20467,63843,22521,24472,25308,25490,26479,28227,28953,
+30403,32972,32986,35060,35061,35097,36064,36649,37197,38506,20271,20336,24091,
+26575,26658,30333,30334,39748,24161,27146,29033,29140,30058,63844,32321,34115,
+34281,39132,20240,31567,32624,38309,20961,24070,26805,27710,27726,27867,29359,
+31684,33539,27861,29754,20731,21128,22721,25816,27287,29863,30294,30887,34327,
+38370,38713,63845,21342,24321,35722,36776,36783,37002,21029,30629,40009,40712,
+19993,20482,20853,23643,24183,26142,26170,26564,26821,28851,29953,30149,31177,
+31453,36647,39200,39432,20445,22561,22577,23542,26222,27493,27921,28282,28541,
+29668,29995,33769,35036,35091,35676,36628,20239,20693,21264,21340,23443,24489,
+26381,31119,33145,33583,34068,35079,35206,36665,36667,39333,39954,26412,20086,
+20472,22857,23553,23791,23792,25447,26834,28925,29090,29739,32299,34028,34562,
+36898,37586,40179,19981,20184,20463,20613,21078,21103,21542,21648,22496,22827,
+23142,23386,23413,23500,24220,63846,25206,25975,26023,28014,28325,29238,31526,
+31807,32566,33104,33105,33178,33344,33433,33705,35331,36000,36070,36091,36212,
+36282,37096,37340,38428,38468,39385,40167,21271,20998,21545,22132,22707,22868,
+22894,24575,24996,25198,26128,27774,28954,30406,31881,31966,32027,33452,36033,
+38640,63847,20315,24343,24447,25282,23849,26379,26842,30844,32323,40300,19989,
+20633,21269,21290,21329,22915,23138,24199,24754,24970,25161,25209,26000,26503,
+27047,27604,27606,27607,27608,27832,63848,29749,30202,30738,30865,31189,31192,
+31875,32203,32737,32933,33086,33218,33778,34586,35048,35513,35692,36027,37145,
+38750,39131,40763,22188,23338,24428,25996,27315,27567,27996,28657,28693,29277,
+29613,36007,36051,38971,24977,27703,32856,39425,20045,20107,20123,20181,20282,
+20284,20351,20447,20735,21490,21496,21766,21987,22235,22763,22882,23057,23531,
+23546,23556,24051,24107,24473,24605,25448,26012,26031,26614,26619,26797,27515,
+27801,27863,28195,28681,29509,30722,31038,31040,31072,31169,31721,32023,32114,
+32902,33293,33678,34001,34503,35039,35408,35422,35613,36060,36198,36781,37034,
+39164,39391,40605,21066,63849,26388,63850,20632,21034,23665,25955,27733,29642,
+29987,30109,31639,33948,37240,38704,20087,25746,27578,29022,34217,19977,63851,
+26441,26862,28183,33439,34072,34923,25591,28545,37394,39087,19978,20663,20687,
+20767,21830,21930,22039,23360,23577,23776,24120,24202,24224,24258,24819,26705,
+27233,28248,29245,29248,29376,30456,31077,31665,32724,35059,35316,35443,35937,
+36062,38684,22622,29885,36093,21959,63852,31329,32034,33394,29298,29983,29989,
+63853,31513,22661,22779,23996,24207,24246,24464,24661,25234,25471,25933,26257,
+26329,26360,26646,26866,29312,29790,31598,32110,32214,32626,32997,33298,34223,
+35199,35475,36893,37604,40653,40736,22805,22893,24109,24796,26132,26227,26512,
+27728,28101,28511,30707,30889,33990,37323,37675,20185,20682,20808,21892,23307,
+23459,25159,25982,26059,28210,29053,29697,29764,29831,29887,30316,31146,32218,
+32341,32680,33146,33203,33337,34330,34796,35445,36323,36984,37521,37925,39245,
+39854,21352,23633,26964,27844,27945,28203,33292,34203,35131,35373,35498,38634,
+40807,21089,26297,27570,32406,34814,36109,38275,38493,25885,28041,29166,63854,
+22478,22995,23468,24615,24826,25104,26143,26207,29481,29689,30427,30465,31596,
+32854,32882,33125,35488,37266,19990,21218,27506,27927,31237,31545,32048,63855,
+36016,21484,22063,22609,23477,23567,23569,24034,25152,25475,25620,26157,26803,
+27836,28040,28335,28703,28836,29138,29990,30095,30094,30233,31505,31712,31787,
+32032,32057,34092,34157,34311,35380,36877,36961,37045,37559,38902,39479,20439,
+23660,26463,28049,31903,32396,35606,36118,36895,23403,24061,25613,33984,36956,
+39137,29575,23435,24730,26494,28126,35359,35494,36865,38924,21047,63856,28753,
+30862,37782,34928,37335,20462,21463,22013,22234,22402,22781,23234,23432,23723,
+23744,24101,24833,25101,25163,25480,25628,25910,25976,27193,27530,27700,27929,
+28465,29159,29417,29560,29703,29874,30246,30561,31168,31319,31466,31929,32143,
+32172,32353,32670,33065,33585,33936,34010,34282,34966,35504,35728,36664,36930,
+36995,37228,37526,37561,38539,38567,38568,38614,38656,38920,39318,39635,39706,
+21460,22654,22809,23408,23487,28113,28506,29087,29729,29881,32901,33789,24033,
+24455,24490,24642,26092,26642,26991,27219,27529,27957,28147,29667,30462,30636,
+31565,32020,33059,33308,33600,34036,34147,35426,35524,37255,37662,38918,39348,
+25100,34899,36848,37477,23815,23847,23913,29791,33181,34664,28629,25342,32722,
+35126,35186,19998,20056,20711,21213,21319,25215,26119,32361,34821,38494,20365,
+21273,22070,22987,23204,23608,23630,23629,24066,24337,24643,26045,26159,26178,
+26558,26612,29468,30690,31034,32709,33940,33997,35222,35430,35433,35553,35925,
+35962,22516,23508,24335,24687,25325,26893,27542,28252,29060,31698,34645,35672,
+36606,39135,39166,20280,20353,20449,21627,23072,23480,24892,26032,26216,29180,
+30003,31070,32051,33102,33251,33688,34218,34254,34563,35338,36523,36763,63857,
+36805,22833,23460,23526,24713,23529,23563,24515,27777,63858,28145,28683,29978,
+33455,35574,20160,21313,63859,38617,27663,20126,20420,20818,21854,23077,23784,
+25105,29273,33469,33706,34558,34905,35357,38463,38597,39187,40201,40285,22538,
+23731,23997,24132,24801,24853,25569,27138,28197,37122,37716,38990,39952,40823,
+23433,23736,25353,26191,26696,30524,38593,38797,38996,39839,26017,35585,36555,
+38332,21813,23721,24022,24245,26263,30284,33780,38343,22739,25276,29390,40232,
+20208,22830,24591,26171,27523,31207,40230,21395,21696,22467,23830,24859,26326,
+28079,30861,33406,38552,38724,21380,25212,25494,28082,32266,33099,38989,27387,
+32588,40367,40474,20063,20539,20918,22812,24825,25590,26928,29242,32822,63860,
+37326,24369,63861,63862,32004,33509,33903,33979,34277,36493,63863,20335,63864,
+63865,22756,23363,24665,25562,25880,25965,26264,63866,26954,27171,27915,28673,
+29036,30162,30221,31155,31344,63867,32650,63868,35140,63869,35731,37312,38525,
+63870,39178,22276,24481,26044,28417,30208,31142,35486,39341,39770,40812,20740,
+25014,25233,27277,33222,20547,22576,24422,28937,35328,35578,23420,34326,20474,
+20796,22196,22852,25513,28153,23978,26989,20870,20104,20313,63871,63872,63873,
+22914,63874,63875,27487,27741,63876,29877,30998,63877,33287,33349,33593,36671,
+36701,63878,39192,63879,63880,63881,20134,63882,22495,24441,26131,63883,63884,
+30123,32377,35695,63885,36870,39515,22181,22567,23032,23071,23476,63886,24310,
+63887,63888,25424,25403,63889,26941,27783,27839,28046,28051,28149,28436,63890,
+28895,28982,29017,63891,29123,29141,63892,30799,30831,63893,31605,32227,63894,
+32303,63895,34893,36575,63896,63897,63898,37467,63899,40182,63900,63901,63902,
+24709,28037,63903,29105,63904,63905,38321,21421,63906,63907,63908,26579,63909,
+28814,28976,29744,33398,33490,63910,38331,39653,40573,26308,63911,29121,33865,
+63912,63913,22603,63914,63915,23992,24433,63916,26144,26254,27001,27054,27704,
+27891,28214,28481,28634,28699,28719,29008,29151,29552,63917,29787,63918,29908,
+30408,31310,32403,63919,63920,33521,35424,36814,63921,37704,63922,38681,63923,
+63924,20034,20522,63925,21000,21473,26355,27757,28618,29450,30591,31330,33454,
+34269,34306,63926,35028,35427,35709,35947,63927,37555,63928,38675,38928,20116,
+20237,20425,20658,21320,21566,21555,21978,22626,22714,22887,23067,23524,24735,
+63929,25034,25942,26111,26212,26791,27738,28595,28879,29100,29522,31613,34568,
+35492,39986,40711,23627,27779,29508,29577,37434,28331,29797,30239,31337,32277,
+34314,20800,22725,25793,29934,29973,30320,32705,37013,38605,39252,28198,29926,
+31401,31402,33253,34521,34680,35355,23113,23436,23451,26785,26880,28003,29609,
+29715,29740,30871,32233,32747,33048,33109,33694,35916,38446,38929,26352,24448,
+26106,26505,27754,29579,20525,23043,27498,30702,22806,23916,24013,29477,30031,
+63930,63931,20709,20985,22575,22829,22934,23002,23525,63932,63933,23970,25303,
+25622,25747,25854,63934,26332,63935,27208,63936,29183,29796,63937,31368,31407,
+32327,32350,32768,33136,63938,34799,35201,35616,36953,63939,36992,39250,24958,
+27442,28020,32287,35109,36785,20433,20653,20887,21191,22471,22665,23481,24248,
+24898,27029,28044,28263,28342,29076,29794,29992,29996,32883,33592,33993,36362,
+37780,37854,63940,20110,20305,20598,20778,21448,21451,21491,23431,23507,23588,
+24858,24962,26100,29275,29591,29760,30402,31056,31121,31161,32006,32701,33419,
+34261,34398,36802,36935,37109,37354,38533,38632,38633,21206,24423,26093,26161,
+26671,29020,31286,37057,38922,20113,63941,27218,27550,28560,29065,32792,33464,
+34131,36939,38549,38642,38907,34074,39729,20112,29066,38596,20803,21407,21729,
+22291,22290,22435,23195,23236,23491,24616,24895,25588,27781,27961,28274,28304,
+29232,29503,29783,33489,34945,36677,36960,63942,38498,39000,40219,26376,36234,
+37470,20301,20553,20702,21361,22285,22996,23041,23561,24944,26256,28205,29234,
+29771,32239,32963,33806,33894,34111,34655,34907,35096,35586,36949,38859,39759,
+20083,20369,20754,20842,63943,21807,21929,23418,23461,24188,24189,24254,24736,
+24799,24840,24841,25540,25912,26377,63944,26580,26586,63945,26977,26978,27833,
+27943,63946,28216,63947,28641,29494,29495,63948,29788,30001,63949,30290,63950,
+63951,32173,33278,33848,35029,35480,35547,35565,36400,36418,36938,36926,36986,
+37193,37321,37742,63952,63953,22537,63954,27603,32905,32946,63955,63956,20801,
+22891,23609,63957,63958,28516,29607,32996,36103,63959,37399,38287,63960,63961,
+63962,63963,32895,25102,28700,32104,34701,63964,22432,24681,24903,27575,35518,
+37504,38577,20057,21535,28139,34093,38512,38899,39150,25558,27875,37009,20957,
+25033,33210,40441,20381,20506,20736,23452,24847,25087,25836,26885,27589,30097,
+30691,32681,33380,34191,34811,34915,35516,35696,37291,20108,20197,20234,63965,
+63966,22839,23016,63967,24050,24347,24411,24609,63968,63969,63970,63971,29246,
+29669,63972,30064,30157,63973,31227,63974,32780,32819,32900,33505,33617,63975,
+63976,36029,36019,36999,63977,63978,39156,39180,63979,63980,28727,30410,32714,
+32716,32764,35610,20154,20161,20995,21360,63981,21693,22240,23035,23493,24341,
+24525,28270,63982,63983,32106,33589,63984,34451,35469,63985,38765,38775,63986,
+63987,19968,20314,20350,22777,26085,28322,36920,37808,39353,20219,22764,22922,
+23001,24641,63988,63989,31252,63990,33615,36035,20837,21316,63991,63992,63993,
+20173,21097,23381,33471,20180,21050,21672,22985,23039,23376,23383,23388,24675,
+24904,28363,28825,29038,29574,29943,30133,30913,32043,32773,33258,33576,34071,
+34249,35566,36039,38604,20316,21242,22204,26027,26152,28796,28856,29237,32189,
+33421,37196,38592,40306,23409,26855,27544,28538,30430,23697,26283,28507,31668,
+31786,34870,38620,19976,20183,21280,22580,22715,22767,22892,23559,24115,24196,
+24373,25484,26290,26454,27167,27299,27404,28479,29254,63994,29520,29835,31456,
+31911,33144,33247,33255,33674,33900,34083,34196,34255,35037,36115,37292,38263,
+38556,20877,21705,22312,23472,25165,26448,26685,26771,28221,28371,28797,32289,
+35009,36001,36617,40779,40782,29229,31631,35533,37658,20295,20302,20786,21632,
+22992,24213,25269,26485,26990,27159,27822,28186,29401,29482,30141,31672,32053,
+33511,33785,33879,34295,35419,36015,36487,36889,37048,38606,40799,21219,21514,
+23265,23490,25688,25973,28404,29380,63995,30340,31309,31515,31821,32318,32735,
+33659,35627,36042,36196,36321,36447,36842,36857,36969,37841,20291,20346,20659,
+20840,20856,21069,21098,22625,22652,22880,23560,23637,24283,24731,25136,26643,
+27583,27656,28593,29006,29728,30000,30008,30033,30322,31564,31627,31661,31686,
+32399,35438,36670,36681,37439,37523,37666,37931,38651,39002,39019,39198,20999,
+25130,25240,27993,30308,31434,31680,32118,21344,23742,24215,28472,28857,31896,
+38673,39822,40670,25509,25722,34678,19969,20117,20141,20572,20597,21576,22979,
+23450,24128,24237,24311,24449,24773,25402,25919,25972,26060,26230,26232,26622,
+26984,27273,27491,27712,28096,28136,28191,28254,28702,28833,29582,29693,30010,
+30555,30855,31118,31243,31357,31934,32142,33351,35330,35562,35998,37165,37194,
+37336,37478,37580,37664,38662,38742,38748,38914,40718,21046,21137,21884,22564,
+24093,24351,24716,25552,26799,28639,31085,31532,33229,34234,35069,35576,36420,
+37261,38500,38555,38717,38988,40778,20430,20806,20939,21161,22066,24340,24427,
+25514,25805,26089,26177,26362,26361,26397,26781,26839,27133,28437,28526,29031,
+29157,29226,29866,30522,31062,31066,31199,31264,31381,31895,31967,32068,32368,
+32903,34299,34468,35412,35519,36249,36481,36896,36973,37347,38459,38613,40165,
+26063,31751,36275,37827,23384,23562,21330,25305,29469,20519,23447,24478,24752,
+24939,26837,28121,29742,31278,32066,32156,32305,33131,36394,36405,37758,37912,
+20304,22352,24038,24231,25387,32618,20027,20303,20367,20570,23005,32964,21610,
+21608,22014,22863,23449,24030,24282,26205,26417,26609,26666,27880,27954,28234,
+28557,28855,29664,30087,31820,32002,32044,32162,33311,34523,35387,35461,36208,
+36490,36659,36913,37198,37202,37956,39376,31481,31909,20426,20737,20934,22472,
+23535,23803,26201,27197,27994,28310,28652,28940,30063,31459,34850,36897,36981,
+38603,39423,33537,20013,20210,34886,37325,21373,27355,26987,27713,33914,22686,
+24974,26366,25327,28893,29969,30151,32338,33976,35657,36104,20043,21482,21675,
+22320,22336,24535,25345,25351,25711,25903,26088,26234,26525,26547,27490,27744,
+27802,28460,30693,30757,31049,31063,32025,32930,33026,33267,33437,33463,34584,
+35468,63996,36100,36286,36978,30452,31257,31287,32340,32887,21767,21972,22645,
+25391,25634,26185,26187,26733,27035,27524,27941,28337,29645,29800,29857,30043,
+30137,30433,30494,30603,31206,32265,32285,33275,34095,34967,35386,36049,36587,
+36784,36914,37805,38499,38515,38663,20356,21489,23018,23241,24089,26702,29894,
+30142,31209,31378,33187,34541,36074,36300,36845,26015,26389,63997,22519,28503,
+32221,36655,37878,38598,24501,25074,28548,19988,20376,20511,21449,21983,23919,
+24046,27425,27492,30923,31642,63998,36425,36554,36974,25417,25662,30528,31364,
+37679,38015,40810,25776,28591,29158,29864,29914,31428,31762,32386,31922,32408,
+35738,36106,38013,39184,39244,21049,23519,25830,26413,32046,20717,21443,22649,
+24920,24921,25082,26028,31449,35730,35734,20489,20513,21109,21809,23100,24288,
+24432,24884,25950,26124,26166,26274,27085,28356,28466,29462,30241,31379,33081,
+33369,33750,33980,20661,22512,23488,23528,24425,25505,30758,32181,33756,34081,
+37319,37365,20874,26613,31574,36012,20932,22971,24765,34389,20508,63999,21076,
+23610,24957,25114,25299,25842,26021,28364,30240,33034,36448,38495,38587,20191,
+21315,21912,22825,24029,25797,27849,28154,29588,31359,33307,34214,36068,36368,
+36983,37351,38369,38433,38854,20984,21746,21894,24505,25764,28552,32180,36639,
+36685,37941,20681,23574,27838,28155,29979,30651,31805,31844,35449,35522,22558,
+22974,24086,25463,29266,30090,30571,35548,36028,36626,24307,26228,28152,32893,
+33729,35531,38737,39894,64000,21059,26367,28053,28399,32224,35558,36910,36958,
+39636,21021,21119,21736,24980,25220,25307,26786,26898,26970,27189,28818,28966,
+30813,30977,30990,31186,31245,32918,33400,33493,33609,34121,35970,36229,37218,
+37259,37294,20419,22225,29165,30679,34560,35320,23544,24534,26449,37032,21474,
+22618,23541,24740,24961,25696,32317,32880,34085,37507,25774,20652,23828,26368,
+22684,25277,25512,26894,27000,27166,28267,30394,31179,33467,33833,35535,36264,
+36861,37138,37195,37276,37648,37656,37786,38619,39478,39949,19985,30044,31069,
+31482,31569,31689,32302,33988,36441,36468,36600,36880,26149,26943,29763,20986,
+26414,40668,20805,24544,27798,34802,34909,34935,24756,33205,33795,36101,21462,
+21561,22068,23094,23601,28810,32736,32858,33030,33261,36259,37257,39519,40434,
+20596,20164,21408,24827,28204,23652,20360,20516,21988,23769,24159,24677,26772,
+27835,28100,29118,30164,30196,30305,31258,31305,32199,32251,32622,33268,34473,
+36636,38601,39347,40786,21063,21189,39149,35242,19971,26578,28422,20405,23522,
+26517,27784,28024,29723,30759,37341,37756,34756,31204,31281,24555,20182,21668,
+21822,22702,22949,24816,25171,25302,26422,26965,33333,38464,39345,39389,20524,
+21331,21828,22396,64001,25176,64002,25826,26219,26589,28609,28655,29730,29752,
+35351,37944,21585,22022,22374,24392,24986,27470,28760,28845,32187,35477,22890,
+33067,25506,30472,32829,36010,22612,25645,27067,23445,24081,28271,64003,34153,
+20812,21488,22826,24608,24907,27526,27760,27888,31518,32974,33492,36294,37040,
+39089,64004,25799,28580,25745,25860,20814,21520,22303,35342,24927,26742,64005,
+30171,31570,32113,36890,22534,27084,33151,35114,36864,38969,20600,22871,22956,
+25237,36879,39722,24925,29305,38358,22369,23110,24052,25226,25773,25850,26487,
+27874,27966,29228,29750,30772,32631,33453,36315,38935,21028,22338,26495,29256,
+29923,36009,36774,37393,38442,20843,21485,25420,20329,21764,24726,25943,27803,
+28031,29260,29437,31255,35207,35997,24429,28558,28921,33192,24846,20415,20559,
+25153,29255,31687,32232,32745,36941,38829,39449,36022,22378,24179,26544,33805,
+35413,21536,23318,24163,24290,24330,25987,32954,34109,38281,38491,20296,21253,
+21261,21263,21638,21754,22275,24067,24598,25243,25265,25429,64006,27873,28006,
+30129,30770,32990,33071,33502,33889,33970,34957,35090,36875,37610,39165,39825,
+24133,26292,26333,28689,29190,64007,20469,21117,24426,24915,26451,27161,28418,
+29922,31080,34920,35961,39111,39108,39491,21697,31263,26963,35575,35914,39080,
+39342,24444,25259,30130,30382,34987,36991,38466,21305,24380,24517,27852,29644,
+30050,30091,31558,33534,39325,20047,36924,19979,20309,21414,22799,24264,26160,
+27827,29781,33655,34662,36032,36944,38686,39957,22737,23416,34384,35604,40372,
+23506,24680,24717,26097,27735,28450,28579,28698,32597,32752,38289,38290,38480,
+38867,21106,36676,20989,21547,21688,21859,21898,27323,28085,32216,33382,37532,
+38519,40569,21512,21704,30418,34532,38308,38356,38492,20130,20233,23022,23270,
+24055,24658,25239,26477,26689,27782,28207,32568,32923,33322,64008,64009,38917,
+20133,20565,21683,22419,22874,23401,23475,25032,26999,28023,28707,34809,35299,
+35442,35559,36994,39405,39608,21182,26680,20502,24184,26447,33607,34892,20139,
+21521,22190,29670,37141,38911,39177,39255,39321,22099,22687,34395,35377,25010,
+27382,29563,36562,27463,38570,39511,22869,29184,36203,38761,20436,23796,24358,
+25080,26203,27883,28843,29572,29625,29694,30505,30541,32067,32098,32291,33335,
+34898,64010,36066,37449,39023,23377,31348,34880,38913,23244,20448,21332,22846,
+23805,25406,28025,29433,33029,33031,33698,37583,38960,20136,20804,21009,22411,
+24418,27842,28366,28677,28752,28847,29074,29673,29801,33610,34722,34913,36872,
+37026,37795,39336,20846,24407,24800,24935,26291,34137,36426,37295,38795,20046,
+20114,21628,22741,22778,22909,23733,24359,25142,25160,26122,26215,27627,28009,
+28111,28246,28408,28564,28640,28649,28765,29392,29733,29786,29920,30355,31068,
+31946,32286,32993,33446,33899,33983,34382,34399,34676,35703,35946,37804,38912,
+39013,24785,25110,37239,23130,26127,28151,28222,29759,39746,24573,24794,31503,
+21700,24344,27742,27859,27946,28888,32005,34425,35340,40251,21270,21644,23301,
+27194,28779,30069,31117,31166,33457,33775,35441,35649,36008,38772,64011,25844,
+25899,30906,30907,31339,20024,21914,22864,23462,24187,24739,25563,27489,26213,
+26707,28185,29029,29872,32008,36996,39529,39973,27963,28369,29502,35905,38346,
+20976,24140,24488,24653,24822,24880,24908,26179,26180,27045,27841,28255,28361,
+28514,29004,29852,30343,31681,31783,33618,34647,36945,38541,40643,21295,22238,
+24315,24458,24674,24724,25079,26214,26371,27292,28142,28590,28784,29546,32362,
+33214,33588,34516,35496,36036,21123,29554,23446,27243,37892,21742,22150,23389,
+25928,25989,26313,26783,28045,28102,29243,32948,37237,39501,20399,20505,21402,
+21518,21564,21897,21957,24127,24460,26429,29030,29661,36869,21211,21235,22628,
+22734,28932,29071,29179,34224,35347,26248,34216,21927,26244,29002,33841,21321,
+21913,27585,24409,24509,25582,26249,28999,35569,36637,40638,20241,25658,28875,
+30054,34407,24676,35662,40440,20807,20982,21256,27958,33016,40657,26133,27427,
+28824,30165,21507,23673,32007,35350,27424,27453,27462,21560,24688,27965,32725,
+33288,20694,20958,21916,22123,22221,23020,23305,24076,24985,24984,25137,26206,
+26342,29081,29113,29114,29351,31143,31232,32690,35440,
diff --git a/sources/android/support/src/musl-locale/langinfo.c b/sources/android/support/src/musl-locale/langinfo.c
index 9f56c5d..6a7c461 100644
--- a/sources/android/support/src/musl-locale/langinfo.c
+++ b/sources/android/support/src/musl-locale/langinfo.c
@@ -25,8 +25,8 @@
 static const char c_messages[] = "^[yY]\0" "^[nN]";
 static const char c_numeric[] = ".\0" "";
 
-// Android: this was __langinfo in musl.
-char *nl_langinfo(nl_item item)
+// Android: this was __nl_langinfo_l in musl.
+char *nl_langinfo_l(nl_item item, locale_t loc)
 {
 	int cat = item >> 16;
 	int idx = item & 65535;
@@ -58,3 +58,12 @@
 	for (; idx; idx--, str++) for (; *str; str++);
 	return (char *)str;
 }
+
+// Android: this was __nl_langinfo in musl
+char *nl_langinfo(nl_item item)
+{
+	return nl_langinfo_l(item, 0);
+}
+
+weak_alias(__nl_langinfo, nl_langinfo);
+weak_alias(__nl_langinfo_l, nl_langinfo_l);
diff --git a/sources/android/support/src/musl-locale/legacychars.h b/sources/android/support/src/musl-locale/legacychars.h
index 4ddbaeb..914ad0d 100644
--- a/sources/android/support/src/musl-locale/legacychars.h
+++ b/sources/android/support/src/musl-locale/legacychars.h
@@ -1,39 +1,41 @@
-0,1,160,167,168,169,175,176,178,183,184,198,215,216,230,247,248,256,257,258,
-259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,278,279,
-280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,
-299,302,303,304,305,308,309,310,311,312,313,314,315,316,317,318,321,322,323,
-324,325,326,327,328,330,331,332,333,336,337,338,339,340,341,342,343,344,345,
-346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,
-365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,402,
-416,417,431,432,536,537,538,539,710,711,728,729,731,732,733,768,769,771,777,
-803,890,900,901,902,904,905,906,908,910,911,912,913,914,915,916,917,918,919,
-920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,
-940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,
-959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1025,1026,
-1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,1040,1041,1042,
-1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,
-1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,
-1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,
-1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,
-1103,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,1119,
-1168,1169,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1467,1468,1469,
-1470,1471,1472,1473,1474,1475,1488,1489,1490,1491,1492,1493,1494,1495,1496,
-1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,
-1512,1513,1514,1520,1521,1522,1523,1524,1548,1563,1567,1569,1570,1571,1572,
-1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,
-1588,1589,1590,1591,1592,1593,1594,1600,1601,1602,1603,1604,1605,1606,1607,
-1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1657,1662,1670,1672,
-1681,1688,1705,1711,1722,1726,1729,1746,3585,3586,3587,3588,3589,3590,3591,
-3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,
-3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,
-3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,
-3637,3638,3639,3640,3641,3642,3647,3648,3649,3650,3651,3652,3653,3654,3655,
-3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,
-3671,3672,3673,3674,3675,7682,7683,7690,7691,7710,7711,7744,7745,7766,7767,
-7776,7777,7786,7787,7808,7809,7810,7811,7812,7813,7922,7923,8204,8205,8206,
-8207,8211,8212,8213,8215,8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,
-8240,8249,8250,8362,8363,8364,8367,8470,8482,8729,8730,8776,8804,8805,8992,
-8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,
-9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,
-9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,
-9616,9617,9618,9619,9632,
+0,1,160,167,168,169,175,176,178,183,184,198,215,216,230,247,248,162,163,165,
+196,197,198,199,201,214,215,216,220,224,226,228,229,230,231,232,233,234,235,
+236,238,239,242,244,246,248,249,251,252,255,256,257,258,259,260,261,262,263,
+264,265,266,267,268,269,270,271,272,273,274,275,278,279,280,281,282,283,284,
+285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,303,304,305,
+308,309,310,311,312,313,314,315,316,317,318,321,322,323,324,325,326,327,328,
+330,331,332,333,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,
+351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,
+370,371,372,373,374,375,376,377,378,379,380,381,382,402,416,417,431,432,536,
+537,538,539,710,711,728,729,731,732,733,768,769,771,777,803,890,900,901,902,
+904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,
+925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,
+945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,
+964,965,966,967,968,969,970,
+971,972,973,974,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,
+1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,
+1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,
+1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,
+1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,
+1098,1099,1100,1101,1102,1103,1105,1106,1107,1108,1109,1110,1111,1112,1113,
+1114,1115,1116,1118,1119,1168,1169,1456,1457,1458,1459,1460,1461,1462,1463,
+1464,1465,1467,1468,1469,1470,1471,1472,1473,1474,1475,1488,1489,1490,1491,
+1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,
+1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1548,1563,
+1567,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,
+1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1600,1601,1602,
+1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,
+1618,1657,1662,1670,1672,1681,1688,1705,1711,1722,1726,1729,1746,3585,3586,
+3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,
+3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,
+3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,
+3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3647,3648,3649,3650,
+3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,
+3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,7682,7683,7690,7691,7710,
+7711,7744,7745,7766,7767,7776,7777,7786,7787,7808,7809,7810,7811,7812,7813,
+7922,7923,8204,8205,8206,8207,8211,8212,8213,8215,8216,8217,8218,8220,8221,
+8222,8224,8225,8226,8230,8240,8249,8250,8362,8363,8364,8367,8359,8470,8482,
+8729,8730,8776,8804,8805,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,
+9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,
+9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,
+9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,
diff --git a/sources/android/support/src/musl-locale/libintl.h b/sources/android/support/src/musl-locale/libintl.h
new file mode 100644
index 0000000..0aab080
--- /dev/null
+++ b/sources/android/support/src/musl-locale/libintl.h
@@ -0,0 +1 @@
+/* Intentionally empty */
diff --git a/sources/android/support/src/musl-locale/newlocale.c b/sources/android/support/src/musl-locale/newlocale.c
index 986e796..447c8fc 100644
--- a/sources/android/support/src/musl-locale/newlocale.c
+++ b/sources/android/support/src/musl-locale/newlocale.c
@@ -1,6 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "locale_impl.h"
+#include "libc.h"
 
 locale_t newlocale(int mask, const char *name, locale_t base)
 {
@@ -9,3 +10,5 @@
 	if (!base) base = calloc(1, sizeof *base);
 	return base;
 }
+
+weak_alias(newlocale, __newlocale);
diff --git a/sources/android/support/src/musl-locale/strcoll.c b/sources/android/support/src/musl-locale/strcoll.c
index 30bccd6..5d7d909 100644
--- a/sources/android/support/src/musl-locale/strcoll.c
+++ b/sources/android/support/src/musl-locale/strcoll.c
@@ -1,6 +1,16 @@
 #include <string.h>
+#include <locale.h>
+#include "libc.h"
 
-int strcoll(const char *l, const char *r)
+// ANDROID: was __strcoll_l
+int strcoll_l(const char *l, const char *r, locale_t loc)
 {
 	return strcmp(l, r);
 }
+
+int strcoll(const char *l, const char *r)
+{
+	return strcoll_l(l, r, 0);
+}
+
+weak_alias(__strcoll_l, strcoll_l);
diff --git a/sources/android/support/src/musl-locale/strfmon.c b/sources/android/support/src/musl-locale/strfmon.c
index f510d9a..e25db97 100644
--- a/sources/android/support/src/musl-locale/strfmon.c
+++ b/sources/android/support/src/musl-locale/strfmon.c
@@ -3,7 +3,6 @@
 #include <stdarg.h>
 #include <monetary.h>
 #include <errno.h>
-#include <stdarg.h>
 
 static ssize_t vstrfmon_l(char *s, size_t n, locale_t loc, const char *fmt, va_list ap)
 {
diff --git a/sources/android/support/src/musl-locale/strxfrm.c b/sources/android/support/src/musl-locale/strxfrm.c
index d40be9e..6dc2bac 100644
--- a/sources/android/support/src/musl-locale/strxfrm.c
+++ b/sources/android/support/src/musl-locale/strxfrm.c
@@ -1,9 +1,19 @@
 #include <string.h>
+#include <locale.h>
+#include "libc.h"
 
 /* collate only by code points */
-size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
+// ANDROID: was __strxfrm_l in Musl
+size_t strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc)
 {
 	size_t l = strlen(src);
 	if (n > l) strcpy(dest, src);
 	return l;
 }
+
+size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
+{
+	return strxfrm_l(dest, src, n, 0);
+}
+
+weak_alias(__strxfrm_l, strxfrm_l);
diff --git a/sources/android/support/src/musl-locale/towlower_l.c b/sources/android/support/src/musl-locale/towlower_l.c
index 05fcde5..aaaea37 100644
--- a/sources/android/support/src/musl-locale/towlower_l.c
+++ b/sources/android/support/src/musl-locale/towlower_l.c
@@ -1,6 +1,9 @@
 #include <wctype.h>
+#include "libc.h"
 
 wint_t towlower_l(wint_t c, locale_t l)
 {
 	return towlower(c);
 }
+
+weak_alias(towlower_l, __towlower_l);
diff --git a/sources/android/support/src/musl-locale/towupper_l.c b/sources/android/support/src/musl-locale/towupper_l.c
index aa861ae..ad02a4b 100644
--- a/sources/android/support/src/musl-locale/towupper_l.c
+++ b/sources/android/support/src/musl-locale/towupper_l.c
@@ -1,6 +1,9 @@
 #include <wctype.h>
+#include "libc.h"
 
 wint_t towupper_l(wint_t c, locale_t l)
 {
 	return towupper(c);
 }
+
+weak_alias(towupper_l, __towupper_l);
diff --git a/sources/android/support/src/musl-locale/wcscoll.c b/sources/android/support/src/musl-locale/wcscoll.c
index cdbce1c..621c871 100644
--- a/sources/android/support/src/musl-locale/wcscoll.c
+++ b/sources/android/support/src/musl-locale/wcscoll.c
@@ -1,7 +1,17 @@
 #include <wchar.h>
+#include <locale.h>
+#include "libc.h"
 
 /* FIXME: stub */
-int wcscoll(const wchar_t *l, const wchar_t *r)
+// ANDROID: was __wcscoll_l in Musl
+int wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale)
 {
 	return wcscmp(l, r);
 }
+
+int wcscoll(const wchar_t *l, const wchar_t *r)
+{
+	return wcscoll_l(l, r, 0);
+}
+
+weak_alias(__wcscoll_l, wcscoll_l);
diff --git a/sources/android/support/src/musl-locale/wcsxfrm.c b/sources/android/support/src/musl-locale/wcsxfrm.c
index bfa01b5..de5914c 100644
--- a/sources/android/support/src/musl-locale/wcsxfrm.c
+++ b/sources/android/support/src/musl-locale/wcsxfrm.c
@@ -1,12 +1,24 @@
 #include <wchar.h>
+#include <locale.h>
+#include "libc.h"
 
 /* collate only by code points */
+// ANDROID: Was __wcsxfrm_l in Musl
+size_t wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t n, locale_t loc)
+{
+        size_t l = wcslen(src);
+        if (l < n) {
+                wmemcpy(dest, src, l+1);
+        } else if (n) {
+                wmemcpy(dest, src, n-1);
+                dest[n-1] = 0;
+        }
+        return l;
+}
+
 size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n)
 {
-	size_t l = wcslen(src);
-	if (l >= n) {
-		wmemcpy(dest, src, n-1);
-		dest[n-1] = 0;
-	} else wcscpy(dest, src);
-	return l;
+        return wcsxfrm_l(dest, src, n, 0);
 }
+
+weak_alias(__wcsxfrm_l, wcsxfrm_l);
diff --git a/sources/android/support/src/musl-locale/wctype_l.c b/sources/android/support/src/musl-locale/wctype_l.c
index 01f9c67..601bab3 100644
--- a/sources/android/support/src/musl-locale/wctype_l.c
+++ b/sources/android/support/src/musl-locale/wctype_l.c
@@ -1,6 +1,9 @@
 #include <wctype.h>
+#include "libc.h"
 
 wctype_t wctype_l(const char *s, locale_t l)
 {
 	return wctype(s);
 }
+
+weak_alias(wctype_l, __wctype_l);
diff --git a/sources/android/support/src/musl-math/complex.h b/sources/android/support/src/musl-math/complex.h
new file mode 100644
index 0000000..0aab080
--- /dev/null
+++ b/sources/android/support/src/musl-math/complex.h
@@ -0,0 +1 @@
+/* Intentionally empty */
diff --git a/sources/android/support/src/musl-math/frexpl.c b/sources/android/support/src/musl-math/frexpl.c
index 6c35db7..3c1b553 100644
--- a/sources/android/support/src/musl-math/frexpl.c
+++ b/sources/android/support/src/musl-math/frexpl.c
@@ -1,21 +1,20 @@
-#include <math.h>
-#include <stdint.h>
-#include <float.h>
+#include "libm.h"
 
-#ifndef __LP64__
-#if LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
-
-/* This version is for 80-bit little endian long double */
-
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double frexpl(long double x, int *e)
 {
-	union { long double ld; uint16_t hw[5]; } y = { x };
-	int ee = y.hw[4]&0x7fff;
+	return frexp(x, e);
+}
+#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
+long double frexpl(long double x, int *e)
+{
+	union ldshape u = {x};
+	int ee = u.i.se & 0x7fff;
 
 	if (!ee) {
 		if (x) {
-			x = frexpl(x*0x1p64, e);
-			*e -= 64;
+			x = frexpl(x*0x1p120, e);
+			*e -= 120;
 		} else *e = 0;
 		return x;
 	} else if (ee == 0x7fff) {
@@ -23,17 +22,8 @@
 	}
 
 	*e = ee - 0x3ffe;
-	y.hw[4] &= 0x8000;
-	y.hw[4] |= 0x3ffe;
-	return y.ld;
+	u.i.se &= 0x8000;
+	u.i.se |= 0x3ffe;
+	return u.f;
 }
-
-#else
-
-long double frexpl(long double x, int *e)
-{
-	return frexp(x, e);
-}
-
 #endif
-#endif /* __LP64__ */
diff --git a/sources/android/support/src/musl-math/libm.h b/sources/android/support/src/musl-math/libm.h
new file mode 100644
index 0000000..fb6764f
--- /dev/null
+++ b/sources/android/support/src/musl-math/libm.h
@@ -0,0 +1,161 @@
+/* origin: FreeBSD /usr/src/lib/msun/src/math_private.h */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#ifndef _LIBM_H
+#define _LIBM_H
+
+#include <stdint.h>
+#include <float.h>
+#include <math.h>
+// ANDROID
+//#include <complex.h>
+#include <endian.h>
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN
+union ldshape {
+	long double f;
+	struct {
+		uint64_t m;
+		uint16_t se;
+	} i;
+};
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN
+union ldshape {
+	long double f;
+	struct {
+		uint64_t lo;
+		uint32_t mid;
+		uint16_t top;
+		uint16_t se;
+	} i;
+	struct {
+		uint64_t lo;
+		uint64_t hi;
+	} i2;
+};
+#else
+#error Unsupported long double representation
+#endif
+
+#define FORCE_EVAL(x) do {                        \
+	if (sizeof(x) == sizeof(float)) {         \
+		volatile float __x;               \
+		__x = (x);                        \
+	} else if (sizeof(x) == sizeof(double)) { \
+		volatile double __x;              \
+		__x = (x);                        \
+	} else {                                  \
+		volatile long double __x;         \
+		__x = (x);                        \
+	}                                         \
+} while(0)
+
+/* Get two 32 bit ints from a double.  */
+#define EXTRACT_WORDS(hi,lo,d)                    \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.f = (d);                                    \
+  (hi) = __u.i >> 32;                             \
+  (lo) = (uint32_t)__u.i;                         \
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+#define GET_HIGH_WORD(hi,d)                       \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.f = (d);                                    \
+  (hi) = __u.i >> 32;                             \
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+#define GET_LOW_WORD(lo,d)                        \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.f = (d);                                    \
+  (lo) = (uint32_t)__u.i;                         \
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+#define INSERT_WORDS(d,hi,lo)                     \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.i = ((uint64_t)(hi)<<32) | (uint32_t)(lo);  \
+  (d) = __u.f;                                    \
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+#define SET_HIGH_WORD(d,hi)                       \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.f = (d);                                    \
+  __u.i &= 0xffffffff;                            \
+  __u.i |= (uint64_t)(hi) << 32;                  \
+  (d) = __u.f;                                    \
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+#define SET_LOW_WORD(d,lo)                        \
+do {                                              \
+  union {double f; uint64_t i;} __u;              \
+  __u.f = (d);                                    \
+  __u.i &= 0xffffffff00000000ull;                 \
+  __u.i |= (uint32_t)(lo);                        \
+  (d) = __u.f;                                    \
+} while (0)
+
+/* Get a 32 bit int from a float.  */
+#define GET_FLOAT_WORD(w,d)                       \
+do {                                              \
+  union {float f; uint32_t i;} __u;               \
+  __u.f = (d);                                    \
+  (w) = __u.i;                                    \
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+#define SET_FLOAT_WORD(d,w)                       \
+do {                                              \
+  union {float f; uint32_t i;} __u;               \
+  __u.i = (w);                                    \
+  (d) = __u.f;                                    \
+} while (0)
+
+/* fdlibm kernel functions */
+
+int    __rem_pio2_large(double*,double*,int,int,int);
+
+int    __rem_pio2(double,double*);
+double __sin(double,double,int);
+double __cos(double,double);
+double __tan(double,double,int);
+double __expo2(double);
+// ANDROID
+//double complex __ldexp_cexp(double complex,int);
+
+int    __rem_pio2f(float,double*);
+float  __sindf(double);
+float  __cosdf(double);
+float  __tandf(double,int);
+float  __expo2f(float);
+// ANDROID
+//float complex __ldexp_cexpf(float complex,int);
+
+int __rem_pio2l(long double, long double *);
+long double __sinl(long double, long double, int);
+long double __cosl(long double, long double);
+long double __tanl(long double, long double, int);
+
+/* polynomial evaluation */
+long double __polevll(long double, const long double *, int);
+long double __p1evll(long double, const long double *, int);
+
+#endif
diff --git a/sources/android/support/src/musl-math/s_scalbln.c b/sources/android/support/src/musl-math/s_scalbln.c
deleted file mode 100644
index a517644..0000000
--- a/sources/android/support/src/musl-math/s_scalbln.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(__i386__)
-/* scalbln scalblnf and scalblnl aren't supported in x86 until API >= 18 */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <limits.h>
-#include <math.h>
-
-double
-scalbln (double x, long n)
-{
-	int in;
-
-	in = (int)n;
-	if (in != n) {
-		if (n > 0)
-			in = INT_MAX;
-		else
-			in = INT_MIN;
-	}
-	return (scalbn(x, in));
-}
-
-float
-scalblnf (float x, long n)
-{
-	int in;
-
-	in = (int)n;
-	if (in != n) {
-		if (n > 0)
-			in = INT_MAX;
-		else
-			in = INT_MIN;
-	}
-	return (scalbnf(x, in));
-}
-
-long double
-scalblnl (long double x, long n)
-{
-	int in;
-
-	in = (int)n;
-	if (in != n) {
-		if (n > 0)
-			in = INT_MAX;
-		else
-			in = INT_MIN;
-	}
-	return (scalbnl(x, (int)n));
-}
-
-#endif
\ No newline at end of file
diff --git a/sources/android/support/src/musl-math/scalbln.c b/sources/android/support/src/musl-math/scalbln.c
new file mode 100644
index 0000000..e6f3f19
--- /dev/null
+++ b/sources/android/support/src/musl-math/scalbln.c
@@ -0,0 +1,11 @@
+#include <limits.h>
+#include <math.h>
+
+double scalbln(double x, long n)
+{
+	if (n > INT_MAX)
+		n = INT_MAX;
+	else if (n < INT_MIN)
+		n = INT_MIN;
+	return scalbn(x, n);
+}
diff --git a/sources/android/support/src/musl-math/scalblnf.c b/sources/android/support/src/musl-math/scalblnf.c
new file mode 100644
index 0000000..d8e8166
--- /dev/null
+++ b/sources/android/support/src/musl-math/scalblnf.c
@@ -0,0 +1,11 @@
+#include <limits.h>
+#include <math.h>
+
+float scalblnf(float x, long n)
+{
+	if (n > INT_MAX)
+		n = INT_MAX;
+	else if (n < INT_MIN)
+		n = INT_MIN;
+	return scalbnf(x, n);
+}
diff --git a/sources/android/support/src/musl-math/scalblnl.c b/sources/android/support/src/musl-math/scalblnl.c
new file mode 100644
index 0000000..854c51c
--- /dev/null
+++ b/sources/android/support/src/musl-math/scalblnl.c
@@ -0,0 +1,19 @@
+#include <limits.h>
+#include <math.h>
+#include <float.h>
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double scalblnl(long double x, long n)
+{
+	return scalbln(x, n);
+}
+#else
+long double scalblnl(long double x, long n)
+{
+	if (n > INT_MAX)
+		n = INT_MAX;
+	else if (n < INT_MIN)
+		n = INT_MIN;
+	return scalbnl(x, n);
+}
+#endif
diff --git a/sources/android/support/src/musl-math/scalbnl.c b/sources/android/support/src/musl-math/scalbnl.c
new file mode 100644
index 0000000..08a4c58
--- /dev/null
+++ b/sources/android/support/src/musl-math/scalbnl.c
@@ -0,0 +1,36 @@
+#include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double scalbnl(long double x, int n)
+{
+	return scalbn(x, n);
+}
+#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
+long double scalbnl(long double x, int n)
+{
+	union ldshape u;
+
+	if (n > 16383) {
+		x *= 0x1p16383L;
+		n -= 16383;
+		if (n > 16383) {
+			x *= 0x1p16383L;
+			n -= 16383;
+			if (n > 16383)
+				n = 16383;
+		}
+	} else if (n < -16382) {
+		x *= 0x1p-16382L;
+		n += 16382;
+		if (n < -16382) {
+			x *= 0x1p-16382L;
+			n += 16382;
+			if (n < -16382)
+				n = -16382;
+		}
+	}
+	u.f = 1.0;
+	u.i.se = 0x3fff + n;
+	return x * u.f;
+}
+#endif
diff --git a/sources/android/support/src/musl-multibyte/internal.c b/sources/android/support/src/musl-multibyte/internal.c
index ab22806..1813b26 100644
--- a/sources/android/support/src/musl-multibyte/internal.c
+++ b/sources/android/support/src/musl-multibyte/internal.c
@@ -4,8 +4,6 @@
  * unnecessary.
  */
 
-#include <inttypes.h>
-
 #include "internal.h"
 
 #define C(x) ( x<2 ? -1 : ( R(0x80,0xc0) | x ) )
diff --git a/sources/android/support/src/musl-multibyte/internal.h b/sources/android/support/src/musl-multibyte/internal.h
index 25ba240..82f5a07 100644
--- a/sources/android/support/src/musl-multibyte/internal.h
+++ b/sources/android/support/src/musl-multibyte/internal.h
@@ -6,6 +6,7 @@
 
 #define bittab __fsmu8
 
+#include <stdint.h>
 #include "libc.h"
 
 extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY;
diff --git a/sources/android/support/src/musl-multibyte/mblen.c b/sources/android/support/src/musl-multibyte/mblen.c
index 26d3564..96b47b1 100644
--- a/sources/android/support/src/musl-multibyte/mblen.c
+++ b/sources/android/support/src/musl-multibyte/mblen.c
@@ -5,11 +5,6 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
-#include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mblen(const char *s, size_t n)
 {
diff --git a/sources/android/support/src/musl-multibyte/mbrlen.c b/sources/android/support/src/musl-multibyte/mbrlen.c
index c9714ef..3a5a743 100644
--- a/sources/android/support/src/musl-multibyte/mbrlen.c
+++ b/sources/android/support/src/musl-multibyte/mbrlen.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st)
 {
diff --git a/sources/android/support/src/musl-multibyte/mbrtowc.c b/sources/android/support/src/musl-multibyte/mbrtowc.c
index db80366..35e834e 100644
--- a/sources/android/support/src/musl-multibyte/mbrtowc.c
+++ b/sources/android/support/src/musl-multibyte/mbrtowc.c
@@ -4,11 +4,8 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbrtowc(wchar_t *restrict wc, const char *restrict src, size_t n, mbstate_t *restrict st)
diff --git a/sources/android/support/src/musl-multibyte/mbsinit.c b/sources/android/support/src/musl-multibyte/mbsinit.c
index c0e7e49..e001d84 100644
--- a/sources/android/support/src/musl-multibyte/mbsinit.c
+++ b/sources/android/support/src/musl-multibyte/mbsinit.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mbsinit(const mbstate_t *st)
 {
diff --git a/sources/android/support/src/musl-multibyte/mbsnrtowcs.c b/sources/android/support/src/musl-multibyte/mbsnrtowcs.c
index 33457f9..68b9960 100644
--- a/sources/android/support/src/musl-multibyte/mbsnrtowcs.c
+++ b/sources/android/support/src/musl-multibyte/mbsnrtowcs.c
@@ -4,13 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-#include <stdio.h>
-
-#include "internal.h"
 
 size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st)
 {
diff --git a/sources/android/support/src/musl-multibyte/mbsrtowcs.c b/sources/android/support/src/musl-multibyte/mbsrtowcs.c
index 75a493c..3c1343a 100644
--- a/sources/android/support/src/musl-multibyte/mbsrtowcs.c
+++ b/sources/android/support/src/musl-multibyte/mbsrtowcs.c
@@ -4,11 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbsrtowcs(wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st)
@@ -54,9 +52,12 @@
 		wn--;
 		c = 0;
 	} else for (;;) {
-		if (!wn) return wn0;
+		if (!wn) {
+			*src = (const void *)s;
+			return wn0;
+		}
 		if (*s-1u < 0x7f && (uintptr_t)s%4 == 0) {
-			while (wn>=4 && !(( *(uint32_t*)s | *(uint32_t*)s-0x01010101) & 0x80808080)) {
+			while (wn>=5 && !(( *(uint32_t*)s | *(uint32_t*)s-0x01010101) & 0x80808080)) {
 				*ws++ = *s++;
 				*ws++ = *s++;
 				*ws++ = *s++;
diff --git a/sources/android/support/src/musl-multibyte/mbtowc.c b/sources/android/support/src/musl-multibyte/mbtowc.c
index ec9e54a..6710637 100644
--- a/sources/android/support/src/musl-multibyte/mbtowc.c
+++ b/sources/android/support/src/musl-multibyte/mbtowc.c
@@ -4,13 +4,10 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
-#include <stdio.h>
+
 int mbtowc(wchar_t *restrict wc, const char *restrict src, size_t n)
 {
 	unsigned c;
diff --git a/sources/android/support/src/musl-multibyte/wcrtomb.c b/sources/android/support/src/musl-multibyte/wcrtomb.c
index 250649f..59f733d 100644
--- a/sources/android/support/src/musl-multibyte/wcrtomb.c
+++ b/sources/android/support/src/musl-multibyte/wcrtomb.c
@@ -4,13 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
 
-#include "internal.h"
-
 size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict st)
 {
 	if (!s) return 1;
diff --git a/sources/android/support/src/musl-multibyte/wcsnrtombs.c b/sources/android/support/src/musl-multibyte/wcsnrtombs.c
index a2e308b..7eb05d4 100644
--- a/sources/android/support/src/musl-multibyte/wcsnrtombs.c
+++ b/sources/android/support/src/musl-multibyte/wcsnrtombs.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
 {
diff --git a/sources/android/support/src/musl-multibyte/wcsrtombs.c b/sources/android/support/src/musl-multibyte/wcsrtombs.c
index d48a65e..30be415 100644
--- a/sources/android/support/src/musl-multibyte/wcsrtombs.c
+++ b/sources/android/support/src/musl-multibyte/wcsrtombs.c
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st)
 {
@@ -26,8 +21,13 @@
 		}
 		return n;
 	}
-	while (n>=4 && **ws) {
-		if (**ws >= 0x80u) {
+	while (n>=4) {
+		if (**ws-1u >= 0x7fu) {
+			if (!**ws) {
+				*s = 0;
+				*ws = 0;
+				return N-n;
+			}
 			l = wcrtomb(s, **ws, 0);
 			if (!(l+1)) return -1;
 			s += l;
@@ -38,8 +38,13 @@
 		}
 		(*ws)++;
 	}
-	while (n && **ws) {
-		if (**ws >= 0x80u) {
+	while (n) {
+		if (**ws-1u >= 0x7fu) {
+			if (!**ws) {
+				*s = 0;
+				*ws = 0;
+				return N-n;
+			}
 			l = wcrtomb(buf, **ws, 0);
 			if (!(l+1)) return -1;
 			if (l>n) return N-n;
@@ -52,7 +57,5 @@
 		}
 		(*ws)++;
 	}
-	if (n) *s = 0;
-	*ws = 0;
-	return N-n;
+	return N;
 }
diff --git a/sources/android/support/src/musl-multibyte/wctomb.c b/sources/android/support/src/musl-multibyte/wctomb.c
index 6910ef3..de7ed84 100644
--- a/sources/android/support/src/musl-multibyte/wctomb.c
+++ b/sources/android/support/src/musl-multibyte/wctomb.c
@@ -5,11 +5,7 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int wctomb(char *s, wchar_t wc)
 {
diff --git a/sources/android/support/src/musl-stdio/swprintf.c b/sources/android/support/src/musl-stdio/swprintf.c
index cbf83d2..f75eb11 100644
--- a/sources/android/support/src/musl-stdio/swprintf.c
+++ b/sources/android/support/src/musl-stdio/swprintf.c
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
 
diff --git a/sources/android/support/src/stdio/stdio_impl.c b/sources/android/support/src/stdio/stdio_impl.c
index e3c442d..e06d526 100644
--- a/sources/android/support/src/stdio/stdio_impl.c
+++ b/sources/android/support/src/stdio/stdio_impl.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <wchar.h>
+#include <stdlib.h>
 #include <string.h>
 
 #define _STDIO_IMPL_NO_REDIRECT_MACROS
@@ -12,7 +13,7 @@
 
 void fake_file_init_buffer(FakeFILE* file, char* buffer, size_t buffer_size) {
   memset(file, 0, sizeof(*file));
-  file->buffer = buffer;
+  file->buffer = (void*)buffer;
   file->buffer_pos = 0;
   file->buffer_size = buffer_size;
 }
diff --git a/sources/android/support/src/stdio/strtod.c b/sources/android/support/src/stdio/strtod.c
index daea37c..3f4a9a1 100644
--- a/sources/android/support/src/stdio/strtod.c
+++ b/sources/android/support/src/stdio/strtod.c
@@ -94,6 +94,9 @@
 #define ANDROID_CHANGES
 
 #ifdef ANDROID_CHANGES
+/* Needs to be above math.h include below */
+#include "fpmath.h"
+
 #include <pthread.h>
 #define mutex_lock(x) pthread_mutex_lock(x)
 #define mutex_unlock(x) pthread_mutex_unlock(x)
@@ -2987,7 +2990,6 @@
 }
 
 #include <limits.h>
-#include "fpmath.h"
 
  char *
 rv_alloc(int i)
diff --git a/sources/android/support/src/stdio/vfprintf.c b/sources/android/support/src/stdio/vfprintf.c
index 5789acf..06c7223 100644
--- a/sources/android/support/src/stdio/vfprintf.c
+++ b/sources/android/support/src/stdio/vfprintf.c
@@ -27,6 +27,7 @@
 #include <limits.h>
 #include <string.h>
 #include <stdarg.h>
+#include <stdlib.h>
 #include <wchar.h>
 #include <inttypes.h>
 #include <math.h>
diff --git a/sources/android/support/src/wchar_support.c b/sources/android/support/src/wchar_support.c
index 2a657e9..fad1875 100644
--- a/sources/android/support/src/wchar_support.c
+++ b/sources/android/support/src/wchar_support.c
@@ -348,45 +348,3 @@
         s[i] = c;
     return s;
 }
-
-float wcstof(const wchar_t* nptr, wchar_t** endptr) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-long wcstol(const wchar_t* nptr, wchar_t** endptr, int base) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-long double wcstold(const wchar_t* nptr, wchar_t** endptr) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-long long wcstoll(const wchar_t* nptr, wchar_t** endptr, int base) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-unsigned long long wcstoull(const wchar_t* nptr, wchar_t** endptr, int base) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-intmax_t wcstoimax (const wchar_t * nptr, wchar_t** endptr , int base) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
-
-uintmax_t wcstoumax (const wchar_t * nptr, wchar_t** endptr , int base) {
-#warning Not implemented
-  assert(0);
-  return 0;
-}
diff --git a/sources/android/support/src/wcstox/floatscan.c b/sources/android/support/src/wcstox/floatscan.c
new file mode 100644
index 0000000..3b9d446
--- /dev/null
+++ b/sources/android/support/src/wcstox/floatscan.c
@@ -0,0 +1,525 @@
+// ----------------------------------------------------------------------
+// Copyright © 2005-2014 Rich Felker, et al.
+// Copyright 2014 The Android Open Source Project.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ----------------------------------------------------------------------
+
+#include <stdint.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+#include <limits.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "shgetc.h"
+#include "floatscan.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+
+#define LD_B1B_DIG 2
+#define LD_B1B_MAX 9007199, 254740991
+#define KMAX 128
+
+#else /* LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 */
+
+#define LD_B1B_DIG 3
+#define LD_B1B_MAX 18, 446744073, 709551615
+#define KMAX 2048
+
+#endif
+
+#define MASK (KMAX-1)
+
+#define CONCAT2(x,y) x ## y
+#define CONCAT(x,y) CONCAT2(x,y)
+
+// ANDROID: The original Musl sources use a FILE* handle, but redefine the
+//          type to match our custom fake_file_t from shgetc.h
+#undef FILE
+#define FILE  struct fake_file_t
+
+static long long scanexp(FILE *f, int pok)
+{
+	int c;
+	int x;
+	long long y;
+	int neg = 0;
+	
+	c = shgetc(f);
+	if (c=='+' || c=='-') {
+		neg = (c=='-');
+		c = shgetc(f);
+		if (c-'0'>=10U && pok) shunget(f);
+	}
+	if (c-'0'>=10U) {
+		shunget(f);
+		return LLONG_MIN;
+	}
+	for (x=0; c-'0'<10U && x<INT_MAX/10; c = shgetc(f))
+		x = 10*x + c-'0';
+	for (y=x; c-'0'<10U && y<LLONG_MAX/100; c = shgetc(f))
+		y = 10*y + c-'0';
+	for (; c-'0'<10U; c = shgetc(f));
+	shunget(f);
+	return neg ? -y : y;
+}
+
+
+static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int pok)
+{
+	uint32_t x[KMAX];
+	static const uint32_t th[] = { LD_B1B_MAX };
+	int i, j, k, a, z;
+	long long lrp=0, dc=0;
+	long long e10=0;
+	int lnz = 0;
+	int gotdig = 0, gotrad = 0;
+	int rp;
+	int e2;
+	int emax = -emin-bits+3;
+	int denormal = 0;
+	long double y;
+	long double frac=0;
+	long double bias=0;
+	static const int p10s[] = { 10, 100, 1000, 10000,
+		100000, 1000000, 10000000, 100000000 };
+
+	j=0;
+	k=0;
+
+	/* Don't let leading zeros consume buffer space */
+	for (; c=='0'; c = shgetc(f)) gotdig=1;
+	if (c=='.') {
+		gotrad = 1;
+		for (c = shgetc(f); c=='0'; c = shgetc(f)) gotdig=1, lrp--;
+	}
+
+	x[0] = 0;
+	for (; c-'0'<10U || c=='.'; c = shgetc(f)) {
+		if (c == '.') {
+			if (gotrad) break;
+			gotrad = 1;
+			lrp = dc;
+		} else if (k < KMAX-3) {
+			dc++;
+			if (c!='0') lnz = dc;
+			if (j) x[k] = x[k]*10 + c-'0';
+			else x[k] = c-'0';
+			if (++j==9) {
+				k++;
+				j=0;
+			}
+			gotdig=1;
+		} else {
+			dc++;
+			if (c!='0') x[KMAX-4] |= 1;
+		}
+	}
+	if (!gotrad) lrp=dc;
+
+	if (gotdig && (c|32)=='e') {
+		e10 = scanexp(f, pok);
+		if (e10 == LLONG_MIN) {
+			if (pok) {
+				shunget(f);
+			} else {
+				shlim(f, 0);
+				return 0;
+			}
+			e10 = 0;
+		}
+		lrp += e10;
+	} else if (c>=0) {
+		shunget(f);
+	}
+	if (!gotdig) {
+		errno = EINVAL;
+		shlim(f, 0);
+		return 0;
+	}
+
+	/* Handle zero specially to avoid nasty special cases later */
+	if (!x[0]) return sign * 0.0;
+
+	/* Optimize small integers (w/no exponent) and over/under-flow */
+	if (lrp==dc && dc<10 && (bits>30 || x[0]>>bits==0))
+		return sign * (long double)x[0];
+	if (lrp > -emin/2) {
+		errno = ERANGE;
+		return sign * LDBL_MAX * LDBL_MAX;
+	}
+	if (lrp < emin-2*LDBL_MANT_DIG) {
+		errno = ERANGE;
+		return sign * LDBL_MIN * LDBL_MIN;
+	}
+
+	/* Align incomplete final B1B digit */
+	if (j) {
+		for (; j<9; j++) x[k]*=10;
+		k++;
+		j=0;
+	}
+
+	a = 0;
+	z = k;
+	e2 = 0;
+	rp = lrp;
+
+	/* Optimize small to mid-size integers (even in exp. notation) */
+	if (lnz<9 && lnz<=rp && rp < 18) {
+		if (rp == 9) return sign * (long double)x[0];
+		if (rp < 9) return sign * (long double)x[0] / p10s[8-rp];
+		int bitlim = bits-3*(int)(rp-9);
+		if (bitlim>30 || x[0]>>bitlim==0)
+			return sign * (long double)x[0] * p10s[rp-10];
+	}
+
+	/* Align radix point to B1B digit boundary */
+	if (rp % 9) {
+		int rpm9 = rp>=0 ? rp%9 : rp%9+9;
+		int p10 = p10s[8-rpm9];
+		uint32_t carry = 0;
+		for (k=a; k!=z; k++) {
+			uint32_t tmp = x[k] % p10;
+			x[k] = x[k]/p10 + carry;
+			carry = 1000000000/p10 * tmp;
+			if (k==a && !x[k]) {
+				a = (a+1 & MASK);
+				rp -= 9;
+			}
+		}
+		if (carry) x[z++] = carry;
+		rp += 9-rpm9;
+	}
+
+	/* Upscale until desired number of bits are left of radix point */
+	while (rp < 9*LD_B1B_DIG || (rp == 9*LD_B1B_DIG && x[a]<th[0])) {
+		uint32_t carry = 0;
+		e2 -= 29;
+		for (k=(z-1 & MASK); ; k=(k-1 & MASK)) {
+			uint64_t tmp = ((uint64_t)x[k] << 29) + carry;
+			if (tmp > 1000000000) {
+				carry = tmp / 1000000000;
+				x[k] = tmp % 1000000000;
+			} else {
+				carry = 0;
+				x[k] = tmp;
+			}
+			if (k==(z-1 & MASK) && k!=a && !x[k]) z = k;
+			if (k==a) break;
+		}
+		if (carry) {
+			rp += 9;
+			a = (a-1 & MASK);
+			if (a == z) {
+				z = (z-1 & MASK);
+				x[z-1 & MASK] |= x[z];
+			}
+			x[a] = carry;
+		}
+	}
+
+	/* Downscale until exactly number of bits are left of radix point */
+	for (;;) {
+		uint32_t carry = 0;
+		int sh = 1;
+		for (i=0; i<LD_B1B_DIG; i++) {
+			k = (a+i & MASK);
+			if (k == z || x[k] < th[i]) {
+				i=LD_B1B_DIG;
+				break;
+			}
+			if (x[a+i & MASK] > th[i]) break;
+		}
+		if (i==LD_B1B_DIG && rp==9*LD_B1B_DIG) break;
+		/* FIXME: find a way to compute optimal sh */
+		if (rp > 9+9*LD_B1B_DIG) sh = 9;
+		e2 += sh;
+		for (k=a; k!=z; k=(k+1 & MASK)) {
+			uint32_t tmp = x[k] & (1<<sh)-1;
+			x[k] = (x[k]>>sh) + carry;
+			carry = (1000000000>>sh) * tmp;
+			if (k==a && !x[k]) {
+				a = (a+1 & MASK);
+				i--;
+				rp -= 9;
+			}
+		}
+		if (carry) {
+			if ((z+1 & MASK) != a) {
+				x[z] = carry;
+				z = (z+1 & MASK);
+			} else x[z-1 & MASK] |= 1;
+		}
+	}
+
+	/* Assemble desired bits into floating point variable */
+	for (y=i=0; i<LD_B1B_DIG; i++) {
+		if ((a+i & MASK)==z) x[(z=(z+1 & MASK))-1] = 0;
+		y = 1000000000.0L * y + x[a+i & MASK];
+	}
+
+	y *= sign;
+
+	/* Limit precision for denormal results */
+	if (bits > LDBL_MANT_DIG+e2-emin) {
+		bits = LDBL_MANT_DIG+e2-emin;
+		if (bits<0) bits=0;
+		denormal = 1;
+	}
+
+	/* Calculate bias term to force rounding, move out lower bits */
+	if (bits < LDBL_MANT_DIG) {
+		bias = copysignl(scalbn(1, 2*LDBL_MANT_DIG-bits-1), y);
+		frac = fmodl(y, scalbn(1, LDBL_MANT_DIG-bits));
+		y -= frac;
+		y += bias;
+	}
+
+	/* Process tail of decimal input so it can affect rounding */
+	if ((a+i & MASK) != z) {
+		uint32_t t = x[a+i & MASK];
+		if (t < 500000000 && (t || (a+i+1 & MASK) != z))
+			frac += 0.25*sign;
+		else if (t > 500000000)
+			frac += 0.75*sign;
+		else if (t == 500000000) {
+			if ((a+i+1 & MASK) == z)
+				frac += 0.5*sign;
+			else
+				frac += 0.75*sign;
+		}
+		if (LDBL_MANT_DIG-bits >= 2 && !fmodl(frac, 1))
+			frac++;
+	}
+
+	y += frac;
+	y -= bias;
+
+	if ((e2+LDBL_MANT_DIG & INT_MAX) > emax-5) {
+		if (fabs(y) >= CONCAT(0x1p, LDBL_MANT_DIG)) {
+			if (denormal && bits==LDBL_MANT_DIG+e2-emin)
+				denormal = 0;
+			y *= 0.5;
+			e2++;
+		}
+		if (e2+LDBL_MANT_DIG>emax || (denormal && frac))
+			errno = ERANGE;
+	}
+
+	return scalbnl(y, e2);
+}
+
+static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
+{
+	uint32_t x = 0;
+	long double y = 0;
+	long double scale = 1;
+	long double bias = 0;
+	int gottail = 0, gotrad = 0, gotdig = 0;
+	long long rp = 0;
+	long long dc = 0;
+	long long e2 = 0;
+	int d;
+	int c;
+
+	c = shgetc(f);
+
+	/* Skip leading zeros */
+	for (; c=='0'; c = shgetc(f)) gotdig = 1;
+
+	if (c=='.') {
+		gotrad = 1;
+		c = shgetc(f);
+		/* Count zeros after the radix point before significand */
+		for (rp=0; c=='0'; c = shgetc(f), rp--) gotdig = 1;
+	}
+
+	for (; c-'0'<10U || (c|32)-'a'<6U || c=='.'; c = shgetc(f)) {
+		if (c=='.') {
+			if (gotrad) break;
+			rp = dc;
+			gotrad = 1;
+		} else {
+			gotdig = 1;
+			if (c > '9') d = (c|32)+10-'a';
+			else d = c-'0';
+			if (dc<8) {
+				x = x*16 + d;
+			} else if (dc < LDBL_MANT_DIG/4+1) {
+				y += d*(scale/=16);
+			} else if (d && !gottail) {
+				y += 0.5*scale;
+				gottail = 1;
+			}
+			dc++;
+		}
+	}
+	if (!gotdig) {
+		shunget(f);
+		if (pok) {
+			shunget(f);
+			if (gotrad) shunget(f);
+		} else {
+			shlim(f, 0);
+		}
+		return sign * 0.0;
+	}
+	if (!gotrad) rp = dc;
+	while (dc<8) x *= 16, dc++;
+	if ((c|32)=='p') {
+		e2 = scanexp(f, pok);
+		if (e2 == LLONG_MIN) {
+			if (pok) {
+				shunget(f);
+			} else {
+				shlim(f, 0);
+				return 0;
+			}
+			e2 = 0;
+		}
+	} else {
+		shunget(f);
+	}
+	e2 += 4*rp - 32;
+
+	if (!x) return sign * 0.0;
+	if (e2 > -emin) {
+		errno = ERANGE;
+		return sign * LDBL_MAX * LDBL_MAX;
+	}
+	if (e2 < emin-2*LDBL_MANT_DIG) {
+		errno = ERANGE;
+		return sign * LDBL_MIN * LDBL_MIN;
+	}
+
+	while (x < 0x80000000) {
+		if (y>=0.5) {
+			x += x + 1;
+			y += y - 1;
+		} else {
+			x += x;
+			y += y;
+		}
+		e2--;
+	}
+
+	if (bits > 32+e2-emin) {
+		bits = 32+e2-emin;
+		if (bits<0) bits=0;
+	}
+
+	if (bits < LDBL_MANT_DIG)
+		bias = copysignl(scalbn(1, 32+LDBL_MANT_DIG-bits-1), sign);
+
+	if (bits<32 && y && !(x&1)) x++, y=0;
+
+	y = bias + sign*(long double)x + sign*y;
+	y -= bias;
+
+	if (!y) errno = ERANGE;
+
+	return scalbnl(y, e2);
+}
+
+long double __floatscan(FILE *f, int prec, int pok)
+{
+	int sign = 1;
+	size_t i;
+	int bits;
+	int emin;
+	int c;
+
+	switch (prec) {
+	case 0:
+		bits = FLT_MANT_DIG;
+		emin = FLT_MIN_EXP-bits;
+		break;
+	case 1:
+		bits = DBL_MANT_DIG;
+		emin = DBL_MIN_EXP-bits;
+		break;
+	case 2:
+		bits = LDBL_MANT_DIG;
+		emin = LDBL_MIN_EXP-bits;
+		break;
+	default:
+		return 0;
+	}
+
+	while (isspace((c=shgetc(f))));
+
+	if (c=='+' || c=='-') {
+		sign -= 2*(c=='-');
+		c = shgetc(f);
+	}
+
+	for (i=0; i<8 && (c|32)=="infinity"[i]; i++)
+		if (i<7) c = shgetc(f);
+	if (i==3 || i==8 || (i>3 && pok)) {
+		if (i!=8) {
+			shunget(f);
+			if (pok) for (; i>3; i--) shunget(f);
+		}
+		return sign * INFINITY;
+	}
+	if (!i) for (i=0; i<3 && (c|32)=="nan"[i]; i++)
+		if (i<2) c = shgetc(f);
+	if (i==3) {
+		if (shgetc(f) != '(') {
+			shunget(f);
+			return NAN;
+		}
+		for (i=1; ; i++) {
+			c = shgetc(f);
+			if (c-'0'<10U || c-'A'<26U || c-'a'<26U || c=='_')
+				continue;
+			if (c==')') return NAN;
+			shunget(f);
+			if (!pok) {
+				errno = EINVAL;
+				shlim(f, 0);
+				return 0;
+			}
+			while (i--) shunget(f);
+			return NAN;
+		}
+		return NAN;
+	}
+
+	if (i) {
+		shunget(f);
+		errno = EINVAL;
+		shlim(f, 0);
+		return 0;
+	}
+
+	if (c=='0') {
+		c = shgetc(f);
+		if ((c|32) == 'x')
+			return hexfloat(f, bits, emin, sign, pok);
+		shunget(f);
+		c = '0';
+	}
+
+	return decfloat(f, c, bits, emin, sign, pok);
+}
diff --git a/sources/android/support/src/wcstox/floatscan.h b/sources/android/support/src/wcstox/floatscan.h
new file mode 100644
index 0000000..9352b78
--- /dev/null
+++ b/sources/android/support/src/wcstox/floatscan.h
@@ -0,0 +1,6 @@
+#ifndef FLOATSCAN_H
+#define FLOATSCAN_H
+
+long double __floatscan(struct fake_file_t *, int, int);
+
+#endif
diff --git a/sources/android/support/src/wcstox/intscan.c b/sources/android/support/src/wcstox/intscan.c
new file mode 100644
index 0000000..72f2d2a
--- /dev/null
+++ b/sources/android/support/src/wcstox/intscan.c
@@ -0,0 +1,127 @@
+// ----------------------------------------------------------------------
+// Copyright © 2005-2014 Rich Felker, et al.
+// Copyright 2014 The Android Open Source Project.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ----------------------------------------------------------------------
+
+#include <limits.h>
+#include <errno.h>
+#include <ctype.h>
+#include "shgetc.h"
+
+// ANDROID: Redefine FILE to use our custom stream abstraction.
+#undef FILE
+#define FILE struct fake_file_t
+
+/* Lookup table for digit values. -1==255>=36 -> invalid */
+static const unsigned char table[] = { -1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,
+-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
+25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1,
+-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
+25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+};
+
+unsigned long long __intscan(FILE *f, unsigned base, int pok, unsigned long long lim)
+{
+	const unsigned char *val = table+1;
+	int c, neg=0;
+	unsigned x;
+	unsigned long long y;
+	if (base > 36) {
+		errno = EINVAL;
+		return 0;
+	}
+	while (isspace((c=shgetc(f))));
+	if (c=='+' || c=='-') {
+		neg = -(c=='-');
+		c = shgetc(f);
+	}
+	if ((base == 0 || base == 16) && c=='0') {
+		c = shgetc(f);
+		if ((c|32)=='x') {
+			c = shgetc(f);
+			if (val[c]>=16) {
+				shunget(f);
+				if (pok) shunget(f);
+				else shlim(f, 0);
+				return 0;
+			}
+			base = 16;
+		} else if (base == 0) {
+			base = 8;
+		}
+	} else {
+		if (base == 0) base = 10;
+		if (val[c] >= base) {
+			shunget(f);
+			shlim(f, 0);
+			errno = EINVAL;
+			return 0;
+		}
+	}
+	if (base == 10) {
+		for (x=0; c-'0'<10U && x<=UINT_MAX/10-1; c=shgetc(f))
+			x = x*10 + (c-'0');
+		for (y=x; c-'0'<10U && y<=ULLONG_MAX/10 && 10*y<=ULLONG_MAX-(c-'0'); c=shgetc(f))
+			y = y*10 + (c-'0');
+		if (c-'0'>=10U) goto done;
+	} else if (!(base & base-1)) {
+		int bs = "\0\1\2\4\7\3\6\5"[(0x17*base)>>5&7];
+		for (x=0; val[c]<base && x<=UINT_MAX/32; c=shgetc(f))
+			x = x<<bs | val[c];
+		for (y=x; val[c]<base && y<=ULLONG_MAX>>bs; c=shgetc(f))
+			y = y<<bs | val[c];
+	} else {
+		for (x=0; val[c]<base && x<=UINT_MAX/36-1; c=shgetc(f))
+			x = x*base + val[c];
+		for (y=x; val[c]<base && y<=ULLONG_MAX/base && base*y<=ULLONG_MAX-val[c]; c=shgetc(f))
+			y = y*base + val[c];
+	}
+	if (val[c]<base) {
+		for (; val[c]<base; c=shgetc(f));
+		errno = ERANGE;
+		y = lim;
+	}
+done:
+	shunget(f);
+	if (y>=lim) {
+		if (!(lim&1) && !neg) {
+			errno = ERANGE;
+			return lim-1;
+		} else if (y>lim) {
+			errno = ERANGE;
+			return lim;
+		}
+	}
+	return (y^neg)-neg;
+}
diff --git a/sources/android/support/src/wcstox/intscan.h b/sources/android/support/src/wcstox/intscan.h
new file mode 100644
index 0000000..b2087c9
--- /dev/null
+++ b/sources/android/support/src/wcstox/intscan.h
@@ -0,0 +1,8 @@
+#ifndef INTSCAN_H
+#define INTSCAN_H
+
+#include "shgetc.h"
+
+unsigned long long __intscan(struct fake_file_t *, unsigned, int, unsigned long long);
+
+#endif
diff --git a/sources/android/support/src/wcstox/shgetc.c b/sources/android/support/src/wcstox/shgetc.c
new file mode 100644
index 0000000..4bec261
--- /dev/null
+++ b/sources/android/support/src/wcstox/shgetc.c
@@ -0,0 +1,39 @@
+#include "shgetc.h"
+
+#include <stdio.h>
+
+void shinit_wcstring(struct fake_file_t *f, const wchar_t* wcs) {
+    f->rstart = wcs;
+    f->rpos = wcs;
+    f->rend = wcs + wcslen(wcs);
+    f->extra_eof = 0;
+}
+
+int shgetc(struct fake_file_t *f) {
+    if (f->rpos >= f->rend) {
+        f->extra_eof ++;
+        return EOF;
+    }
+    wchar_t wc = *f->rpos++;
+    int ch = (wc < 128) ? (int)wc : '@';
+    return ch;
+}
+
+void shunget(struct fake_file_t *f) {
+    if (f->extra_eof) {
+        f->extra_eof--;
+    } else if (f->rpos > f->rstart) {
+        f->rpos--;
+    }
+}
+
+void shlim(struct fake_file_t *f, off_t lim) {
+    int off = f->rpos - f->rstart;
+    if (off > lim)
+        f->rpos = f->rstart + lim;
+
+}
+
+off_t shcnt(struct fake_file_t *f) {
+    return (off_t)(f->rpos - f->rstart);
+}
diff --git a/sources/android/support/src/wcstox/shgetc.h b/sources/android/support/src/wcstox/shgetc.h
new file mode 100644
index 0000000..018d1a9
--- /dev/null
+++ b/sources/android/support/src/wcstox/shgetc.h
@@ -0,0 +1,41 @@
+#ifndef SHGETC_H
+#define SHGETC_H
+
+#include <stdio.h>
+#include <wchar.h>
+
+// Custom stream abstraction, replaces the Musl FILE type for
+// the purpose of scanning integers and floating points.
+// |rstart| is the start of the input string.
+// |rend| is the first wchar_t after it.
+// |rpos| is the current reading position.
+// |extra_eof| is a counter of positions past EOF. Needed because the
+// scanning routines more or less assume an infinite input string, with
+// EOF being returned when shgetc() is being called past the real end
+// of the input stream.
+struct fake_file_t {
+    const wchar_t *rstart, *rpos, *rend;
+    int extra_eof;
+};
+
+// Initialize fake_file_t structure from a wide-char string.
+void shinit_wcstring(struct fake_file_t *, const wchar_t *wcs);
+
+// Get next character from string. This convers the wide character to
+// an 8-bit value, which will be '@' in case of overflow. Returns EOF (-1)
+// in case of end-of-string.
+int shgetc(struct fake_file_t *);
+
+// Back-track one character, must not be called more times than shgetc()
+void shunget(struct fake_file_t *);
+
+// This will be called with a value of 0 for |lim| to force rewinding
+// to the start of the string. In Musl, this is also used in different
+// parts of the library to impose a local limit on the number of characters
+// that can be retrieved through shgetc(), but this is not necessary here.
+void shlim(struct fake_file_t *, off_t lim);
+
+// Return the number of input characters that were read so far.
+off_t shcnt(struct fake_file_t *);
+
+#endif  // SHGETC_H
diff --git a/sources/android/support/src/wcstox/wcstod.c b/sources/android/support/src/wcstox/wcstod.c
new file mode 100644
index 0000000..6bc8378
--- /dev/null
+++ b/sources/android/support/src/wcstox/wcstod.c
@@ -0,0 +1,35 @@
+#include "shgetc.h"
+#include "floatscan.h"
+#include <wchar.h>
+#include <wctype.h>
+
+static long double wcstox(const wchar_t * restrict s,
+                          wchar_t ** restrict p,
+                          int prec)
+{
+    wchar_t *t = (wchar_t *)s;
+    struct fake_file_t f;
+    while (iswspace(*t)) t++;
+    shinit_wcstring(&f, t);
+    long double y = __floatscan(&f, prec, 1);
+    if (p) {
+        size_t cnt = shcnt(&f);
+        *p = cnt ? t + cnt : (wchar_t *)s;
+    }
+    return y;
+}
+
+float wcstof(const wchar_t *restrict s, wchar_t **restrict p)
+{
+    return wcstox(s, p, 0);
+}
+
+double wcstod(const wchar_t *restrict s, wchar_t **restrict p)
+{
+    return wcstox(s, p, 1);
+}
+
+long double wcstold(const wchar_t *restrict s, wchar_t **restrict p)
+{
+    return wcstox(s, p, 2);
+}
diff --git a/sources/android/support/src/wcstox/wcstol.c b/sources/android/support/src/wcstox/wcstol.c
new file mode 100644
index 0000000..ea86704
--- /dev/null
+++ b/sources/android/support/src/wcstox/wcstol.c
@@ -0,0 +1,61 @@
+#include "shgetc.h"
+#include "intscan.h"
+#include <inttypes.h>
+#include <limits.h>
+#include <wctype.h>
+#include <wchar.h>
+
+static unsigned long long wcstox(const wchar_t * restrict s,
+                                 wchar_t ** restrict p,
+                                 int base,
+                                 unsigned long long lim)
+{
+    struct fake_file_t f;
+    wchar_t *t = (wchar_t *)s;
+    while (iswspace(*t)) t++;
+    shinit_wcstring(&f, t);
+    unsigned long long y = __intscan(&f, base, 1, lim);
+    if (p) {
+        size_t cnt = shcnt(&f);
+        *p = cnt ? t + cnt : (wchar_t *)s;
+    }
+    return y;
+}
+
+unsigned long long wcstoull(const wchar_t *restrict s,
+                            wchar_t **restrict p,
+                            int base)
+{
+    return wcstox(s, p, base, ULLONG_MAX);
+}
+
+long long wcstoll(const wchar_t *restrict s, wchar_t **restrict p, int base)
+{
+    return wcstox(s, p, base, LLONG_MIN);
+}
+
+unsigned long wcstoul(const wchar_t *restrict s,
+                      wchar_t **restrict p,
+                      int base)
+{
+    return wcstox(s, p, base, ULONG_MAX);
+}
+
+long wcstol(const wchar_t *restrict s, wchar_t **restrict p, int base)
+{
+    return wcstox(s, p, base, 0UL+LONG_MIN);
+}
+
+intmax_t wcstoimax(const wchar_t *restrict s,
+                   wchar_t **restrict p,
+                   int base)
+{
+    return wcstoll(s, p, base);
+}
+
+uintmax_t wcstoumax(const wchar_t *restrict s,
+                    wchar_t **restrict p,
+                    int base)
+{
+    return wcstoull(s, p, base);
+}
diff --git a/sources/android/support/tests/Android.mk b/sources/android/support/tests/Android.mk
index 243f70b..d3659f0 100644
--- a/sources/android/support/tests/Android.mk
+++ b/sources/android/support/tests/Android.mk
@@ -13,8 +13,14 @@
 LOCAL_MODULE := android_support_unittests
 LOCAL_SRC_FILES := \
   ctype_unittest.cc \
+  math_unittest.cc \
   stdio_unittest.cc \
-  wchar_unittest.cc \
+  wchar_unittest.cc
+
+ifeq ($(filter $(NDK_KNOWN_DEVICE_ABI64S),$(TARGET_ARCH_ABI)),)
+LOCAL_SRC_FILES += \
+  libdl_unittest.cc
+endif
 
 LOCAL_STATIC_LIBRARIES := android_support minitest
 include $(BUILD_EXECUTABLE)
diff --git a/sources/android/support/tests/libdl_unittest.cc b/sources/android/support/tests/libdl_unittest.cc
new file mode 100644
index 0000000..89b3a26
--- /dev/null
+++ b/sources/android/support/tests/libdl_unittest.cc
@@ -0,0 +1,27 @@
+#include <android/api-level.h>
+#include <dlfcn.h>
+
+#include <minitest/minitest.h>
+
+#if __ANDROID_API__ >= 8
+Dl_info info;
+extern "C" int my_dladdr(const void* addr, Dl_info *info);
+#else
+void *info;
+extern "C" int my_dladdr(const void* addr, void **info);
+#endif
+
+TEST(libdl, my_dladdr) {
+    void *h, *libdl = dlopen("libc.so", RTLD_NOW);
+    EXPECT_NE(0, libdl);
+    h = dlsym(libdl, "printf");
+    EXPECT_NE(0, h);
+    int r = my_dladdr((char*)h+1, &info);
+#if __ANDROID_API__ >= 8
+    EXPECT_NE(0, r);
+    EXPECT_EQ(h, info.dli_saddr);
+    EXPECT_EQ(0, strcmp("libc.so", info.dli_fname));
+#else
+    EXPECT_EQ(0, r);
+#endif
+}
diff --git a/sources/android/support/tests/math_unittest.cc b/sources/android/support/tests/math_unittest.cc
new file mode 100644
index 0000000..3036551
--- /dev/null
+++ b/sources/android/support/tests/math_unittest.cc
@@ -0,0 +1,47 @@
+#include <math.h>
+
+#include <minitest/minitest.h>
+
+TEST(math, sizeof_long_double) {
+#ifdef __ANDROID__
+#  ifdef __LP64__
+    EXPECT_EQ(16U, sizeof(long double));
+#  else
+    EXPECT_EQ(8U, sizeof(long double));
+#  endif
+#endif
+}
+
+TEST(math, nexttoward) {
+    double x = 2.0;
+    EXPECT_EQ(x, nexttoward(x, (long double)x));
+    EXPECT_GT(x, nexttoward(x, (long double)(x * 2.)));
+    EXPECT_LT(x, nexttoward(x, (long double)(x - 1.0)));
+}
+
+TEST(math, nexttowardf) {
+    float x = 2.0;
+    EXPECT_EQ(x, nexttowardf(x, (long double)x));
+    EXPECT_GT(x, nexttowardf(x, (long double)(x * 2.)));
+    EXPECT_LT(x, nexttowardf(x, (long double)(x - 1.0)));
+}
+
+TEST(math, nexttowardl) {
+    long double x = 2.0;
+    EXPECT_EQ(x, nexttowardl(x, x));
+    EXPECT_GT(x, nexttowardl(x, x * 2.));
+    EXPECT_LT(x, nexttowardl(x, x - 1.0));
+}
+
+// These functions are not exported on x86 before API level 18!
+TEST(math, scalbln) {
+    EXPECT_EQ(16., scalbln(2.0, (long int)3));
+}
+
+TEST(math, scalblnf) {
+    EXPECT_EQ((float)16., scalblnf((float)2.0, (long int)3));
+}
+
+TEST(math, scalblnl) {
+    EXPECT_EQ((long double)16., scalblnl((long double)2.0, (long int)3));
+}
diff --git a/sources/android/support/tests/minitest/minitest.cc b/sources/android/support/tests/minitest/minitest.cc
index b918006..114ff34 100644
--- a/sources/android/support/tests/minitest/minitest.cc
+++ b/sources/android/support/tests/minitest/minitest.cc
@@ -90,6 +90,7 @@
 MINITEST_STRING_OPERATOR_LL_(unsigned long long, "%llu")
 MINITEST_STRING_OPERATOR_LL_(float, "%f")
 MINITEST_STRING_OPERATOR_LL_(double, "%f")
+MINITEST_STRING_OPERATOR_LL_(long double, "%Lf")
 MINITEST_STRING_OPERATOR_LL_(const void*, "%p")
 
 #undef MINITEST_STRING_OPERATOR_LL_
diff --git a/sources/android/support/tests/minitest/minitest.h b/sources/android/support/tests/minitest/minitest.h
index 4d9a533..5ee86a8 100644
--- a/sources/android/support/tests/minitest/minitest.h
+++ b/sources/android/support/tests/minitest/minitest.h
@@ -175,6 +175,7 @@
   MINITEST_OPERATOR_LL_(unsigned long long);
   MINITEST_OPERATOR_LL_(float);
   MINITEST_OPERATOR_LL_(double);
+  MINITEST_OPERATOR_LL_(long double);
   MINITEST_OPERATOR_LL_(const void*);
 
 #undef MINITEST_OPERATOR_LL_
@@ -399,10 +400,10 @@
              __FILE__,                                                         \
              __LINE__,                                                         \
              #expression);                                                     \
-      printf("actual size   : %d (0x%x)\n",                                    \
+      printf("actual size   : %zu (0x%zx)\n",                                  \
              minitest_actual_len,                                              \
              minitest_actual_len);                                             \
-      printf("expected size : %d (0x%x)\n",                                    \
+      printf("expected size : %zu (0x%zx)\n",                                  \
              minitest_expected_len,                                            \
              minitest_expected_len);                                           \
       minitest_testcase->Failure();                                            \
@@ -410,16 +411,18 @@
       bool minitest_eq =                                                       \
           !memcmp(minitest_expected, minitest_actual, minitest_expected_len);  \
       if (minitest_eq != is_eq) {                                              \
-        printf("%s%s:%s:%d: with expression '%s' of %d bytes\n",               \
+        printf("%s%s:%s:%d: with expression '%s' of %zu bytes\n",              \
                minitest_prefix,                                                \
                minitest_suffix,                                                \
                __FILE__,                                                       \
                __LINE__,                                                       \
                #expression,                                                    \
                minitest_expected_len);                                         \
-        printf("actual   : '%.*s'\n", minitest_expected_len, minitest_actual); \
+        printf("actual   : '%.*s'\n", (int)minitest_expected_len,              \
+                                      minitest_actual);                        \
         printf(                                                                \
-            "expected : '%.*s'\n", minitest_expected_len, minitest_expected);  \
+            "expected : '%.*s'\n", (int)minitest_expected_len,                 \
+                                   minitest_expected);                         \
         minitest_testcase->Failure();                                          \
       }                                                                        \
     }                                                                          \
diff --git a/sources/android/support/tests/run-host.sh b/sources/android/support/tests/run-host.sh
index 365524d..f9fd9b9 100755
--- a/sources/android/support/tests/run-host.sh
+++ b/sources/android/support/tests/run-host.sh
@@ -14,8 +14,11 @@
 LDFLAGS=
 LINK_LIBS=""
 
+# NOTE: libdl_unittest.cc can not run on Ubuntu because dladdr is missing
+
 SOURCES="\
   ctype_unittest.cc \
+  math_unittest.cc \
   stdio_unittest.cc \
   wchar_unittest.cc \
 "
diff --git a/sources/android/support/tests/wchar_unittest.cc b/sources/android/support/tests/wchar_unittest.cc
index a440c9f..7b2a77e 100644
--- a/sources/android/support/tests/wchar_unittest.cc
+++ b/sources/android/support/tests/wchar_unittest.cc
@@ -1,8 +1,28 @@
+#include <limits.h>
 #include <stddef.h>
 #include <wchar.h>
 
 #include <minitest/minitest.h>
 
+namespace {
+
+const char* to_cstr(const wchar_t* wcs) {
+    static char buffer[256];
+    size_t n;
+    for (n = 0; n + 1U < sizeof(buffer); ++n) {
+        wchar_t ch = wcs[n];
+        if (!ch)
+            break;
+        buffer[n] = (ch < 128) ? ch : '@';
+    }
+    buffer[n] = '\0';
+    return buffer;
+}
+
+#define ARRAY_SIZE(x)  (sizeof(x) / sizeof(x[0]))
+
+}
+
 TEST(wchar, wchar_limits) {
   ASSERT_EQ(sizeof(__WCHAR_TYPE__), sizeof(wchar_t));
   ASSERT_EQ(sizeof(int), sizeof(wint_t));
@@ -36,3 +56,184 @@
   EXPECT_FALSE(wcsrchr(kString, L'e'));
   EXPECT_EQ(kString + 5, wcsrchr(kString, L'\0'));
 }
+
+TEST(wchar, wcstof) {
+    static const struct {
+        const wchar_t* input;
+        float expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 123., 3 },
+        { L"123#", 123., 3 },
+        { L"   123 45", 123., 6 },
+        { L"0.2", 0.2, 3 },
+        { L"-0.2", -0.2, 4 },
+        { L"-3.1415926535", -3.1415926535, 13 },
+        { L"+1e+100", 1e100, 7 },
+        { L"0x10000.80", 65536.50, 10 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstof(kData[n].input, &end));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstod) {
+    static const struct {
+        const wchar_t* input;
+        double expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 123., 3 },
+        { L"123#", 123., 3 },
+        { L"   123 45", 123., 6 },
+        { L"0.2", 0.2, 3 },
+        { L"-0.2", -0.2, 4 },
+        { L"-3.1415926535", -3.1415926535, 13 },
+        { L"+1e+100", 1e100, 7 },
+        { L"0x10000.80", 65536.50, 10 },
+        { L"1.e60", 1e60, 5 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstod(kData[n].input, &end));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstold) {
+    static const struct {
+        const wchar_t* input;
+        long double expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 123., 3 },
+        { L"123#", 123., 3 },
+        { L"   123 45", 123., 6 },
+        { L"0.2", 0.2L, 3 },
+        { L"-0.2", -0.2L, 4 },
+        { L"-3.1415926535", -3.1415926535L, 13 },
+        { L"+1e+100", 1e100L, 7 },
+        { L"0x10000.80", 65536.50L, 10 },
+        { L"+1.e+100", 1e100L, 8 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstold(kData[n].input, &end));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstol) {
+    static const struct {
+        const wchar_t* input;
+        int base;
+        long expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 10, 123, 3 },
+        { L"123#", 10, 123, 3 },
+        { L"01000", 0, 512, 5 },
+        { L"   123 45", 0, 123, 6 },
+        { L"  -123", 0, -123, 6 },
+        { L"0x10000", 0, 65536, 7 },
+        { L"12222222222222222222222222222222222", 10, LONG_MAX, 35 },
+        { L"-12222222222222222222222222222222222", 10, LONG_MIN, 36 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstol(kData[n].input, &end, kData[n].base));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstoul) {
+    static const struct {
+        const wchar_t* input;
+        int base;
+        unsigned long expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 10, 123, 3 },
+        { L"123#", 10, 123, 3 },
+        { L"01000", 0, 512, 5 },
+        { L"   123 45", 0, 123, 6 },
+        { L"  -123", 0, ULONG_MAX - 123 + 1, 6 },
+        { L"0x10000", 0, 65536, 7 },
+        { L"12222222222222222222222222222222222", 10, ULONG_MAX, 35 },
+        { L"-1", 10, ULONG_MAX, 2 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstoul(kData[n].input, &end, kData[n].base));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstoll) {
+    static const struct {
+        const wchar_t* input;
+        int base;
+        long long expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 10, 123, 3 },
+        { L"123#", 10, 123, 3 },
+        { L"01000", 0, 512, 5 },
+        { L"   123 45", 0, 123, 6 },
+        { L"  -123", 0, -123, 6 },
+        { L"0x10000", 0, 65536, 7 },
+        { L"12222222222222222222222222222222222", 10, LLONG_MAX, 35 },
+        { L"-12222222222222222222222222222222222", 10, LLONG_MIN, 36 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstoll(kData[n].input, &end, kData[n].base));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
+
+TEST(wchar, wcstoull) {
+    static const struct {
+        const wchar_t* input;
+        int base;
+        unsigned long long expected;
+        int expected_len;
+    } kData[] = {
+        { L"123", 10, 123, 3 },
+        { L"123#", 10, 123, 3 },
+        { L"01000", 0, 512, 5 },
+        { L"   123 45", 0, 123, 6 },
+        { L"  -123", 0, ULLONG_MAX - 123 + 1, 6 },
+        { L"0x10000", 0, 65536, 7 },
+        { L"12222222222222222222222222222222222", 10, ULLONG_MAX, 35 },
+        { L"-1", 10, ULLONG_MAX, 2 },
+    };
+    for (size_t n = 0; n < ARRAY_SIZE(kData); ++n) {
+        const char* text = to_cstr(kData[n].input);
+        wchar_t* end;
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected, wcstoull(kData[n].input, &end, kData[n].base));
+        TEST_TEXT << text;
+        EXPECT_EQ(kData[n].expected_len, (int)(end - kData[n].input));
+    }
+}
diff --git a/sources/cxx-stl/gabi++/src/delete.cc b/sources/cxx-stl/gabi++/src/delete.cc
index f567658..ae673fe 100644
--- a/sources/cxx-stl/gabi++/src/delete.cc
+++ b/sources/cxx-stl/gabi++/src/delete.cc
@@ -27,7 +27,6 @@
 //
 // delete.cc: delete operator
 
-#if !defined(LIBCXXABI)
 #include <gabixx_config.h>
 #include <stdlib.h>
 #include <new>
@@ -57,4 +56,3 @@
 {
     ::operator delete(ptr, nt);
 }
-#endif  // !defined(LIBCXXABI)
diff --git a/sources/cxx-stl/gabi++/src/new.cc b/sources/cxx-stl/gabi++/src/new.cc
index 4aea7cc..e074ec0 100644
--- a/sources/cxx-stl/gabi++/src/new.cc
+++ b/sources/cxx-stl/gabi++/src/new.cc
@@ -92,7 +92,6 @@
 
 } // namespace std
 
-#if !defined(LIBCXXABI)
 _GABIXX_WEAK
 void* operator new(std::size_t size) throw(std::bad_alloc) {
   void* space;
@@ -131,4 +130,3 @@
   return ::operator new(size, no);
 }
 
-#endif  // !defined(LIBCXXABI)
diff --git a/sources/cxx-stl/llvm-libc++/Android.mk b/sources/cxx-stl/llvm-libc++/Android.mk
index 2bcdb61..26c3a96 100644
--- a/sources/cxx-stl/llvm-libc++/Android.mk
+++ b/sources/cxx-stl/llvm-libc++/Android.mk
@@ -8,12 +8,42 @@
 #
 
 LIBCXX_FORCE_REBUILD := $(strip $(LIBCXX_FORCE_REBUILD))
+
+__libcxx_force_rebuild := $(LIBCXX_FORCE_REBUILD)
+
 ifndef LIBCXX_FORCE_REBUILD
   ifeq (,$(strip $(wildcard $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libc++_static$(TARGET_LIB_EXTENSION))))
     $(call __ndk_info,WARNING: Rebuilding libc++ libraries from sources!)
     $(call __ndk_info,You might want to use $$NDK/build/tools/build-cxx-stl.sh --stl=libc++)
     $(call __ndk_info,in order to build prebuilt versions to speed up your builds!)
-    LIBCXX_FORCE_REBUILD := true
+    __libcxx_force_rebuild := true
+  endif
+endif
+
+# Use gabi++ for x86* and mips* until libc++/libc++abi is ready for them
+ifneq (,$(filter x86% mips%,$(TARGET_ARCH_ABI)))
+  __prebuilt_libcxx_compiled_with_gabixx := true
+else
+  __prebuilt_libcxx_compiled_with_gabixx := false
+endif
+
+__libcxx_use_gabixx := $(__prebuilt_libcxx_compiled_with_gabixx)
+
+LIBCXX_USE_GABIXX := $(strip $(LIBCXX_USE_GABIXX))
+ifeq ($(LIBCXX_USE_GABIXX),true)
+  __libcxx_use_gabixx := true
+endif
+
+ifneq ($(__libcxx_use_gabixx),$(__prebuilt_libcxx_compiled_with_gabixx))
+  ifneq ($(__libcxx_force_rebuild),true)
+    ifeq ($(__prebuilt_libcxx_compiled_with_gabixx),true)
+      $(call __ndk_info,WARNING: Rebuilding libc++ libraries from sources since libc++ prebuilt libraries for $(TARGET_ARCH_ABI))
+      $(call __ndk_info,are compiled with gabi++ but LIBCXX_USE_GABIXX is not set to true)
+    else
+      $(call __ndk_info,WARNING: Rebuilding libc++ libraries from sources since libc++ prebuilt libraries for $(TARGET_ARCH_ABI))
+      $(call __ndk_info,are not compiled with gabi++ and LIBCXX_USE_GABIXX is set to true)
+    endif
+    __libcxx_force_rebuild := true
   endif
 endif
 
@@ -53,10 +83,18 @@
 # For now, this library can only be used to build C++11 binaries.
 llvm_libc++_export_cxxflags := -std=c++11
 
+ifeq (,$(filter clang%,$(NDK_TOOLCHAIN_VERSION)))
+# Add -fno-strict-aliasing because __list_imp::_end_ breaks TBAA rules by declaring
+# simply as __list_node_base then casted to __list_node derived from that.  See
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61571 for details
+llvm_libc++_export_cxxflags += -fno-strict-aliasing
+endif
+
 llvm_libc++_cxxflags := $(llvm_libc++_export_cxxflags)
 
+ifeq ($(__libcxx_use_gabixx),true)
+
 # Gabi++ emulates libcxxabi when building libcxx.
-#
 llvm_libc++_cxxflags += -DLIBCXXABI=1
 
 # Find the GAbi++ sources to include them here.
@@ -79,7 +117,28 @@
 llvm_libc++_includes += $(libgabi++_c_includes)
 llvm_libc++_export_includes += $(libgabi++_c_includes)
 
-ifneq ($(LIBCXX_FORCE_REBUILD),true)
+else
+# libc++abi
+
+libcxxabi_sources_dir := $(strip $(wildcard $(LOCAL_PATH)/../llvm-libc++abi))
+ifdef libcxxabi_sources_dir
+  libcxxabi_sources_prefix := ../llvm-libc++abi
+else
+  libcxxabi_sources_dir := $(strip $(wildcard $(NDK_ROOT)/sources/cxx-stl/llvm-libc++abi))
+  ifndef libcxxabi_sources_dir
+    $(error Can't find libcxxabi sources directory!!)
+  endif
+  libcxxabi_sources_prefix := $(libcxxabi_sources_dir)
+endif
+
+include $(libcxxabi_sources_dir)/sources.mk
+llvm_libc++_sources += $(addprefix $(libcxxabi_sources_prefix:%/=%)/,$(libcxxabi_src_files))
+llvm_libc++_includes += $(libcxxabi_c_includes)
+llvm_libc++_export_includes += $(libcxxabi_c_includes)
+
+endif
+
+ifneq ($(__libcxx_force_rebuild),true)
 
 $(call ndk_log,Using prebuilt libc++ libraries)
 
@@ -91,9 +150,11 @@
 # For armeabi*, choose thumb mode unless LOCAL_ARM_MODE := arm
 ifneq (,$(filter armeabi%,$(TARGET_ARCH_ABI)))
 ifneq (arm,$(LOCAL_ARM_MODE))
+ifneq (arm,$(TARGET_ARM_MODE))
 LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/thumb/lib$(LOCAL_MODULE)$(TARGET_LIB_EXTENSION)
 endif
 endif
+endif
 LOCAL_EXPORT_C_INCLUDES := $(llvm_libc++_export_includes) $(android_support_c_includes)
 LOCAL_EXPORT_CPPFLAGS := $(llvm_libc++_export_cxxflags)
 include $(PREBUILT_STATIC_LIBRARY)
@@ -104,21 +165,24 @@
 # For armeabi*, choose thumb mode unless LOCAL_ARM_MODE := arm
 ifneq (,$(filter armeabi%,$(TARGET_ARCH_ABI)))
 ifneq (arm,$(LOCAL_ARM_MODE))
+ifneq (arm,$(TARGET_ARM_MODE))
 LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/thumb/lib$(LOCAL_MODULE)$(TARGET_SONAME_EXTENSION)
 endif
 endif
+endif
 LOCAL_EXPORT_C_INCLUDES := $(llvm_libc++_export_includes) $(android_support_c_includes)
 LOCAL_EXPORT_CPPFLAGS := $(llvm_libc++_export_cxxflags)
 include $(PREBUILT_SHARED_LIBRARY)
 
-else # LIBCXX_FORCE_REBUILD == true
+else
+# __libcxx_force_rebuild == true
 
 $(call ndk_log,Rebuilding libc++ libraries from sources)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := c++_static
 LOCAL_SRC_FILES := $(llvm_libc++_sources)
-LOCAL_C_INCLUDES := $(llvm_libc++_includes)
+LOCAL_C_INCLUDES := $(android_support_c_includes) $(llvm_libc++_includes)
 LOCAL_CPPFLAGS := $(llvm_libc++_cxxflags)
 LOCAL_CPP_FEATURES := rtti exceptions
 LOCAL_EXPORT_C_INCLUDES := $(llvm_libc++_export_includes)
@@ -129,13 +193,12 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE := c++_shared
 LOCAL_SRC_FILES := $(llvm_libc++_sources)
-LOCAL_C_INCLUDES := $(llvm_libc++_includes)
+LOCAL_C_INCLUDES := $(android_support_c_includes) $(llvm_libc++_includes)
 LOCAL_CPPFLAGS := $(llvm_libc++_cxxflags)
 LOCAL_CPP_FEATURES := rtti exceptions
 LOCAL_EXPORT_C_INCLUDES := $(llvm_libc++_export_includes)
 LOCAL_EXPORT_CPPFLAGS := $(llvm_libc++_export_cxxflags)
 LOCAL_STATIC_LIBRARIES := android_support
-
 # For armeabi's shared version of libc++ compiled by clang, we need compiler-rt or libatomic
 # for __atomic_fetch_add_4.  Note that "clang -gcc-toolchain" uses gcc4.8's as/ld/libs, including
 # libatomic (which is not available in gcc4.6)
@@ -153,7 +216,7 @@
 
 include $(BUILD_SHARED_LIBRARY)
 
-endif # LIBCXX_FORCE_REBUILD == true
+endif # __libcxx_force_rebuild == true
 
 $(call import-module, android/support)
 $(call import-module, android/compiler-rt)
diff --git a/sources/cxx-stl/llvm-libc++/export_symbols.txt b/sources/cxx-stl/llvm-libc++/export_symbols.txt
new file mode 100644
index 0000000..663f813
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/export_symbols.txt
@@ -0,0 +1,3782 @@
+{
+  global:
+    /* libc++abi exports */
+    _Unwind_DeleteException;
+    _Unwind_RaiseException;
+    _Unwind_Resume;
+    _Unwind_Complete;
+    _Unwind_VRS_Get;
+    _Unwind_VRS_Pop;
+    _Unwind_VRS_Set;
+    _ZNKSt10bad_typeid4whatEv;
+    _ZNKSt11logic_error4whatEv;
+    _ZNKSt13bad_exception4whatEv;
+    _ZNKSt13runtime_error4whatEv;
+    _ZNKSt20bad_array_new_length4whatEv;
+    _ZNKSt8bad_cast4whatEv;
+    _ZNKSt9bad_alloc4whatEv;
+    _ZNKSt9exception4whatEv;
+    _ZNSt10bad_typeidC1Ev;
+    _ZNSt10bad_typeidC2Ev;
+    _ZNSt10bad_typeidD0Ev;
+    _ZNSt10bad_typeidD1Ev;
+    _ZNSt10bad_typeidD2Ev;
+    _ZNSt11logic_errorD0Ev;
+    _ZNSt11logic_errorD1Ev;
+    _ZNSt11logic_errorD2Ev;
+    _ZNSt11range_errorD0Ev;
+    _ZNSt11range_errorD1Ev;
+    _ZNSt11range_errorD2Ev;
+    _ZNSt12domain_errorD0Ev;
+    _ZNSt12domain_errorD1Ev;
+    _ZNSt12domain_errorD2Ev;
+    _ZNSt12length_errorD0Ev;
+    _ZNSt12length_errorD1Ev;
+    _ZNSt12length_errorD2Ev;
+    _ZNSt12out_of_rangeD0Ev;
+    _ZNSt12out_of_rangeD1Ev;
+    _ZNSt12out_of_rangeD2Ev;
+    _ZNSt13bad_exceptionC2ERKS_;
+    _ZNSt13bad_exceptionD0Ev;
+    _ZNSt13bad_exceptionD1Ev;
+    _ZNSt13bad_exceptionD2Ev;
+    _ZNSt13runtime_errorD0Ev;
+    _ZNSt13runtime_errorD1Ev;
+    _ZNSt13runtime_errorD2Ev;
+    _ZNSt14overflow_errorD0Ev;
+    _ZNSt14overflow_errorD1Ev;
+    _ZNSt14overflow_errorD2Ev;
+    _ZNSt15underflow_errorD0Ev;
+    _ZNSt15underflow_errorD1Ev;
+    _ZNSt15underflow_errorD2Ev;
+    _ZNSt16invalid_argumentD0Ev;
+    _ZNSt16invalid_argumentD1Ev;
+    _ZNSt16invalid_argumentD2Ev;
+    _ZNSt20bad_array_new_lengthC1Ev;
+    _ZNSt20bad_array_new_lengthC2Ev;
+    _ZNSt20bad_array_new_lengthD0Ev;
+    _ZNSt20bad_array_new_lengthD1Ev;
+    _ZNSt20bad_array_new_lengthD2Ev;
+    _ZNSt8bad_castC1Ev;
+    _ZNSt8bad_castC2Ev;
+    _ZNSt8bad_castD0Ev;
+    _ZNSt8bad_castD1Ev;
+    _ZNSt8bad_castD2Ev;
+    _ZNSt9bad_allocC1Ev;
+    _ZNSt9bad_allocC2Ev;
+    _ZNSt9bad_allocD0Ev;
+    _ZNSt9bad_allocD1Ev;
+    _ZNSt9bad_allocD2Ev;
+    _ZNSt9exceptionC2ERKS_;
+    _ZNSt9exceptionD0Ev;
+    _ZNSt9exceptionD1Ev;
+    _ZNSt9exceptionD2Ev;
+    _ZNSt9type_infoD0Ev;
+    _ZNSt9type_infoD1Ev;
+    _ZNSt9type_infoD2Ev;
+    _ZSt10unexpectedv;
+    _ZSt13get_terminatev;
+    _ZSt13set_terminatePFvvE;
+    _ZSt14get_unexpectedv;
+    _ZSt14set_unexpectedPFvvE;
+    _ZSt15get_new_handlerv;
+    _ZSt15set_new_handlerPFvvE;
+    _ZSt9terminatev;
+    _ZTIDi;
+    _ZTIDn;
+    _ZTIDs;
+    _ZTIN10__cxxabiv116__enum_type_infoE;
+    _ZTIN10__cxxabiv117__array_type_infoE;
+    _ZTIN10__cxxabiv117__class_type_infoE;
+    _ZTIN10__cxxabiv117__pbase_type_infoE;
+    _ZTIN10__cxxabiv119__pointer_type_infoE;
+    _ZTIN10__cxxabiv120__function_type_infoE;
+    _ZTIN10__cxxabiv120__si_class_type_infoE;
+    _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+    _ZTIN10__cxxabiv123__fundamental_type_infoE;
+    _ZTIN10__cxxabiv129__pointer_to_member_type_infoE;
+    _ZTIPDi;
+    _ZTIPDn;
+    _ZTIPDs;
+    _ZTIPKDi;
+    _ZTIPKDn;
+    _ZTIPKDs;
+    _ZTIPKa;
+    _ZTIPKb;
+    _ZTIPKc;
+    _ZTIPKd;
+    _ZTIPKe;
+    _ZTIPKf;
+    _ZTIPKh;
+    _ZTIPKi;
+    _ZTIPKj;
+    _ZTIPKl;
+    _ZTIPKm;
+    _ZTIPKs;
+    _ZTIPKt;
+    _ZTIPKv;
+    _ZTIPKw;
+    _ZTIPKx;
+    _ZTIPKy;
+    _ZTIPa;
+    _ZTIPb;
+    _ZTIPc;
+    _ZTIPd;
+    _ZTIPe;
+    _ZTIPf;
+    _ZTIPh;
+    _ZTIPi;
+    _ZTIPj;
+    _ZTIPl;
+    _ZTIPm;
+    _ZTIPs;
+    _ZTIPt;
+    _ZTIPv;
+    _ZTIPw;
+    _ZTIPx;
+    _ZTIPy;
+    _ZTISt10bad_typeid;
+    _ZTISt11logic_error;
+    _ZTISt11range_error;
+    _ZTISt12domain_error;
+    _ZTISt12length_error;
+    _ZTISt12out_of_range;
+    _ZTISt13bad_exception;
+    _ZTISt13runtime_error;
+    _ZTISt14overflow_error;
+    _ZTISt15underflow_error;
+    _ZTISt16invalid_argument;
+    _ZTISt20bad_array_new_length;
+    _ZTISt8bad_cast;
+    _ZTISt9bad_alloc;
+    _ZTISt9exception;
+    _ZTISt9type_info;
+    _ZTIa;
+    _ZTIb;
+    _ZTIc;
+    _ZTId;
+    _ZTIe;
+    _ZTIf;
+    _ZTIh;
+    _ZTIi;
+    _ZTIj;
+    _ZTIl;
+    _ZTIm;
+    _ZTIs;
+    _ZTIt;
+    _ZTIv;
+    _ZTIw;
+    _ZTIx;
+    _ZTIy;
+    _ZTSDi;
+    _ZTSDn;
+    _ZTSDs;
+    _ZTSN10__cxxabiv116__enum_type_infoE;
+    _ZTSN10__cxxabiv117__array_type_infoE;
+    _ZTSN10__cxxabiv117__class_type_infoE;
+    _ZTSN10__cxxabiv117__pbase_type_infoE;
+    _ZTSN10__cxxabiv119__pointer_type_infoE;
+    _ZTSN10__cxxabiv120__function_type_infoE;
+    _ZTSN10__cxxabiv120__si_class_type_infoE;
+    _ZTSN10__cxxabiv121__vmi_class_type_infoE;
+    _ZTSN10__cxxabiv123__fundamental_type_infoE;
+    _ZTSN10__cxxabiv129__pointer_to_member_type_infoE;
+    _ZTSPDi;
+    _ZTSPDn;
+    _ZTSPDs;
+    _ZTSPKDi;
+    _ZTSPKDn;
+    _ZTSPKDs;
+    _ZTSPKa;
+    _ZTSPKb;
+    _ZTSPKc;
+    _ZTSPKd;
+    _ZTSPKe;
+    _ZTSPKf;
+    _ZTSPKh;
+    _ZTSPKi;
+    _ZTSPKj;
+    _ZTSPKl;
+    _ZTSPKm;
+    _ZTSPKs;
+    _ZTSPKt;
+    _ZTSPKv;
+    _ZTSPKw;
+    _ZTSPKx;
+    _ZTSPKy;
+    _ZTSPa;
+    _ZTSPb;
+    _ZTSPc;
+    _ZTSPd;
+    _ZTSPe;
+    _ZTSPf;
+    _ZTSPh;
+    _ZTSPi;
+    _ZTSPj;
+    _ZTSPl;
+    _ZTSPm;
+    _ZTSPs;
+    _ZTSPt;
+    _ZTSPv;
+    _ZTSPw;
+    _ZTSPx;
+    _ZTSPy;
+    _ZTSSt10bad_typeid;
+    _ZTSSt11logic_error;
+    _ZTSSt11range_error;
+    _ZTSSt12domain_error;
+    _ZTSSt12length_error;
+    _ZTSSt12out_of_range;
+    _ZTSSt13bad_exception;
+    _ZTSSt13runtime_error;
+    _ZTSSt14overflow_error;
+    _ZTSSt15underflow_error;
+    _ZTSSt16invalid_argument;
+    _ZTSSt20bad_array_new_length;
+    _ZTSSt8bad_cast;
+    _ZTSSt9bad_alloc;
+    _ZTSSt9exception;
+    _ZTSSt9type_info;
+    _ZTSa;
+    _ZTSb;
+    _ZTSc;
+    _ZTSd;
+    _ZTSe;
+    _ZTSf;
+    _ZTSh;
+    _ZTSi;
+    _ZTSj;
+    _ZTSl;
+    _ZTSm;
+    _ZTSs;
+    _ZTSt;
+    _ZTSv;
+    _ZTSw;
+    _ZTSx;
+    _ZTSy;
+    _ZTVN10__cxxabiv116__enum_type_infoE;
+    _ZTVN10__cxxabiv117__array_type_infoE;
+    _ZTVN10__cxxabiv117__class_type_infoE;
+    _ZTVN10__cxxabiv117__pbase_type_infoE;
+    _ZTVN10__cxxabiv119__pointer_type_infoE;
+    _ZTVN10__cxxabiv120__function_type_infoE;
+    _ZTVN10__cxxabiv120__si_class_type_infoE;
+    _ZTVN10__cxxabiv121__vmi_class_type_infoE;
+    _ZTVN10__cxxabiv123__fundamental_type_infoE;
+    _ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
+    _ZTVSt10bad_typeid;
+    _ZTVSt11logic_error;
+    _ZTVSt11range_error;
+    _ZTVSt12domain_error;
+    _ZTVSt12length_error;
+    _ZTVSt12out_of_range;
+    _ZTVSt13bad_exception;
+    _ZTVSt13runtime_error;
+    _ZTVSt14overflow_error;
+    _ZTVSt15underflow_error;
+    _ZTVSt16invalid_argument;
+    _ZTVSt20bad_array_new_length;
+    _ZTVSt8bad_cast;
+    _ZTVSt9bad_alloc;
+    _ZTVSt9exception;
+    _ZTVSt9type_info;
+    _ZdaPv;
+    _ZdaPvRKSt9nothrow_t;
+    _ZdlPv;
+    _ZdlPvRKSt9nothrow_t;
+    _Znaj;
+    _ZnajRKSt9nothrow_t;
+    _Znwj;
+    _ZnwjRKSt9nothrow_t;
+    __aeabi_unwind_cpp_pr0;
+    __aeabi_unwind_cpp_pr1;
+    __aeabi_unwind_cpp_pr2;
+    __cxa_allocate_dependent_exception;
+    __cxa_allocate_exception;
+    __cxa_bad_cast;
+    __cxa_bad_typeid;
+    __cxa_begin_catch;
+    __cxa_begin_cleanup;
+    __cxa_call_unexpected;
+    __cxa_current_exception_type;
+    __cxa_current_primary_exception;
+    __cxa_decrement_exception_refcount;
+    __cxa_deleted_virtual;
+    __cxa_demangle;
+    __cxa_end_catch;
+    __cxa_end_cleanup;
+    __cxa_free_dependent_exception;
+    __cxa_free_exception;
+    __cxa_get_exception_ptr;
+    __cxa_get_globals;
+    __cxa_get_globals_fast;
+    __cxa_guard_abort;
+    __cxa_guard_acquire;
+    __cxa_guard_release;
+    __cxa_increment_exception_refcount;
+    __cxa_pure_virtual;
+    __cxa_rethrow;
+    __cxa_rethrow_primary_exception;
+    __cxa_terminate_handler;
+    __cxa_throw;
+    __cxa_uncaught_exception;
+    __cxa_unexpected_handler;
+    __cxa_vec_cctor;
+    __cxa_vec_cleanup;
+    __cxa_vec_ctor;
+    __cxa_vec_delete;
+    __cxa_vec_delete2;
+    __cxa_vec_delete3;
+    __cxa_vec_dtor;
+    __cxa_vec_new;
+    __cxa_vec_new2;
+    __cxa_vec_new3;
+    __dynamic_cast;
+    __gxx_personality_v0;
+
+    /* libc++ exports */
+    _ZGVZNKSt3__120__time_get_c_storageIcE3__cEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIcE3__rEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIcE3__xEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIcE3__XEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIcE7__am_pmEvE5am_pm;
+    _ZGVZNKSt3__120__time_get_c_storageIcE7__weeksEvE5weeks;
+    _ZGVZNKSt3__120__time_get_c_storageIcE8__monthsEvE6months;
+    _ZGVZNKSt3__120__time_get_c_storageIwE3__cEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIwE3__rEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIwE3__xEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIwE3__XEvE1s;
+    _ZGVZNKSt3__120__time_get_c_storageIwE7__am_pmEvE5am_pm;
+    _ZGVZNKSt3__120__time_get_c_storageIwE7__weeksEvE5weeks;
+    _ZGVZNKSt3__120__time_get_c_storageIwE8__monthsEvE6months;
+    _ZNKSt16nested_exception14rethrow_nestedEv;
+    _ZNKSt3__110error_code7messageEv;
+    _ZNKSt3__110moneypunctIcLb0EE11do_groupingEv;
+    _ZNKSt3__110moneypunctIcLb0EE13do_neg_formatEv;
+    _ZNKSt3__110moneypunctIcLb0EE13do_pos_formatEv;
+    _ZNKSt3__110moneypunctIcLb0EE14do_curr_symbolEv;
+    _ZNKSt3__110moneypunctIcLb0EE14do_frac_digitsEv;
+    _ZNKSt3__110moneypunctIcLb0EE16do_decimal_pointEv;
+    _ZNKSt3__110moneypunctIcLb0EE16do_negative_signEv;
+    _ZNKSt3__110moneypunctIcLb0EE16do_positive_signEv;
+    _ZNKSt3__110moneypunctIcLb0EE16do_thousands_sepEv;
+    _ZNKSt3__110moneypunctIcLb1EE11do_groupingEv;
+    _ZNKSt3__110moneypunctIcLb1EE13do_neg_formatEv;
+    _ZNKSt3__110moneypunctIcLb1EE13do_pos_formatEv;
+    _ZNKSt3__110moneypunctIcLb1EE14do_curr_symbolEv;
+    _ZNKSt3__110moneypunctIcLb1EE14do_frac_digitsEv;
+    _ZNKSt3__110moneypunctIcLb1EE16do_decimal_pointEv;
+    _ZNKSt3__110moneypunctIcLb1EE16do_negative_signEv;
+    _ZNKSt3__110moneypunctIcLb1EE16do_positive_signEv;
+    _ZNKSt3__110moneypunctIcLb1EE16do_thousands_sepEv;
+    _ZNKSt3__110moneypunctIwLb0EE11do_groupingEv;
+    _ZNKSt3__110moneypunctIwLb0EE13do_neg_formatEv;
+    _ZNKSt3__110moneypunctIwLb0EE13do_pos_formatEv;
+    _ZNKSt3__110moneypunctIwLb0EE14do_curr_symbolEv;
+    _ZNKSt3__110moneypunctIwLb0EE14do_frac_digitsEv;
+    _ZNKSt3__110moneypunctIwLb0EE16do_decimal_pointEv;
+    _ZNKSt3__110moneypunctIwLb0EE16do_negative_signEv;
+    _ZNKSt3__110moneypunctIwLb0EE16do_positive_signEv;
+    _ZNKSt3__110moneypunctIwLb0EE16do_thousands_sepEv;
+    _ZNKSt3__110moneypunctIwLb1EE11do_groupingEv;
+    _ZNKSt3__110moneypunctIwLb1EE13do_neg_formatEv;
+    _ZNKSt3__110moneypunctIwLb1EE13do_pos_formatEv;
+    _ZNKSt3__110moneypunctIwLb1EE14do_curr_symbolEv;
+    _ZNKSt3__110moneypunctIwLb1EE14do_frac_digitsEv;
+    _ZNKSt3__110moneypunctIwLb1EE16do_decimal_pointEv;
+    _ZNKSt3__110moneypunctIwLb1EE16do_negative_signEv;
+    _ZNKSt3__110moneypunctIwLb1EE16do_positive_signEv;
+    _ZNKSt3__110moneypunctIwLb1EE16do_thousands_sepEv;
+    _ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc;
+    _ZNKSt3__110__time_put8__do_putEPwRS1_PK2tmcc;
+    _ZNKSt3__111__libcpp_db15__decrementableEPKv;
+    _ZNKSt3__111__libcpp_db15__find_c_from_iEPv;
+    _ZNKSt3__111__libcpp_db15__subscriptableEPKvi;
+    _ZNKSt3__111__libcpp_db17__dereferenceableEPKv;
+    _ZNKSt3__111__libcpp_db17__find_c_and_lockEPv;
+    _ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_;
+    _ZNKSt3__111__libcpp_db6unlockEv;
+    _ZNKSt3__111__libcpp_db8__find_cEPv;
+    _ZNKSt3__111__libcpp_db9__addableEPKvi;
+    _ZNKSt3__112bad_weak_ptr4whatEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEjjPKc;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEjjPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEjjRKS5_jj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEPKc;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEjjPKw;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEjjPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEjjRKS5_jj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEPKw;
+    _ZNKSt3__112ctype_bynameIcE10do_tolowerEc;
+    _ZNKSt3__112ctype_bynameIcE10do_tolowerEPcPKc;
+    _ZNKSt3__112ctype_bynameIcE10do_toupperEc;
+    _ZNKSt3__112ctype_bynameIcE10do_toupperEPcPKc;
+    _ZNKSt3__112ctype_bynameIwE10do_scan_isEtPKwS3_;
+    _ZNKSt3__112ctype_bynameIwE10do_tolowerEPwPKw;
+    _ZNKSt3__112ctype_bynameIwE10do_tolowerEw;
+    _ZNKSt3__112ctype_bynameIwE10do_toupperEPwPKw;
+    _ZNKSt3__112ctype_bynameIwE10do_toupperEw;
+    _ZNKSt3__112ctype_bynameIwE11do_scan_notEtPKwS3_;
+    _ZNKSt3__112ctype_bynameIwE5do_isEPKwS3_Pt;
+    _ZNKSt3__112ctype_bynameIwE5do_isEtw;
+    _ZNKSt3__112ctype_bynameIwE8do_widenEc;
+    _ZNKSt3__112ctype_bynameIwE8do_widenEPKcS3_Pw;
+    _ZNKSt3__112ctype_bynameIwE9do_narrowEPKwS3_cPc;
+    _ZNKSt3__112ctype_bynameIwE9do_narrowEwc;
+    _ZNKSt3__112strstreambuf6pcountEv;
+    _ZNKSt3__113random_device7entropyEv;
+    _ZNKSt3__114__codecvt_utf8IDiE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__114__codecvt_utf8IDiE11do_encodingEv;
+    _ZNKSt3__114__codecvt_utf8IDiE13do_max_lengthEv;
+    _ZNKSt3__114__codecvt_utf8IDiE16do_always_noconvEv;
+    _ZNKSt3__114__codecvt_utf8IDiE5do_inER9mbstate_tPKcS5_RS5_PDiS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IDiE6do_outER9mbstate_tPKDiS5_RS5_PcS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IDiE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__114__codecvt_utf8IDsE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__114__codecvt_utf8IDsE11do_encodingEv;
+    _ZNKSt3__114__codecvt_utf8IDsE13do_max_lengthEv;
+    _ZNKSt3__114__codecvt_utf8IDsE16do_always_noconvEv;
+    _ZNKSt3__114__codecvt_utf8IDsE5do_inER9mbstate_tPKcS5_RS5_PDsS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IDsE6do_outER9mbstate_tPKDsS5_RS5_PcS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IDsE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__114__codecvt_utf8IwE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__114__codecvt_utf8IwE11do_encodingEv;
+    _ZNKSt3__114__codecvt_utf8IwE13do_max_lengthEv;
+    _ZNKSt3__114__codecvt_utf8IwE16do_always_noconvEv;
+    _ZNKSt3__114__codecvt_utf8IwE5do_inER9mbstate_tPKcS5_RS5_PwS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IwE6do_outER9mbstate_tPKwS5_RS5_PcS7_RS7_;
+    _ZNKSt3__114__codecvt_utf8IwE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__114collate_bynameIcE10do_compareEPKcS3_S3_S3_;
+    _ZNKSt3__114collate_bynameIcE12do_transformEPKcS3_;
+    _ZNKSt3__114collate_bynameIwE10do_compareEPKwS3_S3_S3_;
+    _ZNKSt3__114collate_bynameIwE12do_transformEPKwS3_;
+    _ZNKSt3__114error_category10equivalentEiRKNS_15error_conditionE;
+    _ZNKSt3__114error_category10equivalentERKNS_10error_codeEi;
+    _ZNKSt3__114error_category23default_error_conditionEi;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE6getlocEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE5do_inER9mbstate_tPKcS5_RS5_PDiS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE6do_outER9mbstate_tPKDiS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE5do_inER9mbstate_tPKcS5_RS5_PDiS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE6do_outER9mbstate_tPKDiS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE5do_inER9mbstate_tPKcS5_RS5_PDsS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE6do_outER9mbstate_tPKDsS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE5do_inER9mbstate_tPKcS5_RS5_PDsS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE6do_outER9mbstate_tPKDsS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE5do_inER9mbstate_tPKcS5_RS5_PwS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE6do_outER9mbstate_tPKwS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE11do_encodingEv;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE13do_max_lengthEv;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE16do_always_noconvEv;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE5do_inER9mbstate_tPKcS5_RS5_PwS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE6do_outER9mbstate_tPKwS5_RS5_PcS7_RS7_;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__115error_condition7messageEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE14do_curr_symbolEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE14do_frac_digitsEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE16do_decimal_pointEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE16do_negative_signEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE16do_positive_signEv;
+    _ZNKSt3__117moneypunct_bynameIcLb0EE16do_thousands_sepEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE11do_groupingEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE13do_neg_formatEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE13do_pos_formatEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE14do_curr_symbolEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE14do_frac_digitsEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE16do_decimal_pointEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE16do_negative_signEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE16do_positive_signEv;
+    _ZNKSt3__117moneypunct_bynameIcLb1EE16do_thousands_sepEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE11do_groupingEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE13do_neg_formatEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE13do_pos_formatEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE14do_curr_symbolEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE14do_frac_digitsEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE16do_decimal_pointEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE16do_negative_signEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE16do_positive_signEv;
+    _ZNKSt3__117moneypunct_bynameIwLb0EE16do_thousands_sepEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE11do_groupingEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE13do_neg_formatEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE13do_pos_formatEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE14do_curr_symbolEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE14do_frac_digitsEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE16do_decimal_pointEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE16do_negative_signEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE16do_positive_signEv;
+    _ZNKSt3__117moneypunct_bynameIwLb1EE16do_thousands_sepEv;
+    _ZNKSt3__118__time_get_storageIcE15__do_date_orderEv;
+    _ZNKSt3__118__time_get_storageIwE15__do_date_orderEv;
+    _ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE11do_encodingEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE13do_max_lengthEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE16do_always_noconvEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE5do_inER9mbstate_tPKcS5_RS5_PDiS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE6do_outER9mbstate_tPKDiS5_RS5_PcS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE11do_encodingEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE13do_max_lengthEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE16do_always_noconvEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE5do_inER9mbstate_tPKcS5_RS5_PDsS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE6do_outER9mbstate_tPKDsS5_RS5_PcS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE10do_unshiftER9mbstate_tPcS4_RS4_;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE11do_encodingEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE13do_max_lengthEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE16do_always_noconvEv;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE5do_inER9mbstate_tPKcS5_RS5_PwS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE6do_outER9mbstate_tPKwS5_RS5_PcS7_RS7_;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER9mbstate_tPKcS5_j;
+    _ZNKSt3__120__time_get_c_storageIcE3__cEv;
+    _ZNKSt3__120__time_get_c_storageIcE3__rEv;
+    _ZNKSt3__120__time_get_c_storageIcE3__xEv;
+    _ZNKSt3__120__time_get_c_storageIcE3__XEv;
+    _ZNKSt3__120__time_get_c_storageIcE7__am_pmEv;
+    _ZNKSt3__120__time_get_c_storageIcE7__weeksEv;
+    _ZNKSt3__120__time_get_c_storageIcE8__monthsEv;
+    _ZNKSt3__120__time_get_c_storageIwE3__cEv;
+    _ZNKSt3__120__time_get_c_storageIwE3__rEv;
+    _ZNKSt3__120__time_get_c_storageIwE3__xEv;
+    _ZNKSt3__120__time_get_c_storageIwE3__XEv;
+    _ZNKSt3__120__time_get_c_storageIwE7__am_pmEv;
+    _ZNKSt3__120__time_get_c_storageIwE7__weeksEv;
+    _ZNKSt3__120__time_get_c_storageIwE8__monthsEv;
+    _ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv;
+    _ZNKSt3__120__vector_base_commonILb1EE20__throw_out_of_rangeEv;
+    _ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv;
+    _ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv;
+    _ZNKSt3__123__match_any_but_newlineIcE6__execERNS_7__stateIcEE;
+    _ZNKSt3__123__match_any_but_newlineIwE6__execERNS_7__stateIwEE;
+    _ZNKSt3__15ctypeIcE10do_tolowerEc;
+    _ZNKSt3__15ctypeIcE10do_tolowerEPcPKc;
+    _ZNKSt3__15ctypeIcE10do_toupperEc;
+    _ZNKSt3__15ctypeIcE10do_toupperEPcPKc;
+    _ZNKSt3__15ctypeIcE8do_widenEc;
+    _ZNKSt3__15ctypeIcE8do_widenEPKcS3_Pc;
+    _ZNKSt3__15ctypeIcE9do_narrowEcc;
+    _ZNKSt3__15ctypeIcE9do_narrowEPKcS3_cPc;
+    _ZNKSt3__15ctypeIwE10do_scan_isEtPKwS3_;
+    _ZNKSt3__15ctypeIwE10do_tolowerEPwPKw;
+    _ZNKSt3__15ctypeIwE10do_tolowerEw;
+    _ZNKSt3__15ctypeIwE10do_toupperEPwPKw;
+    _ZNKSt3__15ctypeIwE10do_toupperEw;
+    _ZNKSt3__15ctypeIwE11do_scan_notEtPKwS3_;
+    _ZNKSt3__15ctypeIwE5do_isEPKwS3_Pt;
+    _ZNKSt3__15ctypeIwE5do_isEtw;
+    _ZNKSt3__15ctypeIwE8do_widenEc;
+    _ZNKSt3__15ctypeIwE8do_widenEPKcS3_Pw;
+    _ZNKSt3__15ctypeIwE9do_narrowEPKwS3_cPc;
+    _ZNKSt3__15ctypeIwE9do_narrowEwc;
+    _ZNKSt3__16locale4nameEv;
+    _ZNKSt3__16locale9has_facetERNS0_2idE;
+    _ZNKSt3__16locale9use_facetERNS0_2idE;
+    _ZNKSt3__16localeeqERKS0_;
+    _ZNKSt3__17codecvtIcc9mbstate_tE10do_unshiftERS1_PcS4_RS4_;
+    _ZNKSt3__17codecvtIcc9mbstate_tE11do_encodingEv;
+    _ZNKSt3__17codecvtIcc9mbstate_tE13do_max_lengthEv;
+    _ZNKSt3__17codecvtIcc9mbstate_tE16do_always_noconvEv;
+    _ZNKSt3__17codecvtIcc9mbstate_tE5do_inERS1_PKcS5_RS5_PcS7_RS7_;
+    _ZNKSt3__17codecvtIcc9mbstate_tE6do_outERS1_PKcS5_RS5_PcS7_RS7_;
+    _ZNKSt3__17codecvtIcc9mbstate_tE9do_lengthERS1_PKcS5_j;
+    _ZNKSt3__17codecvtIDic9mbstate_tE10do_unshiftERS1_PcS4_RS4_;
+    _ZNKSt3__17codecvtIDic9mbstate_tE11do_encodingEv;
+    _ZNKSt3__17codecvtIDic9mbstate_tE13do_max_lengthEv;
+    _ZNKSt3__17codecvtIDic9mbstate_tE16do_always_noconvEv;
+    _ZNKSt3__17codecvtIDic9mbstate_tE5do_inERS1_PKcS5_RS5_PDiS7_RS7_;
+    _ZNKSt3__17codecvtIDic9mbstate_tE6do_outERS1_PKDiS5_RS5_PcS7_RS7_;
+    _ZNKSt3__17codecvtIDic9mbstate_tE9do_lengthERS1_PKcS5_j;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE10do_unshiftERS1_PcS4_RS4_;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE11do_encodingEv;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE13do_max_lengthEv;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE16do_always_noconvEv;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE5do_inERS1_PKcS5_RS5_PDsS7_RS7_;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE6do_outERS1_PKDsS5_RS5_PcS7_RS7_;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE9do_lengthERS1_PKcS5_j;
+    _ZNKSt3__17codecvtIwc9mbstate_tE10do_unshiftERS1_PcS4_RS4_;
+    _ZNKSt3__17codecvtIwc9mbstate_tE11do_encodingEv;
+    _ZNKSt3__17codecvtIwc9mbstate_tE13do_max_lengthEv;
+    _ZNKSt3__17codecvtIwc9mbstate_tE16do_always_noconvEv;
+    _ZNKSt3__17codecvtIwc9mbstate_tE5do_inERS1_PKcS5_RS5_PwS7_RS7_;
+    _ZNKSt3__17codecvtIwc9mbstate_tE6do_outERS1_PKwS5_RS5_PcS7_RS7_;
+    _ZNKSt3__17codecvtIwc9mbstate_tE9do_lengthERS1_PKcS5_j;
+    _ZNKSt3__17collateIcE10do_compareEPKcS3_S3_S3_;
+    _ZNKSt3__17collateIcE12do_transformEPKcS3_;
+    _ZNKSt3__17collateIcE7do_hashEPKcS3_;
+    _ZNKSt3__17collateIwE10do_compareEPKwS3_S3_S3_;
+    _ZNKSt3__17collateIwE12do_transformEPKwS3_;
+    _ZNKSt3__17collateIwE7do_hashEPKwS3_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRb;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRd;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRe;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRf;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRl;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRm;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRt;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRx;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRy;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIlEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__do_get_signedIxEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIjEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedImEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedItEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__do_get_unsignedIyEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIdEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE23__do_get_floating_pointIfEES4_S4_S4_RNS_8ios_baseERjRT_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRb;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRd;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRe;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRf;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRl;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRm;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRt;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRx;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjRy;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjS8_;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcb;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcd;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEce;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcl;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcm;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPKv;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcx;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcy;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwb;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwd;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwe;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwl;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwm;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPKv;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwx;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwy;
+    _ZNKSt3__18ios_base6getlocEv;
+    _ZNKSt3__18messagesIcE6do_getEiiiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNKSt3__18messagesIcE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE;
+    _ZNKSt3__18messagesIcE8do_closeEi;
+    _ZNKSt3__18messagesIwE6do_getEiiiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE;
+    _ZNKSt3__18messagesIwE7do_openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE;
+    _ZNKSt3__18messagesIwE8do_closeEi;
+    _ZNKSt3__18numpunctIcE11do_groupingEv;
+    _ZNKSt3__18numpunctIcE11do_truenameEv;
+    _ZNKSt3__18numpunctIcE12do_falsenameEv;
+    _ZNKSt3__18numpunctIcE16do_decimal_pointEv;
+    _ZNKSt3__18numpunctIcE16do_thousands_sepEv;
+    _ZNKSt3__18numpunctIwE11do_groupingEv;
+    _ZNKSt3__18numpunctIwE11do_truenameEv;
+    _ZNKSt3__18numpunctIwE12do_falsenameEv;
+    _ZNKSt3__18numpunctIwE16do_decimal_pointEv;
+    _ZNKSt3__18numpunctIwE16do_thousands_sepEv;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKcSC_;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIcEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_hourERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10__get_yearERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_dateES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_yearES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_am_pmERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_monthERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11__get_year4ERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_minuteERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE12__get_secondERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_12_hourERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_percentERS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13__get_weekdayERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE14do_get_weekdayES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE15__get_monthnameERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE16do_get_monthnameES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_weekdaynameERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE17__get_white_spaceERS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE18__get_day_year_numERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmPKwSC_;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmcc;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE9__get_dayERiRS4_S4_RjRKNS_5ctypeIwEE;
+    _ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmPKcSC_;
+    _ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_RNS_8ios_baseEcPK2tmcc;
+    _ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmPKwSC_;
+    _ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_RNS_8ios_baseEwPK2tmcc;
+    _ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe;
+    _ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE;
+    _ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRe;
+    _ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE;
+    _ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEce;
+    _ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE;
+    _ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwe;
+    _ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE;
+    _ZNSt11logic_erroraSERKS_;
+    _ZNSt11logic_errorC1EPKc;
+    _ZNSt11logic_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE;
+    _ZNSt11logic_errorC1ERKS_;
+    _ZNSt11logic_errorC2EPKc;
+    _ZNSt11logic_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE;
+    _ZNSt11logic_errorC2ERKS_;
+    _ZNSt12experimental19bad_optional_accessD0Ev;
+    _ZNSt12experimental19bad_optional_accessD1Ev;
+    _ZNSt12experimental19bad_optional_accessD2Ev;
+    _ZNSt13exception_ptraSERKS_;
+    _ZNSt13exception_ptrC1ERKS_;
+    _ZNSt13exception_ptrC2ERKS_;
+    _ZNSt13exception_ptrD1Ev;
+    _ZNSt13exception_ptrD2Ev;
+    _ZNSt13runtime_erroraSERKS_;
+    _ZNSt13runtime_errorC1EPKc;
+    _ZNSt13runtime_errorC1ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE;
+    _ZNSt13runtime_errorC1ERKS_;
+    _ZNSt13runtime_errorC2EPKc;
+    _ZNSt13runtime_errorC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE;
+    _ZNSt13runtime_errorC2ERKS_;
+    _ZNSt16nested_exceptionC1Ev;
+    _ZNSt16nested_exceptionC2Ev;
+    _ZNSt16nested_exceptionD0Ev;
+    _ZNSt16nested_exceptionD1Ev;
+    _ZNSt16nested_exceptionD2Ev;
+    _ZNSt3__110adopt_lockE;
+    _ZNSt3__110ctype_base5alnumE;
+    _ZNSt3__110ctype_base5alphaE;
+    _ZNSt3__110ctype_base5blankE;
+    _ZNSt3__110ctype_base5cntrlE;
+    _ZNSt3__110ctype_base5digitE;
+    _ZNSt3__110ctype_base5graphE;
+    _ZNSt3__110ctype_base5lowerE;
+    _ZNSt3__110ctype_base5printE;
+    _ZNSt3__110ctype_base5punctE;
+    _ZNSt3__110ctype_base5spaceE;
+    _ZNSt3__110ctype_base5upperE;
+    _ZNSt3__110ctype_base6xdigitE;
+    _ZNSt3__110defer_lockE;
+    _ZNSt3__110istrstreamD0Ev;
+    _ZNSt3__110istrstreamD1Ev;
+    _ZNSt3__110istrstreamD2Ev;
+    _ZNSt3__110moneypunctIcLb0EE2idE;
+    _ZNSt3__110moneypunctIcLb0EE4intlE;
+    _ZNSt3__110moneypunctIcLb1EE2idE;
+    _ZNSt3__110moneypunctIcLb1EE4intlE;
+    _ZNSt3__110moneypunctIwLb0EE2idE;
+    _ZNSt3__110moneypunctIwLb0EE4intlE;
+    _ZNSt3__110moneypunctIwLb1EE2idE;
+    _ZNSt3__110moneypunctIwLb1EE4intlE;
+    _ZNSt3__110__new_clocEv;
+    _ZNSt3__110ostrstreamD0Ev;
+    _ZNSt3__110ostrstreamD1Ev;
+    _ZNSt3__110ostrstreamD2Ev;
+    _ZNSt3__110__sscanf_lEPKcP13locale_structS1_z;
+    _ZNSt3__110__time_getC1EPKc;
+    _ZNSt3__110__time_getC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__110__time_getC2EPKc;
+    _ZNSt3__110__time_getC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__110__time_getD1Ev;
+    _ZNSt3__110__time_getD2Ev;
+    _ZNSt3__110__time_putC1EPKc;
+    _ZNSt3__110__time_putC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__110__time_putC2EPKc;
+    _ZNSt3__110__time_putC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__110__time_putD1Ev;
+    _ZNSt3__110__time_putD2Ev;
+    _ZNSt3__110to_wstringEd;
+    _ZNSt3__110to_wstringEe;
+    _ZNSt3__110to_wstringEf;
+    _ZNSt3__110to_wstringEg;
+    _ZNSt3__110to_wstringEi;
+    _ZNSt3__110to_wstringEj;
+    _ZNSt3__110to_wstringEl;
+    _ZNSt3__110to_wstringEm;
+    _ZNSt3__110to_wstringEx;
+    _ZNSt3__110to_wstringEy;
+    _ZNSt3__111__call_onceERVmPvPFvS2_E;
+    _ZNSt3__111__libcpp_db10__insert_cEPv;
+    _ZNSt3__111__libcpp_db10__insert_iEPv;
+    _ZNSt3__111__libcpp_db11__insert_icEPvPKv;
+    _ZNSt3__111__libcpp_db15__iterator_copyEPvPKv;
+    _ZNSt3__111__libcpp_db16__invalidate_allEPv;
+    _ZNSt3__111__libcpp_db4swapEPvS1_;
+    _ZNSt3__111__libcpp_db9__erase_cEPv;
+    _ZNSt3__111__libcpp_db9__erase_iEPv;
+    _ZNSt3__111__libcpp_dbC1Ev;
+    _ZNSt3__111__libcpp_dbC2Ev;
+    _ZNSt3__111__libcpp_dbD1Ev;
+    _ZNSt3__111__libcpp_dbD2Ev;
+    _ZNSt3__111__money_getIcE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_SF_Ri;
+    _ZNSt3__111__money_getIwE13__gather_infoEbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_SJ_Ri;
+    _ZNSt3__111__money_putIcE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERcS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESF_SF_Ri;
+    _ZNSt3__111__money_putIcE8__formatEPcRS2_S3_jPKcS5_RKNS_5ctypeIcEEbRKNS_10money_base7patternEccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_SL_i;
+    _ZNSt3__111__money_putIwE13__gather_infoEbbRKNS_6localeERNS_10money_base7patternERwS8_RNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS9_IwNSA_IwEENSC_IwEEEESJ_Ri;
+    _ZNSt3__111__money_putIwE8__formatEPwRS2_S3_jPKwS5_RKNS_5ctypeIwEEbRKNS_10money_base7patternEwwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNSE_IwNSF_IwEENSH_IwEEEESQ_i;
+    _ZNSt3__111regex_errorC1ENS_15regex_constants10error_typeE;
+    _ZNSt3__111regex_errorC2ENS_15regex_constants10error_typeE;
+    _ZNSt3__111regex_errorD0Ev;
+    _ZNSt3__111regex_errorD1Ev;
+    _ZNSt3__111regex_errorD2Ev;
+    _ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILx1ELx1000000000EEEEE;
+    _ZNSt3__111timed_mutex4lockEv;
+    _ZNSt3__111timed_mutex6unlockEv;
+    _ZNSt3__111timed_mutex8try_lockEv;
+    _ZNSt3__111timed_mutexC1Ev;
+    _ZNSt3__111timed_mutexC2Ev;
+    _ZNSt3__111timed_mutexD1Ev;
+    _ZNSt3__111timed_mutexD2Ev;
+    _ZNSt3__111try_to_lockE;
+    _ZNSt3__111unique_lockINS_5mutexEE6unlockEv;
+    _ZNSt3__112__asprintf_lEPPcP13locale_structPKcz;
+    _ZNSt3__112bad_weak_ptrD0Ev;
+    _ZNSt3__112bad_weak_ptrD1Ev;
+    _ZNSt3__112bad_weak_ptrD2Ev;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEjjjjjjPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4nposE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEjj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_jj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueERS5_E4typeES9_S9_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_jj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcjj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPKcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeESA_SA_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEjjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEjPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEjPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEjRKS5_jj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEjjjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEjjPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEjjPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEjjRKS5_jj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceIPKcEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEjjjjjj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_jjRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_RKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_jjRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_RKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEjjjjjjPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4nposE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEjj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_jj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendIPwEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueERS5_E4typeES9_S9_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_jj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignIPwEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueERS5_E4typeES9_S9_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwjj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initIPKwEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeESA_SA_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEjjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEjPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEjPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEjRKS5_jj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertIPKwEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueENS_11__wrap_iterIPwEEE4typeENSB_IS8_EESA_SA_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEjjjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEjjPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEjjPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEjjRKS5_jj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceIPKwEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEjjjjjj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_jjRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_RKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_jjRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_RKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev;
+    _ZNSt3__112ctype_bynameIcEC1EPKcj;
+    _ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__112ctype_bynameIcEC2EPKcj;
+    _ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__112ctype_bynameIcED0Ev;
+    _ZNSt3__112ctype_bynameIcED1Ev;
+    _ZNSt3__112ctype_bynameIcED2Ev;
+    _ZNSt3__112ctype_bynameIwEC1EPKcj;
+    _ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__112ctype_bynameIwEC2EPKcj;
+    _ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__112ctype_bynameIwED0Ev;
+    _ZNSt3__112ctype_bynameIwED1Ev;
+    _ZNSt3__112ctype_bynameIwED2Ev;
+    _ZNSt3__112__do_nothingEPv;
+    _ZNSt3__112future_errorC1ENS_10error_codeE;
+    _ZNSt3__112future_errorC2ENS_10error_codeE;
+    _ZNSt3__112future_errorC2ERKS0_;
+    _ZNSt3__112future_errorD0Ev;
+    _ZNSt3__112future_errorD1Ev;
+    _ZNSt3__112future_errorD2Ev;
+    _ZNSt3__112__get_sp_mutEPKv;
+    _ZNSt3__112__next_primeEj;
+    _ZNSt3__112__next_primeEm;
+    _ZNSt3__112placeholders2_1E;
+    _ZNSt3__112placeholders2_2E;
+    _ZNSt3__112placeholders2_3E;
+    _ZNSt3__112placeholders2_4E;
+    _ZNSt3__112placeholders2_5E;
+    _ZNSt3__112placeholders2_6E;
+    _ZNSt3__112placeholders2_7E;
+    _ZNSt3__112placeholders2_8E;
+    _ZNSt3__112placeholders2_9E;
+    _ZNSt3__112placeholders3_10E;
+    _ZNSt3__112__rotate_gcdINS_11__wrap_iterIPcEEEET_S4_S4_S4_;
+    _ZNSt3__112__rotate_gcdINS_11__wrap_iterIPwEEEET_S4_S4_S4_;
+    _ZNSt3__112__rs_default4__c_E;
+    _ZNSt3__112__rs_defaultC1ERKS0_;
+    _ZNSt3__112__rs_defaultC1Ev;
+    _ZNSt3__112__rs_defaultC2ERKS0_;
+    _ZNSt3__112__rs_defaultC2Ev;
+    _ZNSt3__112__rs_defaultclEv;
+    _ZNSt3__112__rs_defaultD1Ev;
+    _ZNSt3__112__rs_defaultD2Ev;
+    _ZNSt3__112__snprintf_lEPcjP13locale_structPKcz;
+    _ZNSt3__112strstreambuf3strEv;
+    _ZNSt3__112strstreambuf4swapERS0_;
+    _ZNSt3__112strstreambuf6freezeEb;
+    _ZNSt3__112strstreambuf6__initEPciS1_;
+    _ZNSt3__112strstreambuf7seekoffExNS_8ios_base7seekdirEj;
+    _ZNSt3__112strstreambuf7seekposENS_4fposI9mbstate_tEEj;
+    _ZNSt3__112strstreambuf8overflowEi;
+    _ZNSt3__112strstreambuf9pbackfailEi;
+    _ZNSt3__112strstreambuf9underflowEv;
+    _ZNSt3__112strstreambufC1Ei;
+    _ZNSt3__112strstreambufC1EPaiS1_;
+    _ZNSt3__112strstreambufC1EPciS1_;
+    _ZNSt3__112strstreambufC1EPFPvjEPFvS1_E;
+    _ZNSt3__112strstreambufC1EPhiS1_;
+    _ZNSt3__112strstreambufC1EPKai;
+    _ZNSt3__112strstreambufC1EPKci;
+    _ZNSt3__112strstreambufC1EPKhi;
+    _ZNSt3__112strstreambufC2Ei;
+    _ZNSt3__112strstreambufC2EPaiS1_;
+    _ZNSt3__112strstreambufC2EPciS1_;
+    _ZNSt3__112strstreambufC2EPFPvjEPFvS1_E;
+    _ZNSt3__112strstreambufC2EPhiS1_;
+    _ZNSt3__112strstreambufC2EPKai;
+    _ZNSt3__112strstreambufC2EPKci;
+    _ZNSt3__112strstreambufC2EPKhi;
+    _ZNSt3__112strstreambufD0Ev;
+    _ZNSt3__112strstreambufD1Ev;
+    _ZNSt3__112strstreambufD2Ev;
+    _ZNSt3__112system_error6__initERKNS_10error_codeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__112system_errorC1EiRKNS_14error_categoryE;
+    _ZNSt3__112system_errorC1EiRKNS_14error_categoryEPKc;
+    _ZNSt3__112system_errorC1EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__112system_errorC1ENS_10error_codeE;
+    _ZNSt3__112system_errorC1ENS_10error_codeEPKc;
+    _ZNSt3__112system_errorC1ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__112system_errorC2EiRKNS_14error_categoryE;
+    _ZNSt3__112system_errorC2EiRKNS_14error_categoryEPKc;
+    _ZNSt3__112system_errorC2EiRKNS_14error_categoryERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__112system_errorC2ENS_10error_codeE;
+    _ZNSt3__112system_errorC2ENS_10error_codeEPKc;
+    _ZNSt3__112system_errorC2ENS_10error_codeERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__112system_errorD0Ev;
+    _ZNSt3__112system_errorD1Ev;
+    _ZNSt3__112system_errorD2Ev;
+    _ZNSt3__113allocator_argE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPci;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcic;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERc;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4peekEv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPci;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4swapERS3_;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4syncEv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI9mbstate_tEE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5tellgEv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE5ungetEv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEii;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPci;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcic;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7putbackEc;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPci;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEED2Ev;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERb;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERd;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERe;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERf;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERi;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERj;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERl;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERm;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERPv;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERs;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERt;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERx;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsERy;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwi;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwiw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getERw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4peekEv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwi;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4swapERS3_;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4syncEv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI9mbstate_tEE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5ungetEv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreEii;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwi;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwiw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7putbackEw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwi;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERb;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERe;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERf;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERi;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERl;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERm;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERPv;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERs;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERt;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERx;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERy;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI9mbstate_tEE;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5tellpEv;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKci;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEb;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEd;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEe;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEf;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEl;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEs;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEt;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEy;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE3putEw;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5flushEv;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI9mbstate_tEE;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5tellpEv;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwi;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEb;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEd;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEe;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEf;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEi;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEj;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEl;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEm;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPKv;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEs;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEt;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEx;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEy;
+    _ZNSt3__113find_first_ofIPKcS2_PFbccEEET_S5_S5_T0_S6_T1_;
+    _ZNSt3__113find_first_ofIPKwS2_PFbwwEEET_S5_S5_T0_S6_T1_;
+    _ZNSt3__113__lower_boundIRNS_6__lessIjjEEPKjjEET0_S6_S6_RKT1_T_;
+    _ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__113random_deviceclEv;
+    _ZNSt3__113random_deviceD1Ev;
+    _ZNSt3__113random_deviceD2Ev;
+    _ZNSt3__113__rotate_leftINS_11__wrap_iterIPcEEEET_S4_S4_;
+    _ZNSt3__113__rotate_leftINS_11__wrap_iterIPwEEEET_S4_S4_;
+    _ZNSt3__113shared_futureIvEaSERKS1_;
+    _ZNSt3__113shared_futureIvED1Ev;
+    _ZNSt3__113shared_futureIvED2Ev;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEED2Ev;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tED0Ev;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tED1Ev;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tED2Ev;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tED0Ev;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tED1Ev;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tED2Ev;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tED0Ev;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tED1Ev;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tED2Ev;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tED0Ev;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tED1Ev;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tED2Ev;
+    _ZNSt3__114__codecvt_utf8IDiED0Ev;
+    _ZNSt3__114__codecvt_utf8IDiED2Ev;
+    _ZNSt3__114__codecvt_utf8IDsED0Ev;
+    _ZNSt3__114__codecvt_utf8IDsED2Ev;
+    _ZNSt3__114__codecvt_utf8IwED0Ev;
+    _ZNSt3__114__codecvt_utf8IwED2Ev;
+    _ZNSt3__114collate_bynameIcEC1EPKcj;
+    _ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114collate_bynameIcEC2EPKcj;
+    _ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114collate_bynameIcED0Ev;
+    _ZNSt3__114collate_bynameIcED1Ev;
+    _ZNSt3__114collate_bynameIcED2Ev;
+    _ZNSt3__114collate_bynameIwEC1EPKcj;
+    _ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114collate_bynameIwEC2EPKcj;
+    _ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114collate_bynameIwED0Ev;
+    _ZNSt3__114collate_bynameIwED1Ev;
+    _ZNSt3__114collate_bynameIwED2Ev;
+    _ZNSt3__114error_categoryC1Ev;
+    _ZNSt3__114error_categoryC2Ev;
+    _ZNSt3__114error_categoryD0Ev;
+    _ZNSt3__114error_categoryD1Ev;
+    _ZNSt3__114error_categoryD2Ev;
+    _ZNSt3__114__get_const_dbEv;
+    _ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE;
+    _ZNSt3__114__num_get_base5__srcE;
+    _ZNSt3__114__num_put_base12__format_intEPcPKcbj;
+    _ZNSt3__114__num_put_base14__format_floatEPcPKcj;
+    _ZNSt3__114__num_put_base18__identify_paddingEPcS1_RKNS_8ios_baseE;
+    _ZNSt3__114__rotate_rightINS_11__wrap_iterIPcEEEET_S4_S4_;
+    _ZNSt3__114__rotate_rightINS_11__wrap_iterIPwEEEET_S4_S4_;
+    _ZNSt3__114__shared_count12__add_sharedEv;
+    _ZNSt3__114__shared_count16__release_sharedEv;
+    _ZNSt3__114__shared_countD0Ev;
+    _ZNSt3__114__shared_countD1Ev;
+    _ZNSt3__114__shared_countD2Ev;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI9mbstate_tEEj;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4swapERS3_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE4syncEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5gbumpEi;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbumpEi;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetcEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputcEc;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5uflowEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6snextcEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI9mbstate_tEEj;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE7sungetcEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8in_availEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8overflowEi;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPci;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9showmanycEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9underflowEv;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEaSERKS3_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC1Ev;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2ERKS3_;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEEC2Ev;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED0Ev;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED1Ev;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEED2Ev;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI9mbstate_tEEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4swapERS3_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE4syncEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5gbumpEi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbumpEi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetcEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputcEw;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5uflowEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6snextcEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI9mbstate_tEEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE7sungetcEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8in_availEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwi;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9showmanycEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9underflowEv;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEaSERKS3_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC1Ev;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2ERKS3_;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED0Ev;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED1Ev;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev;
+    _ZNSt3__115__codecvt_utf16IDiLb0EED0Ev;
+    _ZNSt3__115__codecvt_utf16IDiLb0EED2Ev;
+    _ZNSt3__115__codecvt_utf16IDiLb1EED0Ev;
+    _ZNSt3__115__codecvt_utf16IDiLb1EED2Ev;
+    _ZNSt3__115__codecvt_utf16IDsLb0EED0Ev;
+    _ZNSt3__115__codecvt_utf16IDsLb0EED2Ev;
+    _ZNSt3__115__codecvt_utf16IDsLb1EED0Ev;
+    _ZNSt3__115__codecvt_utf16IDsLb1EED2Ev;
+    _ZNSt3__115__codecvt_utf16IwLb0EED0Ev;
+    _ZNSt3__115__codecvt_utf16IwLb0EED2Ev;
+    _ZNSt3__115__codecvt_utf16IwLb1EED0Ev;
+    _ZNSt3__115__codecvt_utf16IwLb1EED2Ev;
+    _ZNSt3__115future_categoryEv;
+    _ZNSt3__115__get_classnameEPKcb;
+    _ZNSt3__115__num_get_floatIdEET_PKcS3_Rj;
+    _ZNSt3__115__num_get_floatIeEET_PKcS3_Rj;
+    _ZNSt3__115__num_get_floatIfEET_PKcS3_Rj;
+    _ZNSt3__115numpunct_bynameIcE6__initEPKc;
+    _ZNSt3__115numpunct_bynameIcEC1EPKcj;
+    _ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115numpunct_bynameIcEC2EPKcj;
+    _ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115numpunct_bynameIcED0Ev;
+    _ZNSt3__115numpunct_bynameIcED1Ev;
+    _ZNSt3__115numpunct_bynameIcED2Ev;
+    _ZNSt3__115numpunct_bynameIwE6__initEPKc;
+    _ZNSt3__115numpunct_bynameIwEC1EPKcj;
+    _ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115numpunct_bynameIwEC2EPKcj;
+    _ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115numpunct_bynameIwED0Ev;
+    _ZNSt3__115numpunct_bynameIwED1Ev;
+    _ZNSt3__115numpunct_bynameIwED2Ev;
+    _ZNSt3__115recursive_mutex4lockEv;
+    _ZNSt3__115recursive_mutex6unlockEv;
+    _ZNSt3__115recursive_mutex8try_lockEv;
+    _ZNSt3__115recursive_mutexC1Ev;
+    _ZNSt3__115recursive_mutexC2Ev;
+    _ZNSt3__115recursive_mutexD1Ev;
+    _ZNSt3__115recursive_mutexD2Ev;
+    _ZNSt3__115system_categoryEv;
+    _ZNSt3__115__thread_struct25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE;
+    _ZNSt3__115__thread_struct27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE;
+    _ZNSt3__115__thread_structC1Ev;
+    _ZNSt3__115__thread_structC2Ev;
+    _ZNSt3__115__thread_structD1Ev;
+    _ZNSt3__115__thread_structD2Ev;
+    _ZNSt3__116__check_groupingERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjS8_Rj;
+    _ZNSt3__116generic_categoryEv;
+    _ZNSt3__116__narrow_to_utf8ILj16EED0Ev;
+    _ZNSt3__116__narrow_to_utf8ILj16EED1Ev;
+    _ZNSt3__116__narrow_to_utf8ILj16EED2Ev;
+    _ZNSt3__116__narrow_to_utf8ILj32EED0Ev;
+    _ZNSt3__116__narrow_to_utf8ILj32EED1Ev;
+    _ZNSt3__116__narrow_to_utf8ILj32EED2Ev;
+    _ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE;
+    _ZNSt3__117__assoc_sub_state12__make_readyEv;
+    _ZNSt3__117__assoc_sub_state13set_exceptionESt13exception_ptr;
+    _ZNSt3__117__assoc_sub_state16__on_zero_sharedEv;
+    _ZNSt3__117__assoc_sub_state24set_value_at_thread_exitEv;
+    _ZNSt3__117__assoc_sub_state28set_exception_at_thread_exitESt13exception_ptr;
+    _ZNSt3__117__assoc_sub_state4copyEv;
+    _ZNSt3__117__assoc_sub_state4waitEv;
+    _ZNSt3__117__assoc_sub_state9__executeEv;
+    _ZNSt3__117__assoc_sub_state9set_valueEv;
+    _ZNSt3__117__assoc_sub_stateD0Ev;
+    _ZNSt3__117__assoc_sub_stateD2Ev;
+    _ZNSt3__117declare_reachableEPv;
+    _ZNSt3__117iostream_categoryEv;
+    _ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc;
+    _ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc;
+    _ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc;
+    _ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc;
+    _ZNSt3__117__widen_from_utf8ILj16EED0Ev;
+    _ZNSt3__117__widen_from_utf8ILj16EED1Ev;
+    _ZNSt3__117__widen_from_utf8ILj16EED2Ev;
+    _ZNSt3__117__widen_from_utf8ILj32EED0Ev;
+    _ZNSt3__117__widen_from_utf8ILj32EED1Ev;
+    _ZNSt3__117__widen_from_utf8ILj32EED2Ev;
+    _ZNSt3__118condition_variable10notify_allEv;
+    _ZNSt3__118condition_variable10notify_oneEv;
+    _ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILx1ELx1000000000EEEEEEE;
+    _ZNSt3__118condition_variable4waitERNS_11unique_lockINS_5mutexEEE;
+    _ZNSt3__118condition_variableD1Ev;
+    _ZNSt3__118condition_variableD2Ev;
+    _ZNSt3__118get_pointer_safetyEv;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIaaEEPaEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIccEEPcEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIddEEPdEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIeeEEPeEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIffEEPfEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIhhEEPhEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIiiEEPiEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIjjEEPjEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIllEEPlEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessImmEEPmEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIssEEPsEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIttEEPtEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIwwEEPwEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIxxEEPxEEvT0_S5_T_;
+    _ZNSt3__118__insertion_sort_3IRNS_6__lessIyyEEPyEEvT0_S5_T_;
+    _ZNSt3__118shared_timed_mutex11lock_sharedEv;
+    _ZNSt3__118shared_timed_mutex13unlock_sharedEv;
+    _ZNSt3__118shared_timed_mutex15try_lock_sharedEv;
+    _ZNSt3__118shared_timed_mutex4lockEv;
+    _ZNSt3__118shared_timed_mutex6unlockEv;
+    _ZNSt3__118shared_timed_mutex8try_lockEv;
+    _ZNSt3__118shared_timed_mutexC1Ev;
+    _ZNSt3__118shared_timed_mutexC2Ev;
+    _ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE;
+    _ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE;
+    _ZNSt3__118__time_get_storageIcEC1EPKc;
+    _ZNSt3__118__time_get_storageIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__118__time_get_storageIcEC2EPKc;
+    _ZNSt3__118__time_get_storageIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE;
+    _ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE;
+    _ZNSt3__118__time_get_storageIwEC1EPKc;
+    _ZNSt3__118__time_get_storageIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__118__time_get_storageIwEC2EPKc;
+    _ZNSt3__118__time_get_storageIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__119declare_no_pointersEPcj;
+    _ZNSt3__119piecewise_constructE;
+    _ZNSt3__119__shared_weak_count10__add_weakEv;
+    _ZNSt3__119__shared_weak_count12__add_sharedEv;
+    _ZNSt3__119__shared_weak_count14__release_weakEv;
+    _ZNSt3__119__shared_weak_count16__release_sharedEv;
+    _ZNSt3__119__shared_weak_count4lockEv;
+    _ZNSt3__119__shared_weak_countD0Ev;
+    _ZNSt3__119__shared_weak_countD1Ev;
+    _ZNSt3__119__shared_weak_countD2Ev;
+    _ZNSt3__119__start_std_streamsE;
+    _ZNSt3__119__thread_local_dataEv;
+    _ZNSt3__120__codecvt_utf8_utf16IDiED0Ev;
+    _ZNSt3__120__codecvt_utf8_utf16IDiED2Ev;
+    _ZNSt3__120__codecvt_utf8_utf16IDsED0Ev;
+    _ZNSt3__120__codecvt_utf8_utf16IDsED2Ev;
+    _ZNSt3__120__codecvt_utf8_utf16IwED0Ev;
+    _ZNSt3__120__codecvt_utf8_utf16IwED2Ev;
+    _ZNSt3__120__get_collation_nameEPKc;
+    _ZNSt3__120__throw_system_errorEiPKc;
+    _ZNSt3__120__time_get_c_storageIcEC2Ev;
+    _ZNSt3__120__time_get_c_storageIwEC2Ev;
+    _ZNSt3__121__murmur2_or_cityhashIjLj32EEclEPKvj;
+    _ZNSt3__121recursive_timed_mutex4lockEv;
+    _ZNSt3__121recursive_timed_mutex6unlockEv;
+    _ZNSt3__121recursive_timed_mutex8try_lockEv;
+    _ZNSt3__121recursive_timed_mutexC1Ev;
+    _ZNSt3__121recursive_timed_mutexC2Ev;
+    _ZNSt3__121recursive_timed_mutexD1Ev;
+    _ZNSt3__121recursive_timed_mutexD2Ev;
+    _ZNSt3__121__thread_specific_ptrINS_15__thread_structEE16__at_thread_exitEPv;
+    _ZNSt3__121__thread_specific_ptrINS_15__thread_structEEC2Ev;
+    _ZNSt3__121__thread_specific_ptrINS_15__thread_structEED2Ev;
+    _ZNSt3__121__throw_runtime_errorEPKc;
+    _ZNSt3__121undeclare_no_pointersEPcj;
+    _ZNSt3__121__undeclare_reachableEPv;
+    _ZNSt3__122__release_shared_countclEPNS_14__shared_countE;
+    _ZNSt3__123mersenne_twister_engineIjLj32ELj624ELj397ELj31ELj2567483615ELj11ELj4294967295ELj7ELj2636928640ELj15ELj4022730752ELj18ELj1812433253EE4seedEj;
+    _ZNSt3__123mersenne_twister_engineIjLj32ELj624ELj397ELj31ELj2567483615ELj11ELj4294967295ELj7ELj2636928640ELj15ELj4022730752ELj18ELj1812433253EEclEv;
+    _ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE;
+    _ZNSt3__125__num_get_signed_integralIlEET_PKcS3_Rji;
+    _ZNSt3__125__num_get_signed_integralIxEET_PKcS3_Rji;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIeeEEPeEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIffEEPfEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIhhEEPhEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIiiEEPiEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIjjEEPjEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIllEEPlEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessImmEEPmEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIssEEPsEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIttEEPtEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIwwEEPwEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_;
+    _ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_;
+    _ZNSt3__127__num_get_unsigned_integralIjEET_PKcS3_Rji;
+    _ZNSt3__127__num_get_unsigned_integralImEET_PKcS3_Rji;
+    _ZNSt3__127__num_get_unsigned_integralItEET_PKcS3_Rji;
+    _ZNSt3__127__num_get_unsigned_integralIyEET_PKcS3_Rji;
+    _ZNSt3__13cinE;
+    _ZNSt3__14cerrE;
+    _ZNSt3__14clogE;
+    _ZNSt3__14coutE;
+    _ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPj;
+    _ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPj;
+    _ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPj;
+    _ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPj;
+    _ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji;
+    _ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPji;
+    _ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji;
+    _ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPji;
+    _ZNSt3__14wcinE;
+    _ZNSt3__15alignEjjRPvRj;
+    _ZNSt3__15ctypeIcE13classic_tableEv;
+    _ZNSt3__15ctypeIcE2idE;
+    _ZNSt3__15ctypeIcEC1EPKtbj;
+    _ZNSt3__15ctypeIcEC2EPKtbj;
+    _ZNSt3__15ctypeIcED0Ev;
+    _ZNSt3__15ctypeIcED1Ev;
+    _ZNSt3__15ctypeIcED2Ev;
+    _ZNSt3__15ctypeIwE2idE;
+    _ZNSt3__15ctypeIwED0Ev;
+    _ZNSt3__15ctypeIwED1Ev;
+    _ZNSt3__15ctypeIwED2Ev;
+    _ZNSt3__15mutex4lockEv;
+    _ZNSt3__15mutex6unlockEv;
+    _ZNSt3__15mutex8try_lockEv;
+    _ZNSt3__15mutexD1Ev;
+    _ZNSt3__15mutexD2Ev;
+    _ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPj;
+    _ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPj;
+    _ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji;
+    _ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPji;
+    _ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji;
+    _ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPji;
+    _ZNSt3__15wcerrE;
+    _ZNSt3__15wclogE;
+    _ZNSt3__15wcoutE;
+    _ZNSt3__16chrono12steady_clock3nowEv;
+    _ZNSt3__16chrono12steady_clock9is_steadyE;
+    _ZNSt3__16chrono12system_clock11from_time_tEl;
+    _ZNSt3__16chrono12system_clock3nowEv;
+    _ZNSt3__16chrono12system_clock9is_steadyE;
+    _ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILx1ELx1000000EEEEEEE;
+    _ZNSt3__16__clocEv;
+    _ZNSt3__16futureIvE3getEv;
+    _ZNSt3__16futureIvEC1EPNS_17__assoc_sub_stateE;
+    _ZNSt3__16futureIvEC2EPNS_17__assoc_sub_stateE;
+    _ZNSt3__16futureIvED1Ev;
+    _ZNSt3__16futureIvED2Ev;
+    _ZNSt3__16gslice6__initEj;
+    _ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl;
+    _ZNSt3__16locale2id5__getEv;
+    _ZNSt3__16locale2id6__initEv;
+    _ZNSt3__16locale2id9__next_idE;
+    _ZNSt3__16locale3allE;
+    _ZNSt3__16locale4noneE;
+    _ZNSt3__16locale4timeE;
+    _ZNSt3__16locale5ctypeE;
+    _ZNSt3__16locale5facet16__on_zero_sharedEv;
+    _ZNSt3__16locale5facetD0Ev;
+    _ZNSt3__16locale5facetD1Ev;
+    _ZNSt3__16locale5facetD2Ev;
+    _ZNSt3__16locale6globalERKS0_;
+    _ZNSt3__16locale7classicEv;
+    _ZNSt3__16locale7collateE;
+    _ZNSt3__16locale7numericE;
+    _ZNSt3__16locale8__globalEv;
+    _ZNSt3__16locale8messagesE;
+    _ZNSt3__16locale8monetaryE;
+    _ZNSt3__16localeaSERKS0_;
+    _ZNSt3__16localeC1EPKc;
+    _ZNSt3__16localeC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__16localeC1ERKS0_;
+    _ZNSt3__16localeC1ERKS0_PKci;
+    _ZNSt3__16localeC1ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi;
+    _ZNSt3__16localeC1ERKS0_S2_i;
+    _ZNSt3__16localeC1Ev;
+    _ZNSt3__16localeC2EPKc;
+    _ZNSt3__16localeC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNSt3__16localeC2ERKS0_;
+    _ZNSt3__16localeC2ERKS0_PKci;
+    _ZNSt3__16localeC2ERKS0_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi;
+    _ZNSt3__16localeC2ERKS0_S2_i;
+    _ZNSt3__16localeC2Ev;
+    _ZNSt3__16localeD1Ev;
+    _ZNSt3__16localeD2Ev;
+    _ZNSt3__16__sortIRNS_6__lessIaaEEPaEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIccEEPcEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIddEEPdEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIeeEEPeEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIffEEPfEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIhhEEPhEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIiiEEPiEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIjjEEPjEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIllEEPlEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessImmEEPmEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIssEEPsEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIttEEPtEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIwwEEPwEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIxxEEPxEEvT0_S5_T_;
+    _ZNSt3__16__sortIRNS_6__lessIyyEEPyEEvT0_S5_T_;
+    _ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji;
+    _ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPji;
+    _ZNSt3__16thread20hardware_concurrencyEv;
+    _ZNSt3__16thread4joinEv;
+    _ZNSt3__16thread6detachEv;
+    _ZNSt3__16threadD1Ev;
+    _ZNSt3__16threadD2Ev;
+    _ZNSt3__17codecvtIcc9mbstate_tE2idE;
+    _ZNSt3__17codecvtIcc9mbstate_tED0Ev;
+    _ZNSt3__17codecvtIcc9mbstate_tED1Ev;
+    _ZNSt3__17codecvtIcc9mbstate_tED2Ev;
+    _ZNSt3__17codecvtIDic9mbstate_tE2idE;
+    _ZNSt3__17codecvtIDic9mbstate_tED0Ev;
+    _ZNSt3__17codecvtIDic9mbstate_tED1Ev;
+    _ZNSt3__17codecvtIDic9mbstate_tED2Ev;
+    _ZNSt3__17codecvtIDsc9mbstate_tE2idE;
+    _ZNSt3__17codecvtIDsc9mbstate_tED0Ev;
+    _ZNSt3__17codecvtIDsc9mbstate_tED1Ev;
+    _ZNSt3__17codecvtIDsc9mbstate_tED2Ev;
+    _ZNSt3__17codecvtIwc9mbstate_tE2idE;
+    _ZNSt3__17codecvtIwc9mbstate_tEC1Ej;
+    _ZNSt3__17codecvtIwc9mbstate_tEC1EPKcj;
+    _ZNSt3__17codecvtIwc9mbstate_tEC2Ej;
+    _ZNSt3__17codecvtIwc9mbstate_tEC2EPKcj;
+    _ZNSt3__17codecvtIwc9mbstate_tED0Ev;
+    _ZNSt3__17codecvtIwc9mbstate_tED1Ev;
+    _ZNSt3__17codecvtIwc9mbstate_tED2Ev;
+    _ZNSt3__17collateIcE2idE;
+    _ZNSt3__17collateIcED0Ev;
+    _ZNSt3__17collateIcED1Ev;
+    _ZNSt3__17collateIcED2Ev;
+    _ZNSt3__17collateIwE2idE;
+    _ZNSt3__17collateIwED0Ev;
+    _ZNSt3__17collateIwED1Ev;
+    _ZNSt3__17collateIwED2Ev;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__17promiseIvE10get_futureEv;
+    _ZNSt3__17promiseIvE13set_exceptionESt13exception_ptr;
+    _ZNSt3__17promiseIvE24set_value_at_thread_exitEv;
+    _ZNSt3__17promiseIvE28set_exception_at_thread_exitESt13exception_ptr;
+    _ZNSt3__17promiseIvE9set_valueEv;
+    _ZNSt3__17promiseIvEC1Ev;
+    _ZNSt3__17promiseIvEC2Ev;
+    _ZNSt3__17promiseIvED1Ev;
+    _ZNSt3__17promiseIvED2Ev;
+    _ZNSt3__17__sort3IRNS_6__lessIaaEEPaEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIccEEPcEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIddEEPdEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIeeEEPeEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIffEEPfEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIhhEEPhEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIiiEEPiEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIjjEEPjEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIllEEPlEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessImmEEPmEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIssEEPsEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIttEEPtEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIwwEEPwEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIxxEEPxEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort3IRNS_6__lessIyyEEPyEEjT0_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort4IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__17__sort5IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_S5_T_;
+    _ZNSt3__18__c_node5__addEPNS_8__i_nodeE;
+    _ZNSt3__18__c_nodeD0Ev;
+    _ZNSt3__18__c_nodeD1Ev;
+    _ZNSt3__18__c_nodeD2Ev;
+    _ZNSt3__18__get_dbEv;
+    _ZNSt3__18__i_nodeD1Ev;
+    _ZNSt3__18__i_nodeD2Ev;
+    _ZNSt3__18ios_base10floatfieldE;
+    _ZNSt3__18ios_base10scientificE;
+    _ZNSt3__18ios_base11adjustfieldE;
+    _ZNSt3__18ios_base15sync_with_stdioEb;
+    _ZNSt3__18ios_base16__call_callbacksENS0_5eventE;
+    _ZNSt3__18ios_base17register_callbackEPFvNS0_5eventERS0_iEi;
+    _ZNSt3__18ios_base2inE;
+    _ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv;
+    _ZNSt3__18ios_base34__set_failbit_and_consider_rethrowEv;
+    _ZNSt3__18ios_base3appE;
+    _ZNSt3__18ios_base3ateE;
+    _ZNSt3__18ios_base3decE;
+    _ZNSt3__18ios_base3hexE;
+    _ZNSt3__18ios_base3octE;
+    _ZNSt3__18ios_base3outE;
+    _ZNSt3__18ios_base4InitC1Ev;
+    _ZNSt3__18ios_base4InitC2Ev;
+    _ZNSt3__18ios_base4InitD1Ev;
+    _ZNSt3__18ios_base4InitD2Ev;
+    _ZNSt3__18ios_base4initEPv;
+    _ZNSt3__18ios_base4leftE;
+    _ZNSt3__18ios_base4moveERS0_;
+    _ZNSt3__18ios_base4swapERS0_;
+    _ZNSt3__18ios_base5clearEj;
+    _ZNSt3__18ios_base5fixedE;
+    _ZNSt3__18ios_base5imbueERKNS_6localeE;
+    _ZNSt3__18ios_base5iwordEi;
+    _ZNSt3__18ios_base5pwordEi;
+    _ZNSt3__18ios_base5rightE;
+    _ZNSt3__18ios_base5truncE;
+    _ZNSt3__18ios_base6badbitE;
+    _ZNSt3__18ios_base6binaryE;
+    _ZNSt3__18ios_base6eofbitE;
+    _ZNSt3__18ios_base6skipwsE;
+    _ZNSt3__18ios_base6xallocEv;
+    _ZNSt3__18ios_base7copyfmtERKS0_;
+    _ZNSt3__18ios_base7failbitE;
+    _ZNSt3__18ios_base7failureC1EPKcRKNS_10error_codeE;
+    _ZNSt3__18ios_base7failureC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE;
+    _ZNSt3__18ios_base7failureC2EPKcRKNS_10error_codeE;
+    _ZNSt3__18ios_base7failureC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_10error_codeE;
+    _ZNSt3__18ios_base7failureD0Ev;
+    _ZNSt3__18ios_base7failureD1Ev;
+    _ZNSt3__18ios_base7failureD2Ev;
+    _ZNSt3__18ios_base7goodbitE;
+    _ZNSt3__18ios_base7showposE;
+    _ZNSt3__18ios_base7unitbufE;
+    _ZNSt3__18ios_base8internalE;
+    _ZNSt3__18ios_base8showbaseE;
+    _ZNSt3__18ios_base9basefieldE;
+    _ZNSt3__18ios_base9boolalphaE;
+    _ZNSt3__18ios_base9showpointE;
+    _ZNSt3__18ios_base9uppercaseE;
+    _ZNSt3__18ios_base9__xindex_E;
+    _ZNSt3__18ios_baseD0Ev;
+    _ZNSt3__18ios_baseD1Ev;
+    _ZNSt3__18ios_baseD2Ev;
+    _ZNSt3__18messagesIcE2idE;
+    _ZNSt3__18messagesIwE2idE;
+    _ZNSt3__18numpunctIcE2idE;
+    _ZNSt3__18numpunctIcEC1Ej;
+    _ZNSt3__18numpunctIcEC2Ej;
+    _ZNSt3__18numpunctIcED0Ev;
+    _ZNSt3__18numpunctIcED1Ev;
+    _ZNSt3__18numpunctIcED2Ev;
+    _ZNSt3__18numpunctIwE2idE;
+    _ZNSt3__18numpunctIwEC1Ej;
+    _ZNSt3__18numpunctIwEC2Ej;
+    _ZNSt3__18numpunctIwED0Ev;
+    _ZNSt3__18numpunctIwED1Ev;
+    _ZNSt3__18numpunctIwED2Ev;
+    _ZNSt3__18__rs_getEv;
+    _ZNSt3__18__sp_mut4lockEv;
+    _ZNSt3__18__sp_mut6unlockEv;
+    _ZNSt3__18__sp_mutC2EPv;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__18valarrayIjE6resizeEjj;
+    _ZNSt3__18valarrayIjEC1Ej;
+    _ZNSt3__18valarrayIjEC2Ej;
+    _ZNSt3__18valarrayIjED1Ev;
+    _ZNSt3__18valarrayIjED2Ev;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE7copyfmtERKS3_;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEED0Ev;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEED1Ev;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE7copyfmtERKS3_;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEED0Ev;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEED1Ev;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIcEERNS_10unique_ptrIcPFvPvEEERPcSM_;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__do_getERS4_S4_bRKNS_6localeEjRjRbRKNS_5ctypeIwEERNS_10unique_ptrIwPFvPvEEERPwSM_;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE;
+    _ZNSt3__19__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_S2_;
+    _ZNSt3__19__num_getIcE17__stage2_int_prepERNS_8ios_baseEPcRc;
+    _ZNSt3__19__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_;
+    _ZNSt3__19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_;
+    _ZNSt3__19__num_getIwE17__stage2_int_loopEwiPcRS2_RjwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_Pw;
+    _ZNSt3__19__num_getIwE17__stage2_int_prepERNS_8ios_baseEPwRw;
+    _ZNSt3__19__num_getIwE19__stage2_float_loopEwRbRcPcRS4_wwRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjPw;
+    _ZNSt3__19__num_getIwE19__stage2_float_prepERNS_8ios_baseEPwRwS5_;
+    _ZNSt3__19__num_putIcE21__widen_and_group_intEPcS2_S2_S2_RS2_S3_RKNS_6localeE;
+    _ZNSt3__19__num_putIcE23__widen_and_group_floatEPcS2_S2_S2_RS2_S3_RKNS_6localeE;
+    _ZNSt3__19__num_putIwE21__widen_and_group_intEPcS2_S2_PwRS3_S4_RKNS_6localeE;
+    _ZNSt3__19__num_putIwE23__widen_and_group_floatEPcS2_S2_PwRS3_S4_RKNS_6localeE;
+    _ZNSt3__19strstreamD0Ev;
+    _ZNSt3__19strstreamD1Ev;
+    _ZNSt3__19strstreamD2Ev;
+    _ZNSt3__19to_stringEd;
+    _ZNSt3__19to_stringEe;
+    _ZNSt3__19to_stringEf;
+    _ZNSt3__19to_stringEg;
+    _ZNSt3__19to_stringEi;
+    _ZNSt3__19to_stringEj;
+    _ZNSt3__19to_stringEl;
+    _ZNSt3__19to_stringEm;
+    _ZNSt3__19to_stringEx;
+    _ZNSt3__19to_stringEy;
+    _ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_;
+    _ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_;
+    _ZSt17current_exceptionv;
+    _ZSt17rethrow_exceptionSt13exception_ptr;
+    _ZSt17__throw_bad_allocv;
+    _ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_;
+    _ZSt18uncaught_exceptionv;
+    _ZSt7nothrow;
+    _ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE;
+    _ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE8_NS_13basic_ostreamIcS2_EE;
+    _ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE;
+    _ZTCNSt3__19strstreamE8_NS_13basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZThn8_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZThn8_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZThn8_NSt3__19strstreamD0Ev;
+    _ZThn8_NSt3__19strstreamD1Ev;
+    _ZTINSt12experimental19bad_optional_accessE;
+    _ZTINSt3__110ctype_baseE;
+    _ZTINSt3__110istrstreamE;
+    _ZTINSt3__110money_baseE;
+    _ZTINSt3__110moneypunctIcLb0EEE;
+    _ZTINSt3__110moneypunctIcLb1EEE;
+    _ZTINSt3__110moneypunctIwLb0EEE;
+    _ZTINSt3__110moneypunctIwLb1EEE;
+    _ZTINSt3__110ostrstreamE;
+    _ZTINSt3__110__time_getE;
+    _ZTINSt3__110__time_putE;
+    _ZTINSt3__111__money_getIcEE;
+    _ZTINSt3__111__money_getIwEE;
+    _ZTINSt3__111__money_putIcEE;
+    _ZTINSt3__111__money_putIwEE;
+    _ZTINSt3__111regex_errorE;
+    _ZTINSt3__112bad_weak_ptrE;
+    _ZTINSt3__112codecvt_baseE;
+    _ZTINSt3__112ctype_bynameIcEE;
+    _ZTINSt3__112ctype_bynameIwEE;
+    _ZTINSt3__112future_errorE;
+    _ZTINSt3__112strstreambufE;
+    _ZTINSt3__112system_errorE;
+    _ZTINSt3__113basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTINSt3__113basic_istreamIwNS_11char_traitsIwEEEE;
+    _ZTINSt3__113basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZTINSt3__113basic_ostreamIwNS_11char_traitsIwEEEE;
+    _ZTINSt3__113messages_baseE;
+    _ZTINSt3__114basic_iostreamIcNS_11char_traitsIcEEEE;
+    _ZTINSt3__114codecvt_bynameIcc9mbstate_tEE;
+    _ZTINSt3__114codecvt_bynameIDic9mbstate_tEE;
+    _ZTINSt3__114codecvt_bynameIDsc9mbstate_tEE;
+    _ZTINSt3__114codecvt_bynameIwc9mbstate_tEE;
+    _ZTINSt3__114__codecvt_utf8IDiEE;
+    _ZTINSt3__114__codecvt_utf8IDsEE;
+    _ZTINSt3__114__codecvt_utf8IwEE;
+    _ZTINSt3__114collate_bynameIcEE;
+    _ZTINSt3__114collate_bynameIwEE;
+    _ZTINSt3__114error_categoryE;
+    _ZTINSt3__114__num_get_baseE;
+    _ZTINSt3__114__num_put_baseE;
+    _ZTINSt3__114__shared_countE;
+    _ZTINSt3__115basic_streambufIcNS_11char_traitsIcEEEE;
+    _ZTINSt3__115basic_streambufIwNS_11char_traitsIwEEEE;
+    _ZTINSt3__115__codecvt_utf16IDiLb0EEE;
+    _ZTINSt3__115__codecvt_utf16IDiLb1EEE;
+    _ZTINSt3__115__codecvt_utf16IDsLb0EEE;
+    _ZTINSt3__115__codecvt_utf16IDsLb1EEE;
+    _ZTINSt3__115__codecvt_utf16IwLb0EEE;
+    _ZTINSt3__115__codecvt_utf16IwLb1EEE;
+    _ZTINSt3__115messages_bynameIcEE;
+    _ZTINSt3__115messages_bynameIwEE;
+    _ZTINSt3__115numpunct_bynameIcEE;
+    _ZTINSt3__115numpunct_bynameIwEE;
+    _ZTINSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__116__narrow_to_utf8ILj16EEE;
+    _ZTINSt3__116__narrow_to_utf8ILj32EEE;
+    _ZTINSt3__117__assoc_sub_stateE;
+    _ZTINSt3__117moneypunct_bynameIcLb0EEE;
+    _ZTINSt3__117moneypunct_bynameIcLb1EEE;
+    _ZTINSt3__117moneypunct_bynameIwLb0EEE;
+    _ZTINSt3__117moneypunct_bynameIwLb1EEE;
+    _ZTINSt3__117__widen_from_utf8ILj16EEE;
+    _ZTINSt3__117__widen_from_utf8ILj32EEE;
+    _ZTINSt3__118__time_get_storageIcEE;
+    _ZTINSt3__118__time_get_storageIwEE;
+    _ZTINSt3__119__shared_weak_countE;
+    _ZTINSt3__120__codecvt_utf8_utf16IDiEE;
+    _ZTINSt3__120__codecvt_utf8_utf16IDsEE;
+    _ZTINSt3__120__codecvt_utf8_utf16IwEE;
+    _ZTINSt3__120__time_get_c_storageIcEE;
+    _ZTINSt3__120__time_get_c_storageIwEE;
+    _ZTINSt3__15ctypeIcEE;
+    _ZTINSt3__15ctypeIwEE;
+    _ZTINSt3__16locale5facetE;
+    _ZTINSt3__17codecvtIcc9mbstate_tEE;
+    _ZTINSt3__17codecvtIDic9mbstate_tEE;
+    _ZTINSt3__17codecvtIDsc9mbstate_tEE;
+    _ZTINSt3__17codecvtIwc9mbstate_tEE;
+    _ZTINSt3__17collateIcEE;
+    _ZTINSt3__17collateIwEE;
+    _ZTINSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__18__c_nodeE;
+    _ZTINSt3__18ios_base7failureE;
+    _ZTINSt3__18ios_baseE;
+    _ZTINSt3__18messagesIcEE;
+    _ZTINSt3__18messagesIwEE;
+    _ZTINSt3__18numpunctIcEE;
+    _ZTINSt3__18numpunctIwEE;
+    _ZTINSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__19basic_iosIcNS_11char_traitsIcEEEE;
+    _ZTINSt3__19basic_iosIwNS_11char_traitsIwEEEE;
+    _ZTINSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTINSt3__19__num_getIcEE;
+    _ZTINSt3__19__num_getIwEE;
+    _ZTINSt3__19__num_putIcEE;
+    _ZTINSt3__19__num_putIwEE;
+    _ZTINSt3__19strstreamE;
+    _ZTINSt3__19time_baseE;
+    _ZTISt16nested_exception;
+    _ZTSNSt12experimental19bad_optional_accessE;
+    _ZTSNSt3__110ctype_baseE;
+    _ZTSNSt3__110istrstreamE;
+    _ZTSNSt3__110money_baseE;
+    _ZTSNSt3__110moneypunctIcLb0EEE;
+    _ZTSNSt3__110moneypunctIcLb1EEE;
+    _ZTSNSt3__110moneypunctIwLb0EEE;
+    _ZTSNSt3__110moneypunctIwLb1EEE;
+    _ZTSNSt3__110ostrstreamE;
+    _ZTSNSt3__110__time_getE;
+    _ZTSNSt3__110__time_putE;
+    _ZTSNSt3__111__money_getIcEE;
+    _ZTSNSt3__111__money_getIwEE;
+    _ZTSNSt3__111__money_putIcEE;
+    _ZTSNSt3__111__money_putIwEE;
+    _ZTSNSt3__111regex_errorE;
+    _ZTSNSt3__112bad_weak_ptrE;
+    _ZTSNSt3__112codecvt_baseE;
+    _ZTSNSt3__112ctype_bynameIcEE;
+    _ZTSNSt3__112ctype_bynameIwEE;
+    _ZTSNSt3__112future_errorE;
+    _ZTSNSt3__112strstreambufE;
+    _ZTSNSt3__112system_errorE;
+    _ZTSNSt3__113basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTSNSt3__113basic_istreamIwNS_11char_traitsIwEEEE;
+    _ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZTSNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE;
+    _ZTSNSt3__113messages_baseE;
+    _ZTSNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE;
+    _ZTSNSt3__114codecvt_bynameIcc9mbstate_tEE;
+    _ZTSNSt3__114codecvt_bynameIDic9mbstate_tEE;
+    _ZTSNSt3__114codecvt_bynameIDsc9mbstate_tEE;
+    _ZTSNSt3__114codecvt_bynameIwc9mbstate_tEE;
+    _ZTSNSt3__114__codecvt_utf8IDiEE;
+    _ZTSNSt3__114__codecvt_utf8IDsEE;
+    _ZTSNSt3__114__codecvt_utf8IwEE;
+    _ZTSNSt3__114collate_bynameIcEE;
+    _ZTSNSt3__114collate_bynameIwEE;
+    _ZTSNSt3__114error_categoryE;
+    _ZTSNSt3__114__num_get_baseE;
+    _ZTSNSt3__114__num_put_baseE;
+    _ZTSNSt3__114__shared_countE;
+    _ZTSNSt3__115basic_streambufIcNS_11char_traitsIcEEEE;
+    _ZTSNSt3__115basic_streambufIwNS_11char_traitsIwEEEE;
+    _ZTSNSt3__115__codecvt_utf16IDiLb0EEE;
+    _ZTSNSt3__115__codecvt_utf16IDiLb1EEE;
+    _ZTSNSt3__115__codecvt_utf16IDsLb0EEE;
+    _ZTSNSt3__115__codecvt_utf16IDsLb1EEE;
+    _ZTSNSt3__115__codecvt_utf16IwLb0EEE;
+    _ZTSNSt3__115__codecvt_utf16IwLb1EEE;
+    _ZTSNSt3__115messages_bynameIcEE;
+    _ZTSNSt3__115messages_bynameIwEE;
+    _ZTSNSt3__115numpunct_bynameIcEE;
+    _ZTSNSt3__115numpunct_bynameIwEE;
+    _ZTSNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__116__narrow_to_utf8ILj16EEE;
+    _ZTSNSt3__116__narrow_to_utf8ILj32EEE;
+    _ZTSNSt3__117__assoc_sub_stateE;
+    _ZTSNSt3__117moneypunct_bynameIcLb0EEE;
+    _ZTSNSt3__117moneypunct_bynameIcLb1EEE;
+    _ZTSNSt3__117moneypunct_bynameIwLb0EEE;
+    _ZTSNSt3__117moneypunct_bynameIwLb1EEE;
+    _ZTSNSt3__117__widen_from_utf8ILj16EEE;
+    _ZTSNSt3__117__widen_from_utf8ILj32EEE;
+    _ZTSNSt3__118__time_get_storageIcEE;
+    _ZTSNSt3__118__time_get_storageIwEE;
+    _ZTSNSt3__119__shared_weak_countE;
+    _ZTSNSt3__120__codecvt_utf8_utf16IDiEE;
+    _ZTSNSt3__120__codecvt_utf8_utf16IDsEE;
+    _ZTSNSt3__120__codecvt_utf8_utf16IwEE;
+    _ZTSNSt3__120__time_get_c_storageIcEE;
+    _ZTSNSt3__120__time_get_c_storageIwEE;
+    _ZTSNSt3__15ctypeIcEE;
+    _ZTSNSt3__15ctypeIwEE;
+    _ZTSNSt3__16locale5facetE;
+    _ZTSNSt3__17codecvtIcc9mbstate_tEE;
+    _ZTSNSt3__17codecvtIDic9mbstate_tEE;
+    _ZTSNSt3__17codecvtIDsc9mbstate_tEE;
+    _ZTSNSt3__17codecvtIwc9mbstate_tEE;
+    _ZTSNSt3__17collateIcEE;
+    _ZTSNSt3__17collateIwEE;
+    _ZTSNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__18__c_nodeE;
+    _ZTSNSt3__18ios_base7failureE;
+    _ZTSNSt3__18ios_baseE;
+    _ZTSNSt3__18messagesIcEE;
+    _ZTSNSt3__18messagesIwEE;
+    _ZTSNSt3__18numpunctIcEE;
+    _ZTSNSt3__18numpunctIwEE;
+    _ZTSNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__19basic_iosIcNS_11char_traitsIcEEEE;
+    _ZTSNSt3__19basic_iosIwNS_11char_traitsIwEEEE;
+    _ZTSNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTSNSt3__19__num_getIcEE;
+    _ZTSNSt3__19__num_getIwEE;
+    _ZTSNSt3__19__num_putIcEE;
+    _ZTSNSt3__19__num_putIwEE;
+    _ZTSNSt3__19strstreamE;
+    _ZTSNSt3__19time_baseE;
+    _ZTSSt16nested_exception;
+    _ZTTNSt3__110istrstreamE;
+    _ZTTNSt3__110ostrstreamE;
+    _ZTTNSt3__113basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTTNSt3__113basic_istreamIwNS_11char_traitsIwEEEE;
+    _ZTTNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZTTNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE;
+    _ZTTNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE;
+    _ZTTNSt3__19strstreamE;
+    _ZTv0_n12_NSt3__110istrstreamD0Ev;
+    _ZTv0_n12_NSt3__110istrstreamD1Ev;
+    _ZTv0_n12_NSt3__110ostrstreamD0Ev;
+    _ZTv0_n12_NSt3__110ostrstreamD1Ev;
+    _ZTv0_n12_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n12_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n12_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev;
+    _ZTv0_n12_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev;
+    _ZTv0_n12_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n12_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n12_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev;
+    _ZTv0_n12_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev;
+    _ZTv0_n12_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n12_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n12_NSt3__19strstreamD0Ev;
+    _ZTv0_n12_NSt3__19strstreamD1Ev;
+    _ZTVNSt12experimental19bad_optional_accessE;
+    _ZTVNSt3__110istrstreamE;
+    _ZTVNSt3__110moneypunctIcLb0EEE;
+    _ZTVNSt3__110moneypunctIcLb1EEE;
+    _ZTVNSt3__110moneypunctIwLb0EEE;
+    _ZTVNSt3__110moneypunctIwLb1EEE;
+    _ZTVNSt3__110ostrstreamE;
+    _ZTVNSt3__111regex_errorE;
+    _ZTVNSt3__112bad_weak_ptrE;
+    _ZTVNSt3__112ctype_bynameIcEE;
+    _ZTVNSt3__112ctype_bynameIwEE;
+    _ZTVNSt3__112future_errorE;
+    _ZTVNSt3__112strstreambufE;
+    _ZTVNSt3__112system_errorE;
+    _ZTVNSt3__113basic_istreamIcNS_11char_traitsIcEEEE;
+    _ZTVNSt3__113basic_istreamIwNS_11char_traitsIwEEEE;
+    _ZTVNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZTVNSt3__113basic_ostreamIwNS_11char_traitsIwEEEE;
+    _ZTVNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE;
+    _ZTVNSt3__114codecvt_bynameIcc9mbstate_tEE;
+    _ZTVNSt3__114codecvt_bynameIDic9mbstate_tEE;
+    _ZTVNSt3__114codecvt_bynameIDsc9mbstate_tEE;
+    _ZTVNSt3__114codecvt_bynameIwc9mbstate_tEE;
+    _ZTVNSt3__114__codecvt_utf8IDiEE;
+    _ZTVNSt3__114__codecvt_utf8IDsEE;
+    _ZTVNSt3__114__codecvt_utf8IwEE;
+    _ZTVNSt3__114collate_bynameIcEE;
+    _ZTVNSt3__114collate_bynameIwEE;
+    _ZTVNSt3__114error_categoryE;
+    _ZTVNSt3__114__shared_countE;
+    _ZTVNSt3__115basic_streambufIcNS_11char_traitsIcEEEE;
+    _ZTVNSt3__115basic_streambufIwNS_11char_traitsIwEEEE;
+    _ZTVNSt3__115__codecvt_utf16IDiLb0EEE;
+    _ZTVNSt3__115__codecvt_utf16IDiLb1EEE;
+    _ZTVNSt3__115__codecvt_utf16IDsLb0EEE;
+    _ZTVNSt3__115__codecvt_utf16IDsLb1EEE;
+    _ZTVNSt3__115__codecvt_utf16IwLb0EEE;
+    _ZTVNSt3__115__codecvt_utf16IwLb1EEE;
+    _ZTVNSt3__115messages_bynameIcEE;
+    _ZTVNSt3__115messages_bynameIwEE;
+    _ZTVNSt3__115numpunct_bynameIcEE;
+    _ZTVNSt3__115numpunct_bynameIwEE;
+    _ZTVNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__116__narrow_to_utf8ILj16EEE;
+    _ZTVNSt3__116__narrow_to_utf8ILj32EEE;
+    _ZTVNSt3__117__assoc_sub_stateE;
+    _ZTVNSt3__117moneypunct_bynameIcLb0EEE;
+    _ZTVNSt3__117moneypunct_bynameIcLb1EEE;
+    _ZTVNSt3__117moneypunct_bynameIwLb0EEE;
+    _ZTVNSt3__117moneypunct_bynameIwLb1EEE;
+    _ZTVNSt3__117__widen_from_utf8ILj16EEE;
+    _ZTVNSt3__117__widen_from_utf8ILj32EEE;
+    _ZTVNSt3__119__shared_weak_countE;
+    _ZTVNSt3__120__codecvt_utf8_utf16IDiEE;
+    _ZTVNSt3__120__codecvt_utf8_utf16IDsEE;
+    _ZTVNSt3__120__codecvt_utf8_utf16IwEE;
+    _ZTVNSt3__120__time_get_c_storageIcEE;
+    _ZTVNSt3__120__time_get_c_storageIwEE;
+    _ZTVNSt3__15ctypeIcEE;
+    _ZTVNSt3__15ctypeIwEE;
+    _ZTVNSt3__16locale5facetE;
+    _ZTVNSt3__17codecvtIcc9mbstate_tEE;
+    _ZTVNSt3__17codecvtIDic9mbstate_tEE;
+    _ZTVNSt3__17codecvtIDsc9mbstate_tEE;
+    _ZTVNSt3__17codecvtIwc9mbstate_tEE;
+    _ZTVNSt3__17collateIcEE;
+    _ZTVNSt3__17collateIwEE;
+    _ZTVNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__18__c_nodeE;
+    _ZTVNSt3__18ios_base7failureE;
+    _ZTVNSt3__18ios_baseE;
+    _ZTVNSt3__18messagesIcEE;
+    _ZTVNSt3__18messagesIwEE;
+    _ZTVNSt3__18numpunctIcEE;
+    _ZTVNSt3__18numpunctIwEE;
+    _ZTVNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__19basic_iosIcNS_11char_traitsIcEEEE;
+    _ZTVNSt3__19basic_iosIwNS_11char_traitsIwEEEE;
+    _ZTVNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE;
+    _ZTVNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE;
+    _ZTVNSt3__19strstreamE;
+    _ZTVSt16nested_exception;
+    _ZZNKSt3__120__time_get_c_storageIcE3__cEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIcE3__rEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIcE3__xEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIcE3__XEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIcE7__am_pmEvE5am_pm;
+    _ZZNKSt3__120__time_get_c_storageIcE7__weeksEvE5weeks;
+    _ZZNKSt3__120__time_get_c_storageIcE8__monthsEvE6months;
+    _ZZNKSt3__120__time_get_c_storageIwE3__cEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIwE3__rEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIwE3__xEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIwE3__XEvE1s;
+    _ZZNKSt3__120__time_get_c_storageIwE7__am_pmEvE5am_pm;
+    _ZZNKSt3__120__time_get_c_storageIwE7__weeksEvE5weeks;
+    _ZZNKSt3__120__time_get_c_storageIwE8__monthsEvE6months;
+    atan2l;
+    coshl;
+    cosl;
+    expl;
+    hypotl;
+    log2;
+    logbl;
+    logl;
+    nan;
+    nexttoward;
+    scalbln;
+    scalblnf;
+    scalblnl;
+    sinhl;
+    sinl;
+    sqrtl;
+    strtold_l;
+    strtoll_l;
+    strtoull_l;
+    uselocale;
+
+    /* ToDo: missing from 32-bit */
+    _ZL10assert_rtnPKcS0_iS0_;
+    _ZL17ctype_android_tab;
+    _ZL25default_terminate_handlerv;
+    _ZL26default_unexpected_handlerv;
+    _ZL5cause;
+    _ZN10__cxxabiv114call_terminateEbP21_Unwind_Control_Block;
+    _ZN10__cxxabiv116__enum_type_infoD0Ev;
+    _ZN10__cxxabiv116__enum_type_infoD1Ev;
+    _ZN10__cxxabiv116__enum_type_infoD2Ev;
+    _ZN10__cxxabiv116__shim_type_infoD0Ev;
+    _ZN10__cxxabiv116__shim_type_infoD1Ev;
+    _ZN10__cxxabiv116__shim_type_infoD2Ev;
+    _ZN10__cxxabiv117__array_type_infoD0Ev;
+    _ZN10__cxxabiv117__array_type_infoD1Ev;
+    _ZN10__cxxabiv117__array_type_infoD2Ev;
+    _ZN10__cxxabiv117__class_type_infoD0Ev;
+    _ZN10__cxxabiv117__class_type_infoD1Ev;
+    _ZN10__cxxabiv117__class_type_infoD2Ev;
+    _ZN10__cxxabiv117__pbase_type_infoD0Ev;
+    _ZN10__cxxabiv117__pbase_type_infoD1Ev;
+    _ZN10__cxxabiv117__pbase_type_infoD2Ev;
+    _ZN10__cxxabiv118readEncodedPointerEPPKhh;
+    _ZN10__cxxabiv119__pointer_type_infoD0Ev;
+    _ZN10__cxxabiv119__pointer_type_infoD1Ev;
+    _ZN10__cxxabiv119__pointer_type_infoD2Ev;
+    _ZN10__cxxabiv120__function_type_infoD0Ev;
+    _ZN10__cxxabiv120__function_type_infoD1Ev;
+    _ZN10__cxxabiv120__function_type_infoD2Ev;
+    _ZN10__cxxabiv120__si_class_type_infoD0Ev;
+    _ZN10__cxxabiv120__si_class_type_infoD1Ev;
+    _ZN10__cxxabiv120__si_class_type_infoD2Ev;
+    _ZN10__cxxabiv121__vmi_class_type_infoD0Ev;
+    _ZN10__cxxabiv121__vmi_class_type_infoD1Ev;
+    _ZN10__cxxabiv121__vmi_class_type_infoD2Ev;
+    _ZN10__cxxabiv123__fundamental_type_infoD0Ev;
+    _ZN10__cxxabiv123__fundamental_type_infoD1Ev;
+    _ZN10__cxxabiv123__fundamental_type_infoD2Ev;
+    _ZN10__cxxabiv127dependent_exception_cleanupE19_Unwind_Reason_CodeP21_Unwind_Control_Block;
+    _ZN10__cxxabiv129__pointer_to_member_type_infoD0Ev;
+    _ZN10__cxxabiv129__pointer_to_member_type_infoD1Ev;
+    _ZN10__cxxabiv129__pointer_to_member_type_infoD2Ev;
+    _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP21_Unwind_Control_Block;
+    _ZN10__cxxabiv1L7do_freeEPv;
+    _ZN10__cxxabiv1L9do_mallocEj;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE10saveVFPAsXEv;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE11getFloatRegEi;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE11setFloatRegEiy;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE13isSignalFrameEv;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE13validFloatRegEi;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE15getFunctionNameEPcjPj;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE15getRegisterNameEi;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE23getInfoFromEHABISectionEjRKNS_18UnwindInfoSectionsE;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE24setInfoBasedOnIPRegisterEb;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE4stepEv;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE6getRegEi;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE6jumptoEv;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE6setRegEij;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE7getInfoEP15unw_proc_info_t;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEE8validRegEi;
+    _ZN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEED0Ev;
+    _ZN9libunwind13Registers_arm12restoreiWMMXEPy;
+    _ZN9libunwind13Registers_arm12restoreVFPv3EPy;
+    _ZN9libunwind13Registers_arm16saveiWMMXControlEPj;
+    _ZN9libunwind13Registers_arm16saveVFPWithFSTMDEPy;
+    _ZN9libunwind13Registers_arm16saveVFPWithFSTMXEPy;
+    _ZN9libunwind13Registers_arm19restoreiWMMXControlEPj;
+    _ZN9libunwind13Registers_arm19restoreVFPWithFLDMDEPy;
+    _ZN9libunwind13Registers_arm19restoreVFPWithFLDMXEPy;
+    _ZN9libunwind13Registers_arm20restoreCoreAndJumpToEv;
+    _ZN9libunwind13Registers_arm26restoreSavedFloatRegistersEv;
+    _ZN9libunwind13Registers_arm9saveiWMMXEPy;
+    _ZN9libunwind13Registers_arm9saveVFPv3EPy;
+    _ZN9libunwind17LocalAddressSpace17sThisAddressSpaceE;
+    _ZN9libunwind20AbstractUnwindCursorD2Ev;
+    _ZNK10__cxxabiv116__enum_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv116__shim_type_info5noop1Ev;
+    _ZNK10__cxxabiv116__shim_type_info5noop2Ev;
+    _ZNK10__cxxabiv117__array_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv117__class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib;
+    _ZNK10__cxxabiv117__class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib;
+    _ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi;
+    _ZNK10__cxxabiv117__class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi;
+    _ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i;
+    _ZNK10__cxxabiv117__class_type_info29process_static_type_below_dstEPNS_19__dynamic_cast_infoEPKvi;
+    _ZNK10__cxxabiv117__class_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv117__pbase_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv119__pointer_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv120__function_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNK10__cxxabiv120__si_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib;
+    _ZNK10__cxxabiv120__si_class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib;
+    _ZNK10__cxxabiv120__si_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi;
+    _ZNK10__cxxabiv121__vmi_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib;
+    _ZNK10__cxxabiv121__vmi_class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib;
+    _ZNK10__cxxabiv121__vmi_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi;
+    _ZNK10__cxxabiv122__base_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib;
+    _ZNK10__cxxabiv122__base_class_type_info16search_below_dstEPNS_19__dynamic_cast_infoEPKvib;
+    _ZNK10__cxxabiv122__base_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi;
+    _ZNK10__cxxabiv123__fundamental_type_info9can_catchEPKNS_16__shim_type_infoERPv;
+    _ZNKSt3__110moneypunctIcLb0EE10neg_formatEv;
+    _ZNKSt3__110moneypunctIcLb0EE10pos_formatEv;
+    _ZNKSt3__110moneypunctIcLb0EE11curr_symbolEv;
+    _ZNKSt3__110moneypunctIcLb0EE11frac_digitsEv;
+    _ZNKSt3__110moneypunctIcLb0EE13decimal_pointEv;
+    _ZNKSt3__110moneypunctIcLb0EE13negative_signEv;
+    _ZNKSt3__110moneypunctIcLb0EE13positive_signEv;
+    _ZNKSt3__110moneypunctIcLb0EE13thousands_sepEv;
+    _ZNKSt3__110moneypunctIcLb0EE8groupingEv;
+    _ZNKSt3__110moneypunctIcLb1EE10neg_formatEv;
+    _ZNKSt3__110moneypunctIcLb1EE10pos_formatEv;
+    _ZNKSt3__110moneypunctIcLb1EE11curr_symbolEv;
+    _ZNKSt3__110moneypunctIcLb1EE11frac_digitsEv;
+    _ZNKSt3__110moneypunctIcLb1EE13decimal_pointEv;
+    _ZNKSt3__110moneypunctIcLb1EE13negative_signEv;
+    _ZNKSt3__110moneypunctIcLb1EE13positive_signEv;
+    _ZNKSt3__110moneypunctIcLb1EE13thousands_sepEv;
+    _ZNKSt3__110moneypunctIcLb1EE8groupingEv;
+    _ZNKSt3__110moneypunctIwLb0EE10neg_formatEv;
+    _ZNKSt3__110moneypunctIwLb0EE10pos_formatEv;
+    _ZNKSt3__110moneypunctIwLb0EE11curr_symbolEv;
+    _ZNKSt3__110moneypunctIwLb0EE11frac_digitsEv;
+    _ZNKSt3__110moneypunctIwLb0EE13decimal_pointEv;
+    _ZNKSt3__110moneypunctIwLb0EE13negative_signEv;
+    _ZNKSt3__110moneypunctIwLb0EE13positive_signEv;
+    _ZNKSt3__110moneypunctIwLb0EE13thousands_sepEv;
+    _ZNKSt3__110moneypunctIwLb0EE8groupingEv;
+    _ZNKSt3__110moneypunctIwLb1EE10neg_formatEv;
+    _ZNKSt3__110moneypunctIwLb1EE10pos_formatEv;
+    _ZNKSt3__110moneypunctIwLb1EE11curr_symbolEv;
+    _ZNKSt3__110moneypunctIwLb1EE11frac_digitsEv;
+    _ZNKSt3__110moneypunctIwLb1EE13decimal_pointEv;
+    _ZNKSt3__110moneypunctIwLb1EE13negative_signEv;
+    _ZNKSt3__110moneypunctIwLb1EE13positive_signEv;
+    _ZNKSt3__110moneypunctIwLb1EE13thousands_sepEv;
+    _ZNKSt3__110moneypunctIwLb1EE8groupingEv;
+    _ZNKSt3__111__libcpp_db15__find_iteratorEPKv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12__invariantsEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13get_allocatorEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__get_pointerEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE14__get_long_capEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE15__get_long_sizeEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__get_short_sizeEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE18__get_long_pointerEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__get_short_pointerEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE3endEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4backEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4cendEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4rendEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4sizeEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5beginEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5crendEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5emptyEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5frontEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindERKS5_j;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6cbeginEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6lengthEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6rbeginEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6substrEjj;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7__allocEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEjjRKS5_;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareERKS5_;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7crbeginEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE8capacityEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE8max_sizeEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__is_longEv;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEixEj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12__invariantsEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13get_allocatorEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13__get_pointerEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE14__get_long_capEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE15__get_long_sizeEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16__get_short_sizeEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE18__get_long_pointerEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__get_short_pointerEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE3endEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4backEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4cendEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4dataEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4rendEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4sizeEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5beginEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5crendEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5c_strEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5emptyEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5frontEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindERKS5_j;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6cbeginEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6lengthEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6rbeginEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6substrEjj;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7__allocEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEjjRKS5_;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareERKS5_;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7crbeginEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE8capacityEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE8max_sizeEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__is_longEv;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEixEj;
+    _ZNKSt3__112__do_message7messageEi;
+    _ZNKSt3__113basic_istreamIcNS_11char_traitsIcEEE6gcountEv;
+    _ZNKSt3__113basic_istreamIcNS_11char_traitsIcEEE6sentrycvbEv;
+    _ZNKSt3__113basic_istreamIwNS_11char_traitsIwEEE6gcountEv;
+    _ZNKSt3__113basic_istreamIwNS_11char_traitsIwEEE6sentrycvbEv;
+    _ZNKSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentrycvbEv;
+    _ZNKSt3__113basic_ostreamIwNS_11char_traitsIwEEE6sentrycvbEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE4gptrEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE4pptrEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE5ebackEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE5egptrEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE5epptrEv;
+    _ZNKSt3__115basic_streambufIcNS_11char_traitsIcEEE5pbaseEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE4gptrEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE4pptrEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE5ebackEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE5egptrEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE5epptrEv;
+    _ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE5pbaseEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13do_date_orderEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__cEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__rEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__xEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__XEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__am_pmEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__weeksEv;
+    _ZNKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__monthsEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13do_date_orderEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__cEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__rEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__xEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__XEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__am_pmEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__weeksEv;
+    _ZNKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__monthsEv;
+    _ZNKSt3__119__iostream_category4nameEv;
+    _ZNKSt3__119__iostream_category7messageEi;
+    _ZNKSt3__123__future_error_category4nameEv;
+    _ZNKSt3__123__future_error_category7messageEi;
+    _ZNKSt3__123__system_error_category23default_error_conditionEi;
+    _ZNKSt3__123__system_error_category4nameEv;
+    _ZNKSt3__123__system_error_category7messageEi;
+    _ZNKSt3__124__generic_error_category4nameEv;
+    _ZNKSt3__124__generic_error_category7messageEi;
+    _ZNKSt3__16locale5__imp9use_facetEl;
+    _ZNKSt3__17collateIcE4hashEPKcS3_;
+    _ZNKSt3__17collateIcE7compareEPKcS3_S3_S3_;
+    _ZNKSt3__17collateIcE9transformEPKcS3_;
+    _ZNKSt3__17collateIwE4hashEPKwS3_;
+    _ZNKSt3__17collateIwE7compareEPKwS3_S3_S3_;
+    _ZNKSt3__17collateIwE9transformEPKwS3_;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRb;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRd;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRe;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRf;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRl;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRm;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRPv;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRt;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRx;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjRy;
+    _ZNKSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjS8_;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRb;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRd;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRe;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRf;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRl;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRm;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRPv;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRt;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRx;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjRy;
+    _ZNKSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjS8_;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcb;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcd;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEce;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcl;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcm;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPKv;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcx;
+    _ZNKSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcy;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwb;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwd;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwe;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwl;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwm;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPKv;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwx;
+    _ZNKSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwy;
+    _ZNKSt3__18messagesIcE3getEiiiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNKSt3__18messagesIcE4openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE;
+    _ZNKSt3__18messagesIcE5closeEi;
+    _ZNKSt3__18messagesIwE3getEiiiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE;
+    _ZNKSt3__18messagesIwE4openERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6localeE;
+    _ZNKSt3__18messagesIwE5closeEi;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE10date_orderEv;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11get_weekdayES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE13get_monthnameES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_RNS_8ios_baseERjP2tmcc;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8get_dateES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8get_timeES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8get_yearES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE10date_orderEv;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11get_weekdayES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE13get_monthnameES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_RNS_8ios_baseERjP2tmcc;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8get_dateES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8get_timeES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8get_yearES4_S4_RNS_8ios_baseERjP2tm;
+    _ZNKSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_RNS_8ios_baseEcPK2tmcc;
+    _ZNKSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_RNS_8ios_baseEwPK2tmcc;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE10exceptionsEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE3badEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE3eofEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE3tieEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE4failEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE4fillEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE4goodEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE5rdbufEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE5widenEc;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE6narrowEcc;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEE7rdstateEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEEcvbEv;
+    _ZNKSt3__19basic_iosIcNS_11char_traitsIcEEEntEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE10exceptionsEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE3badEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE3eofEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE3tieEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE4failEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE4fillEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE4goodEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE5rdbufEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE5widenEc;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE6narrowEwc;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEE7rdstateEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEEcvbEv;
+    _ZNKSt3__19basic_iosIwNS_11char_traitsIwEEEntEv;
+    _ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_bRNS_8ios_baseERjRe;
+    _ZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIcS3_NS_9allocatorIcEEEE;
+    _ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_bRNS_8ios_baseERjRe;
+    _ZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3getES4_S4_bRNS_8ios_baseERjRNS_12basic_stringIwS3_NS_9allocatorIwEEEE;
+    _ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_bRNS_8ios_baseEce;
+    _ZNKSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE3putES4_bRNS_8ios_baseEcRKNS_12basic_stringIcS3_NS_9allocatorIcEEEE;
+    _ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_bRNS_8ios_baseEwe;
+    _ZNKSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE3putES4_bRNS_8ios_baseEwRKNS_12basic_stringIwS3_NS_9allocatorIwEEEE;
+    _ZNSt3__110moneypunctIcLb0EEC1Ej;
+    _ZNSt3__110moneypunctIcLb0EEC2Ej;
+    _ZNSt3__110moneypunctIcLb0EED0Ev;
+    _ZNSt3__110moneypunctIcLb0EED1Ev;
+    _ZNSt3__110moneypunctIcLb0EED2Ev;
+    _ZNSt3__110moneypunctIcLb1EEC1Ej;
+    _ZNSt3__110moneypunctIcLb1EEC2Ej;
+    _ZNSt3__110moneypunctIcLb1EED0Ev;
+    _ZNSt3__110moneypunctIcLb1EED1Ev;
+    _ZNSt3__110moneypunctIcLb1EED2Ev;
+    _ZNSt3__110moneypunctIwLb0EEC1Ej;
+    _ZNSt3__110moneypunctIwLb0EEC2Ej;
+    _ZNSt3__110moneypunctIwLb0EED0Ev;
+    _ZNSt3__110moneypunctIwLb0EED1Ev;
+    _ZNSt3__110moneypunctIwLb0EED2Ev;
+    _ZNSt3__110moneypunctIwLb1EEC1Ej;
+    _ZNSt3__110moneypunctIwLb1EEC2Ej;
+    _ZNSt3__110moneypunctIwLb1EED0Ev;
+    _ZNSt3__110moneypunctIwLb1EED1Ev;
+    _ZNSt3__110moneypunctIwLb1EED2Ev;
+    _ZNSt3__110__stdinbufIcE5imbueERKNS_6localeE;
+    _ZNSt3__110__stdinbufIcE5uflowEv;
+    _ZNSt3__110__stdinbufIcE9__getcharEb;
+    _ZNSt3__110__stdinbufIcE9pbackfailEi;
+    _ZNSt3__110__stdinbufIcE9underflowEv;
+    _ZNSt3__110__stdinbufIcEC2EP7__sFILEP9mbstate_t;
+    _ZNSt3__110__stdinbufIcED0Ev;
+    _ZNSt3__110__stdinbufIwE5imbueERKNS_6localeE;
+    _ZNSt3__110__stdinbufIwE5uflowEv;
+    _ZNSt3__110__stdinbufIwE9__getcharEb;
+    _ZNSt3__110__stdinbufIwE9pbackfailEi;
+    _ZNSt3__110__stdinbufIwE9underflowEv;
+    _ZNSt3__110__stdinbufIwEC2EP7__sFILEP9mbstate_t;
+    _ZNSt3__110__stdinbufIwED0Ev;
+    _ZNSt3__111__libcpp_db17__insert_iteratorEPv;
+    _ZNSt3__111__money_getIcEC1Ev;
+    _ZNSt3__111__money_getIcEC2Ev;
+    _ZNSt3__111__money_getIwEC1Ev;
+    _ZNSt3__111__money_getIwEC2Ev;
+    _ZNSt3__111__money_putIcEC1Ev;
+    _ZNSt3__111__money_putIcEC2Ev;
+    _ZNSt3__111__money_putIwEC1Ev;
+    _ZNSt3__111__money_putIwEC2Ev;
+    _ZNSt3__111__stdoutbufIcE4syncEv;
+    _ZNSt3__111__stdoutbufIcE5imbueERKNS_6localeE;
+    _ZNSt3__111__stdoutbufIcE6xsputnEPKci;
+    _ZNSt3__111__stdoutbufIcE8overflowEi;
+    _ZNSt3__111__stdoutbufIcEC2EP7__sFILEP9mbstate_t;
+    _ZNSt3__111__stdoutbufIcED0Ev;
+    _ZNSt3__111__stdoutbufIwE4syncEv;
+    _ZNSt3__111__stdoutbufIwE5imbueERKNS_6localeE;
+    _ZNSt3__111__stdoutbufIwE6xsputnEPKwi;
+    _ZNSt3__111__stdoutbufIwE8overflowEi;
+    _ZNSt3__111__stdoutbufIwEC2EP7__sFILEP9mbstate_t;
+    _ZNSt3__111__stdoutbufIwED0Ev;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE10__set_sizeEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE11__recommendEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12__swap_allocERS4_S6_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12__swap_allocERS4_S6_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12__swap_allocERS4_S6_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__get_pointerEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__move_assignERS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__move_assignERS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13shrink_to_fitEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE14__erase_to_endEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE14__set_long_capEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE15__set_long_sizeEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__set_short_sizeEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE18__get_long_pointerEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE18__set_long_pointerEPc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__copy_assign_allocERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__copy_assign_allocERKS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__copy_assign_allocERKS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__get_short_pointerEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__move_assign_allocERS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__move_assign_allocERS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__move_assign_allocERS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE26__invalidate_all_iteratorsEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE27__invalidate_iterators_pastEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE3endEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4backEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4rendEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4swapERS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5beginEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5clearEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseENS_11__wrap_iterIPKcEE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseENS_11__wrap_iterIPKcEES9_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5frontEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEOS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEjRKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEjc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6rbeginEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__zeroEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7__allocEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEjjRKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_jc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_RKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_S8_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_S8_j;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_St16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE8pop_backEv;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1Ejc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EjcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EOS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EOS5_RKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKcjRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ESt16initializer_listIcERKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1Ev;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2Ejc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EjcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EOS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EOS5_RKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcjRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ESt16initializer_listIcERKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2Ev;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEixEj;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEpLEc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEpLEPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEpLERKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEpLESt16initializer_listIcE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE10__set_sizeEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE11__recommendEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12__swap_allocERS4_S6_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12__swap_allocERS4_S6_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12__swap_allocERS4_S6_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13__get_pointerEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13__move_assignERS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13__move_assignERS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13shrink_to_fitEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE14__erase_to_endEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE14__set_long_capEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE15__set_long_sizeEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16__set_short_sizeEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE18__get_long_pointerEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE18__set_long_pointerEPw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__copy_assign_allocERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__copy_assign_allocERKS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__copy_assign_allocERKS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__get_short_pointerEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__move_assign_allocERS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__move_assign_allocERS5_NS_17integral_constantIbLb0EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE19__move_assign_allocERS5_NS_17integral_constantIbLb1EEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE26__invalidate_all_iteratorsEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE27__invalidate_iterators_pastEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE3endEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4backEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4rendEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4swapERS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5beginEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5clearEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseENS_11__wrap_iterIPKwEE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseENS_11__wrap_iterIPKwEES9_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5frontEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEOS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEjRKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEjw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6rbeginEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__zeroEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7__allocEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEjjRKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_jw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_RKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_S8_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_S8_j;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_St16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE8pop_backEv;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEOS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSEPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1Ejw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EjwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EOS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EOS5_RKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKwjRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ESt16initializer_listIwERKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1Ev;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2Ejw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EjwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EOS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EOS5_RKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKwj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKwjRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ESt16initializer_listIwERKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2Ev;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEixEj;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEpLEPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEpLERKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEpLESt16initializer_listIwE;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEpLEw;
+    _ZNSt3__112__do_messageD0Ev;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEaSEOS3_;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC1EOS3_;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEEC2EOS3_;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEaSEOS3_;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC1EOS3_;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEEC2EOS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEaSEOS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1EOS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC1Ev;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2EOS3_;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEEC2Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEaSEOS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1EOS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC1Ev;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2EOS3_;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEEC2Ev;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEaSEOS3_;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC1EOS3_;
+    _ZNSt3__114basic_iostreamIcNS_11char_traitsIcEEEC2EOS3_;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC1EPKcj;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC2EPKcj;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC1EPKcj;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC2EPKcj;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC1EPKcj;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC2EPKcj;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC1EPKcj;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC2EPKcj;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__114__scan_keywordINS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEPKNS_12basic_stringIcS3_NS_9allocatorIcEEEENS_5ctypeIcEEEET0_RT_SE_SD_SD_RKT1_Rjb;
+    _ZNSt3__114__scan_keywordINS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEPKNS_12basic_stringIwS3_NS_9allocatorIwEEEENS_5ctypeIwEEEET0_RT_SE_SD_SD_RKT1_Rjb;
+    _ZNSt3__114__scan_keywordIPcPNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_5ctypeIcEEEET0_RT_SC_SB_SB_RKT1_Rjb;
+    _ZNSt3__114__scan_keywordIPwPNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEENS_5ctypeIwEEEET0_RT_SC_SB_SB_RKT1_Rjb;
+    _ZNSt3__115messages_bynameIcEC1EPKcj;
+    _ZNSt3__115messages_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115messages_bynameIcEC2EPKcj;
+    _ZNSt3__115messages_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115messages_bynameIcED0Ev;
+    _ZNSt3__115messages_bynameIcED1Ev;
+    _ZNSt3__115messages_bynameIcED2Ev;
+    _ZNSt3__115messages_bynameIwEC1EPKcj;
+    _ZNSt3__115messages_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115messages_bynameIwEC2EPKcj;
+    _ZNSt3__115messages_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115messages_bynameIwED0Ev;
+    _ZNSt3__115messages_bynameIwED1Ev;
+    _ZNSt3__115messages_bynameIwED2Ev;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcj;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcj;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcj;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcj;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__115__time_get_tempIcED0Ev;
+    _ZNSt3__115__time_get_tempIwED0Ev;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcj;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcj;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcj;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcj;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_;
+    _ZNSt3__116__pad_and_outputIwNS_11char_traitsIwEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC1EPKcj;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC2EPKcj;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIcLb0EED0Ev;
+    _ZNSt3__117moneypunct_bynameIcLb0EED1Ev;
+    _ZNSt3__117moneypunct_bynameIcLb0EED2Ev;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC1EPKcj;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC2EPKcj;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIcLb1EED0Ev;
+    _ZNSt3__117moneypunct_bynameIcLb1EED1Ev;
+    _ZNSt3__117moneypunct_bynameIcLb1EED2Ev;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC1EPKcj;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC2EPKcj;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIwLb0EED0Ev;
+    _ZNSt3__117moneypunct_bynameIwLb0EED1Ev;
+    _ZNSt3__117moneypunct_bynameIwLb0EED2Ev;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC1EPKcj;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC2EPKcj;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__117moneypunct_bynameIwLb1EED0Ev;
+    _ZNSt3__117moneypunct_bynameIwLb1EED1Ev;
+    _ZNSt3__117moneypunct_bynameIwLb1EED2Ev;
+    _ZNSt3__119__double_or_nothingIcEEvRNS_10unique_ptrIT_PFvPvEEERPS2_S9_;
+    _ZNSt3__119__double_or_nothingIwEEvRNS_10unique_ptrIT_PFvPvEEERPS2_S9_;
+    _ZNSt3__119__iostream_categoryD0Ev;
+    _ZNSt3__119__thread_struct_imp25notify_all_at_thread_exitEPNS_18condition_variableEPNS_5mutexE;
+    _ZNSt3__119__thread_struct_imp27__make_ready_at_thread_exitEPNS_17__assoc_sub_stateE;
+    _ZNSt3__119__thread_struct_impD1Ev;
+    _ZNSt3__119__thread_struct_impD2Ev;
+    _ZNSt3__120__get_up_to_n_digitsIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEEiRT0_S5_RjRKNS_5ctypeIT_EEi;
+    _ZNSt3__120__get_up_to_n_digitsIcPcEEiRT0_S2_RjRKNS_5ctypeIT_EEi;
+    _ZNSt3__120__get_up_to_n_digitsIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEEiRT0_S5_RjRKNS_5ctypeIT_EEi;
+    _ZNSt3__120__get_up_to_n_digitsIwPwEEiRT0_S2_RjRKNS_5ctypeIT_EEi;
+    _ZNSt3__120__vector_base_commonILb1EEC1Ev;
+    _ZNSt3__120__vector_base_commonILb1EEC2Ev;
+    _ZNSt3__123__future_error_categoryD0Ev;
+    _ZNSt3__123__system_error_categoryD0Ev;
+    _ZNSt3__124__generic_error_categoryD0Ev;
+    _ZNSt3__16locale5__imp11make_globalEv;
+    _ZNSt3__16locale5__imp12make_classicEv;
+    _ZNSt3__16locale5__imp7installEPNS0_5facetEl;
+    _ZNSt3__16locale5__impC1Ej;
+    _ZNSt3__16locale5__impC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__16locale5__impC1ERKS1_;
+    _ZNSt3__16locale5__impC1ERKS1_PNS0_5facetEl;
+    _ZNSt3__16locale5__impC1ERKS1_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi;
+    _ZNSt3__16locale5__impC1ERKS1_S3_i;
+    _ZNSt3__16locale5__impC2Ej;
+    _ZNSt3__16locale5__impC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEj;
+    _ZNSt3__16locale5__impC2ERKS1_;
+    _ZNSt3__16locale5__impC2ERKS1_PNS0_5facetEl;
+    _ZNSt3__16locale5__impC2ERKS1_RKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEi;
+    _ZNSt3__16locale5__impC2ERKS1_S3_i;
+    _ZNSt3__16locale5__impD0Ev;
+    _ZNSt3__16locale5__impD1Ev;
+    _ZNSt3__16locale5__impD2Ev;
+    _ZNSt3__16vectorINS_4pairIPNS_18condition_variableEPNS_5mutexEEENS_18__hidden_allocatorIS6_EEE21__push_back_slow_pathIS6_EEvOT_;
+    _ZNSt3__16vectorIPNS_17__assoc_sub_stateENS_18__hidden_allocatorIS2_EEE21__push_back_slow_pathIRKS2_EEvOT_;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lj28EEEE6assignIPS3_EENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr16is_constructibleIS3_NS_15iterator_traitsISA_E9referenceEEE5valueEvE4typeESA_SA_;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lj28EEEE8__appendEj;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lj28EEEEC2Ej;
+    _ZNSt3__17collateIcEC1Ej;
+    _ZNSt3__17collateIcEC2Ej;
+    _ZNSt3__17collateIwEC1Ej;
+    _ZNSt3__17collateIwEC2Ej;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__18__c_node8__removeEPNS_8__i_nodeE;
+    _ZNSt3__18messagesIcEC1Ej;
+    _ZNSt3__18messagesIcEC2Ej;
+    _ZNSt3__18messagesIcED0Ev;
+    _ZNSt3__18messagesIcED1Ev;
+    _ZNSt3__18messagesIcED2Ev;
+    _ZNSt3__18messagesIwEC1Ej;
+    _ZNSt3__18messagesIwEC2Ej;
+    _ZNSt3__18messagesIwED0Ev;
+    _ZNSt3__18messagesIwED1Ev;
+    _ZNSt3__18messagesIwED2Ev;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcj;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcj;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEj;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcj;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcj;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEj;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE10exceptionsEj;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE3tieEPNS_13basic_ostreamIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE4fillEc;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE4initEPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE4moveEOS3_;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE4moveERS3_;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE4swapERS3_;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE5clearEj;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE5rdbufEPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE8setstateEj;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEE9set_rdbufEPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEEC1Ev;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE;
+    _ZNSt3__19basic_iosIcNS_11char_traitsIcEEEC2Ev;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE10exceptionsEj;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE3tieEPNS_13basic_ostreamIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE4fillEw;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE4initEPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE4moveEOS3_;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE4moveERS3_;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE4swapERS3_;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE5clearEj;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE5imbueERKNS_6localeE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE5rdbufEPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE8setstateEj;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEE9set_rdbufEPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEEC1Ev;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE;
+    _ZNSt3__19basic_iosIwNS_11char_traitsIwEEEC2Ev;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Ej;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Ej;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED0Ev;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED1Ev;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEED2Ev;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Ej;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Ej;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED0Ev;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED1Ev;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEED2Ev;
+    _ZNSt3__1L10__init_patIcEEvRNS_10money_base7patternERNS_12basic_stringIT_NS_11char_traitsIS5_EENS_9allocatorIS5_EEEEbcccS5_;
+    _ZNSt3__1L10__init_patIwEEvRNS_10money_base7patternERNS_12basic_stringIT_NS_11char_traitsIS5_EENS_9allocatorIS5_EEEEbcccS5_;
+    _ZNSt3__1L11state_typesE;
+    _ZNSt3__1L12ucs4_to_utf8EPKjS1_RS1_PhS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L12utf8_to_ucs4EPKhS1_RS1_PjS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L13utf16_to_utf8EPKjS1_RS1_PhS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L13utf16_to_utf8EPKtS1_RS1_PhS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L13utf8_to_utf16EPKhS1_RS1_PjS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L13utf8_to_utf16EPKhS1_RS1_PtS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L15ucs4_to_utf16beEPKjS1_RS1_PhS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L15ucs4_to_utf16leEPKjS1_RS1_PhS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L15utf16be_to_ucs4EPKhS1_RS1_PjS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L15utf16le_to_ucs4EPKhS1_RS1_PjS3_RS3_mNS_12codecvt_modeE;
+    _ZNSt3__1L19utf8_to_ucs4_lengthEPKhS1_jmNS_12codecvt_modeE;
+    _ZNSt3__1L20utf8_to_utf16_lengthEPKhS1_jmNS_12codecvt_modeE;
+    _ZNSt3__1L22utf16be_to_ucs4_lengthEPKhS1_jmNS_12codecvt_modeE;
+    _ZNSt3__1L22utf16le_to_ucs4_lengthEPKhS1_jmNS_12codecvt_modeE;
+    _ZNSt3__1L5__cinE;
+    _ZNSt3__1L6__cerrE;
+    _ZNSt3__1L6__coutE;
+    _ZNSt3__1L6__wcinE;
+    _ZNSt3__1L7__wcerrE;
+    _ZNSt3__1L7__wcoutE;
+    _ZSt11__terminatePFvvE;
+    _ZSt12__unexpectedPFvvE;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__cEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__rEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__xEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__XEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__am_pmEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__weeksEv;
+    _ZThn8_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__monthsEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__cEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__rEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__xEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__XEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__am_pmEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__weeksEv;
+    _ZThn8_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__monthsEv;
+    _ZTIN10__cxxabiv116__shim_type_infoE;
+    _ZTIN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEEE;
+    _ZTIN9libunwind20AbstractUnwindCursorE;
+    _ZTINSt3__110__stdinbufIcEE;
+    _ZTINSt3__110__stdinbufIwEE;
+    _ZTINSt3__111__stdoutbufIcEE;
+    _ZTINSt3__111__stdoutbufIwEE;
+    _ZTINSt3__112__do_messageE;
+    _ZTINSt3__115__time_get_tempIcEE;
+    _ZTINSt3__115__time_get_tempIwEE;
+    _ZTINSt3__119__iostream_categoryE;
+    _ZTINSt3__123__future_error_categoryE;
+    _ZTINSt3__123__system_error_categoryE;
+    _ZTINSt3__124__generic_error_categoryE;
+    _ZTINSt3__16locale5__impE;
+    _ZTSN10__cxxabiv116__shim_type_infoE;
+    _ZTSN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEEE;
+    _ZTSN9libunwind20AbstractUnwindCursorE;
+    _ZTSNSt3__110__stdinbufIcEE;
+    _ZTSNSt3__110__stdinbufIwEE;
+    _ZTSNSt3__111__stdoutbufIcEE;
+    _ZTSNSt3__111__stdoutbufIwEE;
+    _ZTSNSt3__112__do_messageE;
+    _ZTSNSt3__115__time_get_tempIcEE;
+    _ZTSNSt3__115__time_get_tempIwEE;
+    _ZTSNSt3__119__iostream_categoryE;
+    _ZTSNSt3__123__future_error_categoryE;
+    _ZTSNSt3__123__system_error_categoryE;
+    _ZTSNSt3__124__generic_error_categoryE;
+    _ZTSNSt3__16locale5__impE;
+    _ZTVN10__cxxabiv116__shim_type_infoE;
+    _ZTVN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_13Registers_armEEE;
+    _ZTVNSt3__110__stdinbufIcEE;
+    _ZTVNSt3__110__stdinbufIwEE;
+    _ZTVNSt3__111__stdoutbufIcEE;
+    _ZTVNSt3__111__stdoutbufIwEE;
+    _ZTVNSt3__112__do_messageE;
+    _ZTVNSt3__115__time_get_tempIcEE;
+    _ZTVNSt3__115__time_get_tempIwEE;
+    _ZTVNSt3__119__iostream_categoryE;
+    _ZTVNSt3__123__future_error_categoryE;
+    _ZTVNSt3__123__system_error_categoryE;
+    _ZTVNSt3__124__generic_error_categoryE;
+    _ZTVNSt3__16locale5__impE;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tmE5__fmt;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_0;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_1;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_2;
+    _ZZNKSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_3;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE11do_get_timeES4_S4_RNS_8ios_baseERjP2tmE5__fmt;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_0;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_1;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_2;
+    _ZZNKSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_RNS_8ios_baseERjP2tmccE4__fm_3;
+    _ZZNKSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_bRNS_8ios_baseERjReE5__src;
+    _ZZNKSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE6do_getES4_S4_bRNS_8ios_baseERjReE5__src;
+    _ZZNSt3__16locale5__imp11make_globalEvE3buf;
+    _ZZNSt3__16locale5__imp12make_classicEvE3buf;
+    _ZZNSt3__18ios_base15sync_with_stdioEbE14previous_state;
+
+    /* ToDo: missing from 64-bit */
+    _ZGVZNSt3__112__get_sp_mutEPKvE4muts;
+    _ZGVZNSt3__112__rs_defaultclEvE6__rs_g;
+    _ZGVZNSt3__115future_categoryEvE3__f;
+    _ZGVZNSt3__115system_categoryEvE1s;
+    _ZGVZNSt3__116generic_categoryEvE1s;
+    _ZGVZNSt3__117iostream_categoryEvE1s;
+    _ZGVZNSt3__119__thread_local_dataEvE3__p;
+    _ZGVZNSt3__16__clocEvE6result;
+    _ZGVZNSt3__16locale7classicEvE1c;
+    _ZGVZNSt3__16locale8__globalEvE1g;
+    _ZGVZNSt3__18__get_dbEvE2db;
+    _ZGVZNSt3__1L10init_am_pmEvE5am_pm;
+    _ZGVZNSt3__1L10init_weeksEvE5weeks;
+    _ZGVZNSt3__1L11init_monthsEvE6months;
+    _ZGVZNSt3__1L11init_wam_pmEvE5am_pm;
+    _ZGVZNSt3__1L11init_wweeksEvE5weeks;
+    _ZGVZNSt3__1L12init_wmonthsEvE6months;
+    _ZN10__cxxabiv114call_terminateEbP17_Unwind_Exception;
+    _ZN10__cxxabiv127dependent_exception_cleanupE19_Unwind_Reason_CodeP17_Unwind_Exception;
+    _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception;
+    _ZN10__cxxabiv1L9do_mallocEm;
+    _Znam;
+    _ZnamRKSt9nothrow_t;
+    _ZNKSt3__111__libcpp_db15__subscriptableEPKvl;
+    _ZNKSt3__111__libcpp_db9__addableEPKvl;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE12find_last_ofERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13find_first_ofERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16find_last_not_ofERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE17find_first_not_ofERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEPKcmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindERKS5_m;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6substrEmm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKc;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmRKS5_mm;
+    _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEixEm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE12find_last_ofEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE13find_first_ofEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16find_last_not_ofEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE17find_first_not_ofEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4copyEPwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE4findEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEPKwmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindERKS5_m;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5rfindEwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6substrEmm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKw;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmPKwm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7compareEmmRKS5_mm;
+    _ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEixEm;
+    _ZNKSt3__114__codecvt_utf8IDiE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__114__codecvt_utf8IDsE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__114__codecvt_utf8IwE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IDiLb0EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IDiLb1EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IDsLb0EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IDsLb1EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IwLb0EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__120__codecvt_utf8_utf16IDiE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__120__codecvt_utf8_utf16IDsE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__120__codecvt_utf8_utf16IwE9do_lengthER9mbstate_tPKcS5_m;
+    _ZNKSt3__17codecvtIcc9mbstate_tE9do_lengthERS1_PKcS5_m;
+    _ZNKSt3__17codecvtIDic9mbstate_tE9do_lengthERS1_PKcS5_m;
+    _ZNKSt3__17codecvtIDsc9mbstate_tE9do_lengthERS1_PKcS5_m;
+    _ZNKSt3__17codecvtIwc9mbstate_tE9do_lengthERS1_PKcS5_m;
+    _ZNKSt3__18messagesIcE3getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNKSt3__18messagesIcE5closeEl;
+    _ZNKSt3__18messagesIcE6do_getEliiRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE;
+    _ZNKSt3__18messagesIcE8do_closeEl;
+    _ZNKSt3__18messagesIwE3getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE;
+    _ZNKSt3__18messagesIwE5closeEl;
+    _ZNKSt3__18messagesIwE6do_getEliiRKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE;
+    _ZNKSt3__18messagesIwE8do_closeEl;
+    _ZNSt3__110moneypunctIcLb0EEC1Em;
+    _ZNSt3__110moneypunctIcLb0EEC2Em;
+    _ZNSt3__110moneypunctIcLb1EEC1Em;
+    _ZNSt3__110moneypunctIcLb1EEC2Em;
+    _ZNSt3__110moneypunctIwLb0EEC1Em;
+    _ZNSt3__110moneypunctIwLb0EEC2Em;
+    _ZNSt3__110moneypunctIwLb1EEC1Em;
+    _ZNSt3__110moneypunctIwLb1EEC2Em;
+    _ZNSt3__110__sscanf_lEPKcP10__locale_tS1_z;
+    _ZNSt3__110__stdinbufIwE9pbackfailEj;
+    _ZNSt3__111__stdoutbufIcE6xsputnEPKcl;
+    _ZNSt3__111__stdoutbufIwE6xsputnEPKwl;
+    _ZNSt3__111__stdoutbufIwE8overflowEj;
+    _ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE;
+    _ZNSt3__112__asprintf_lEPPcP10__locale_tPKcz;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE10__set_sizeEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE11__recommendEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE14__erase_to_endEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE14__set_long_capEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE15__set_long_sizeEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__set_short_sizeEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEmmmmmmPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE27__invalidate_iterators_pastEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5eraseEmm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendERKS5_mm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignERKS5_mm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcmm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmRKS5_mm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertENS_11__wrap_iterIPKcEEmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6resizeEmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmmc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceEmmRKS5_mm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_mc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceENS_11__wrap_iterIPKcEES9_S8_m;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1Emc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EmcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1EPKcmRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_mmRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2Emc;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EmcRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcm;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcmRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_;
+    _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEixEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE10__set_sizeEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE11__recommendEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE14__erase_to_endEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE14__set_long_capEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE15__set_long_sizeEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE16__set_short_sizeEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE21__grow_by_and_replaceEmmmmmmPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE27__invalidate_iterators_pastEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE5eraseEmm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendEPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendERKS5_mm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignEPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6assignERKS5_mm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6__initEPKwmm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertEmRKS5_mm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertENS_11__wrap_iterIPKwEEmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmmw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceEmmRKS5_mm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_mw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceENS_11__wrap_iterIPKwEES9_S8_m;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7reserveEm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9__grow_byEmmmmmm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1Emw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EmwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1EPKwmRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC1ERKS5_mmRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2Emw;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EmwRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKwm;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2EPKwmRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEC2ERKS5_mmRKS4_;
+    _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEixEm;
+    _ZNSt3__112ctype_bynameIcEC1EPKcm;
+    _ZNSt3__112ctype_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__112ctype_bynameIcEC2EPKcm;
+    _ZNSt3__112ctype_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__112ctype_bynameIwEC1EPKcm;
+    _ZNSt3__112ctype_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__112ctype_bynameIwEC2EPKcm;
+    _ZNSt3__112ctype_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__112__next_primeEm;
+    _ZNSt3__112__snprintf_lEPcmP10__locale_tPKcz;
+    _ZNSt3__112strstreambuf6__initEPclS1_;
+    _ZNSt3__112strstreambufC1El;
+    _ZNSt3__112strstreambufC1EPalS1_;
+    _ZNSt3__112strstreambufC1EPclS1_;
+    _ZNSt3__112strstreambufC1EPFPvmEPFvS1_E;
+    _ZNSt3__112strstreambufC1EPhlS1_;
+    _ZNSt3__112strstreambufC1EPKal;
+    _ZNSt3__112strstreambufC1EPKcl;
+    _ZNSt3__112strstreambufC1EPKhl;
+    _ZNSt3__112strstreambufC2El;
+    _ZNSt3__112strstreambufC2EPalS1_;
+    _ZNSt3__112strstreambufC2EPclS1_;
+    _ZNSt3__112strstreambufC2EPFPvmEPFvS1_E;
+    _ZNSt3__112strstreambufC2EPhlS1_;
+    _ZNSt3__112strstreambufC2EPKal;
+    _ZNSt3__112strstreambufC2EPKcl;
+    _ZNSt3__112strstreambufC2EPKhl;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPcl;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE3getEPclc;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE4readEPcl;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE6ignoreEli;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc;
+    _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwl;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE3getEPwlw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE4readEPwl;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE6ignoreElj;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw;
+    _ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl;
+    _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl;
+    _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC1EPKcm;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC2EPKcm;
+    _ZNSt3__114codecvt_bynameIcc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC1EPKcm;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC2EPKcm;
+    _ZNSt3__114codecvt_bynameIDic9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC1EPKcm;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC2EPKcm;
+    _ZNSt3__114codecvt_bynameIDsc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC1EPKcm;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC2EPKcm;
+    _ZNSt3__114codecvt_bynameIwc9mbstate_tEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114collate_bynameIcEC1EPKcm;
+    _ZNSt3__114collate_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114collate_bynameIcEC2EPKcm;
+    _ZNSt3__114collate_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114collate_bynameIwEC1EPKcm;
+    _ZNSt3__114collate_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__114collate_bynameIwEC2EPKcm;
+    _ZNSt3__114collate_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl;
+    _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE8overflowEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pbackfailEj;
+    _ZNSt3__115basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl;
+    _ZNSt3__115messages_bynameIcEC1EPKcm;
+    _ZNSt3__115messages_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115messages_bynameIcEC2EPKcm;
+    _ZNSt3__115messages_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115messages_bynameIwEC1EPKcm;
+    _ZNSt3__115messages_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115messages_bynameIwEC2EPKcm;
+    _ZNSt3__115messages_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115numpunct_bynameIcEC1EPKcm;
+    _ZNSt3__115numpunct_bynameIcEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115numpunct_bynameIcEC2EPKcm;
+    _ZNSt3__115numpunct_bynameIcEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115numpunct_bynameIwEC1EPKcm;
+    _ZNSt3__115numpunct_bynameIwEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115numpunct_bynameIwEC2EPKcm;
+    _ZNSt3__115numpunct_bynameIwEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcm;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcm;
+    _ZNSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcm;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcm;
+    _ZNSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcm;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcm;
+    _ZNSt3__115time_put_bynameIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcm;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcm;
+    _ZNSt3__115time_put_bynameIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__116__narrow_to_utf8ILm16EED0Ev;
+    _ZNSt3__116__narrow_to_utf8ILm16EED1Ev;
+    _ZNSt3__116__narrow_to_utf8ILm16EED2Ev;
+    _ZNSt3__116__narrow_to_utf8ILm32EED0Ev;
+    _ZNSt3__116__narrow_to_utf8ILm32EED1Ev;
+    _ZNSt3__116__narrow_to_utf8ILm32EED2Ev;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC1EPKcm;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC2EPKcm;
+    _ZNSt3__117moneypunct_bynameIcLb0EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC1EPKcm;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC2EPKcm;
+    _ZNSt3__117moneypunct_bynameIcLb1EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC1EPKcm;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC2EPKcm;
+    _ZNSt3__117moneypunct_bynameIwLb0EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC1EPKcm;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC2EPKcm;
+    _ZNSt3__117moneypunct_bynameIwLb1EEC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__117__widen_from_utf8ILm16EED0Ev;
+    _ZNSt3__117__widen_from_utf8ILm16EED1Ev;
+    _ZNSt3__117__widen_from_utf8ILm16EED2Ev;
+    _ZNSt3__117__widen_from_utf8ILm32EED0Ev;
+    _ZNSt3__117__widen_from_utf8ILm32EED1Ev;
+    _ZNSt3__117__widen_from_utf8ILm32EED2Ev;
+    _ZNSt3__118condition_variable15__do_timed_waitERNS_11unique_lockINS_5mutexEEENS_6chrono10time_pointINS5_12system_clockENS5_8durationIxNS_5ratioILl1ELl1000000000EEEEEEE;
+    _ZNSt3__119declare_no_pointersEPcm;
+    _ZNSt3__121undeclare_no_pointersEPcm;
+    _ZNSt3__14stodERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm;
+    _ZNSt3__14stodERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm;
+    _ZNSt3__14stofERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm;
+    _ZNSt3__14stofERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm;
+    _ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi;
+    _ZNSt3__14stoiERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi;
+    _ZNSt3__14stolERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi;
+    _ZNSt3__14stolERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi;
+    _ZNSt3__15alignEmmRPvRm;
+    _ZNSt3__15ctypeIcEC1EPKtbm;
+    _ZNSt3__15ctypeIcEC2EPKtbm;
+    _ZNSt3__15stoldERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPm;
+    _ZNSt3__15stoldERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPm;
+    _ZNSt3__15stollERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi;
+    _ZNSt3__15stollERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi;
+    _ZNSt3__15stoulERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi;
+    _ZNSt3__15stoulERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi;
+    _ZNSt3__16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE;
+    _ZNSt3__16gslice6__initEm;
+    _ZNSt3__16locale5__impC1Em;
+    _ZNSt3__16locale5__impC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__16locale5__impC2Em;
+    _ZNSt3__16locale5__impC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm;
+    _ZNSt3__16stoullERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPmi;
+    _ZNSt3__16stoullERKNS_12basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEPmi;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lm28EEEE6assignIPS3_EENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr16is_constructibleIS3_NS_15iterator_traitsISA_E9referenceEEE5valueEvE4typeESA_SA_;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lm28EEEE8__appendEm;
+    _ZNSt3__16vectorIPNS_6locale5facetENS_15__sso_allocatorIS3_Lm28EEEEC2Em;
+    _ZNSt3__17codecvtIwc9mbstate_tEC1Em;
+    _ZNSt3__17codecvtIwc9mbstate_tEC1EPKcm;
+    _ZNSt3__17codecvtIwc9mbstate_tEC2Em;
+    _ZNSt3__17codecvtIwc9mbstate_tEC2EPKcm;
+    _ZNSt3__17collateIcEC1Em;
+    _ZNSt3__17collateIcEC2Em;
+    _ZNSt3__17collateIwEC1Em;
+    _ZNSt3__17collateIwEC2Em;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__17num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__17num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__17num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__18messagesIcEC1Em;
+    _ZNSt3__18messagesIcEC2Em;
+    _ZNSt3__18messagesIwEC1Em;
+    _ZNSt3__18messagesIwEC2Em;
+    _ZNSt3__18numpunctIcEC1Em;
+    _ZNSt3__18numpunctIcEC2Em;
+    _ZNSt3__18numpunctIwEC1Em;
+    _ZNSt3__18numpunctIwEC2Em;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__18time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__18time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1EPKcm;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2EPKcm;
+    _ZNSt3__18time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2ERKNS_12basic_stringIcS3_NS_9allocatorIcEEEEm;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1EPKcm;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2EPKcm;
+    _ZNSt3__18time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2ERKNS_12basic_stringIcNS2_IcEENS_9allocatorIcEEEEm;
+    _ZNSt3__18valarrayImE6resizeEmm;
+    _ZNSt3__18valarrayImEC1Em;
+    _ZNSt3__18valarrayImEC2Em;
+    _ZNSt3__18valarrayImED1Ev;
+    _ZNSt3__18valarrayImED2Ev;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__19money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__19money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC1Em;
+    _ZNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEC2Em;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC1Em;
+    _ZNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEC2Em;
+    _ZNSt3__1L12mut_back_impE;
+    _ZNSt3__1L19utf8_to_ucs4_lengthEPKhS1_mmNS_12codecvt_modeE;
+    _ZNSt3__1L20utf8_to_utf16_lengthEPKhS1_mmNS_12codecvt_modeE;
+    _ZNSt3__1L22utf16be_to_ucs4_lengthEPKhS1_mmNS_12codecvt_modeE;
+    _ZNSt3__1L22utf16le_to_ucs4_lengthEPKhS1_mmNS_12codecvt_modeE;
+    _ZNSt3__1L2cvE;
+    _ZNSt3__1L3mutE;
+    _ZNSt3__1L8__rs_mutE;
+    _Znwm;
+    _ZnwmRKSt9nothrow_t;
+    _ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE;
+    _ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__cEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__rEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__xEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE3__XEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__am_pmEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE7__weeksEv;
+    _ZThn16_NKSt3__115time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE8__monthsEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__cEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__rEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__xEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE3__XEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__am_pmEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE7__weeksEv;
+    _ZThn16_NKSt3__115time_get_bynameIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE8__monthsEv;
+    _ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZThn16_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZThn16_NSt3__19strstreamD0Ev;
+    _ZThn16_NSt3__19strstreamD1Ev;
+    _ZTINSt3__116__narrow_to_utf8ILm16EEE;
+    _ZTINSt3__116__narrow_to_utf8ILm32EEE;
+    _ZTINSt3__117__widen_from_utf8ILm16EEE;
+    _ZTINSt3__117__widen_from_utf8ILm32EEE;
+    _ZTSNSt3__116__narrow_to_utf8ILm16EEE;
+    _ZTSNSt3__116__narrow_to_utf8ILm32EEE;
+    _ZTSNSt3__117__widen_from_utf8ILm16EEE;
+    _ZTSNSt3__117__widen_from_utf8ILm32EEE;
+    _ZTv0_n24_NSt3__110istrstreamD0Ev;
+    _ZTv0_n24_NSt3__110istrstreamD1Ev;
+    _ZTv0_n24_NSt3__110ostrstreamD0Ev;
+    _ZTv0_n24_NSt3__110ostrstreamD1Ev;
+    _ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n24_NSt3__113basic_istreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED0Ev;
+    _ZTv0_n24_NSt3__113basic_istreamIwNS_11char_traitsIwEEED1Ev;
+    _ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED0Ev;
+    _ZTv0_n24_NSt3__113basic_ostreamIwNS_11char_traitsIwEEED1Ev;
+    _ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED0Ev;
+    _ZTv0_n24_NSt3__114basic_iostreamIcNS_11char_traitsIcEEED1Ev;
+    _ZTv0_n24_NSt3__19strstreamD0Ev;
+    _ZTv0_n24_NSt3__19strstreamD1Ev;
+    _ZTVNSt3__116__narrow_to_utf8ILm16EEE;
+    _ZTVNSt3__116__narrow_to_utf8ILm32EEE;
+    _ZTVNSt3__117__widen_from_utf8ILm16EEE;
+    _ZTVNSt3__117__widen_from_utf8ILm32EEE;
+    _ZZ12logUnwindingE3log;
+    _ZZ12logUnwindingE7checked;
+    _ZZ7logAPIsE3log;
+    _ZZ7logAPIsE7checked;
+    _ZZNSt3__112__get_sp_mutEPKvE4muts;
+    _ZZNSt3__112__rs_defaultclEvE6__rs_g;
+    _ZZNSt3__115future_categoryEvE3__f;
+    _ZZNSt3__115system_categoryEvE1s;
+    _ZZNSt3__116generic_categoryEvE1s;
+    _ZZNSt3__117iostream_categoryEvE1s;
+    _ZZNSt3__119__thread_local_dataEvE3__p;
+    _ZZNSt3__16__clocEvE6result;
+    _ZZNSt3__16locale7classicEvE1c;
+    _ZZNSt3__16locale8__globalEvE1g;
+    _ZZNSt3__18__get_dbEvE2db;
+    _ZZNSt3__18ios_base5iwordEiE5error;
+    _ZZNSt3__18ios_base5pwordEiE5error;
+    _ZZNSt3__1L10init_am_pmEvE5am_pm;
+    _ZZNSt3__1L10init_weeksEvE5weeks;
+    _ZZNSt3__1L11init_monthsEvE6months;
+    _ZZNSt3__1L11init_wam_pmEvE5am_pm;
+    _ZZNSt3__1L11init_wweeksEvE5weeks;
+    _ZZNSt3__1L12init_wmonthsEvE6months;
+
+  local: *;
+};
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__bit_reference b/sources/cxx-stl/llvm-libc++/libcxx/include/__bit_reference
index 37b7923..d9ebfbe 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/__bit_reference
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__bit_reference
@@ -174,7 +174,7 @@
         if (__b)
             return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
         if (__n == __dn)
-            return _It(__first.__seg_, __first.__ctz_ + __n);
+            return __first + __n;
         __n -= __dn;
         ++__first.__seg_;
     }
@@ -210,7 +210,7 @@
         if (__b)
             return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
         if (__n == __dn)
-            return _It(__first.__seg_, __first.__ctz_ + __n);
+            return __first + __n;
         __n -= __dn;
         ++__first.__seg_;
     }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__config b/sources/cxx-stl/llvm-libc++/libcxx/include/__config
index 4124e96..e8c9923 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/__config
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__config
@@ -191,6 +191,7 @@
 
 #ifndef _LIBCPP_INLINE_VISIBILITY
 #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
+#define _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 _LIBCPP_INLINE_VISIBILITY
 #endif
 
 #ifndef _LIBCPP_EXCEPTION_ABI
@@ -199,10 +200,16 @@
 
 #ifndef _LIBCPP_ALWAYS_INLINE
 #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__visibility__("hidden"), __always_inline__))
+#define _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49 _LIBCPP_ALWAYS_INLINE
 #endif
 
 #if defined(__clang__)
 
+#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) &&        \
+    !defined(__arm__)
+#define _LIBCPP_ALTERNATE_STRING_LAYOUT
+#endif
+
 #if __has_feature(cxx_alignas)
 #  define _ALIGNAS_TYPE(x) alignas(x)
 #  define _ALIGNAS(x) alignas(x)
@@ -215,7 +222,7 @@
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 #endif
 
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
 #ifdef __linux__
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #else
@@ -334,7 +341,11 @@
 #endif
 
 #if __has_feature(underlying_type)
-#  define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
+#  define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#endif
+
+#if __has_feature(is_literal)
+#  define _LIBCPP_IS_LITERAL(T) __is_literal(T)
 #endif
 
 // Inline namespaces are available in Clang regardless of C++ dialect.
@@ -347,19 +358,43 @@
   }
 }
 
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
 #elif defined(__GNUC__)
 
+// FixME: GCC4.9 fails some always_inline cases
+# if (_GNUC_VER == 409)
+#undef _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49
+#define _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49 inline
+#undef _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+#define _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+#endif
+
 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
 #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
 
 #define _LIBCPP_NORETURN __attribute__((noreturn))
 
+#if _GNUC_VER >= 407
+#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
+#endif
+
 #if !__EXCEPTIONS
 #define _LIBCPP_NO_EXCEPTIONS
 #endif
 
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+// constexpr was added to GCC in 4.6
+#if _GNUC_VER < 406
 #define _LIBCPP_HAS_NO_CONSTEXPR
+// Can only use constexpr in c++11 mode.
+#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
+#define _LIBCPP_HAS_NO_CONSTEXPR
+#endif
 
 #define _NOEXCEPT throw()
 #define _NOEXCEPT_(x)
@@ -421,13 +456,19 @@
 using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
 }
 
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
 // Emulation of clang's __has_feature() for GCC on known cases
-#ifndef __has_feature
+#undef __has_feature
+#define __has_feature(__x) __gxx__ ## __x
 
 #define __gxx__cxx_access_control_sfinae          !defined(_LIBCPP_HAS_NO_TRAILING_RETURN) || !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) // Also see usage in 7 tests
 #define __gxx__cxx_alias_templates                !defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
+#define __gxx__cxx_address_sanitizer              !defined(_LIBCPP_HAS_NO_ASAN)
 #define __gxx__cxx_alignas                        0  // Not sure, doesn't matter.
-#define __gxx__cxx_atomic                         0  // (_GNUC_VER >= 409) seems to support _Atomic in -std=c11 not -std=c++11 !
+#define __gxx__cxx_atomic                         (_GNUC_VER >= 407)
 #define __gxx__cxx_attributes                     0  // Not sure. Also see usage in libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp
 #define __gxx__cxx_auto_type                      !defined(_LIBCPP_HAS_NO_AUTO_TYPE)
 #define __gxx__cxx_constexpr                      !defined(_LIBCPP_HAS_NO_CONSTEXPR)
@@ -440,7 +481,7 @@
 #define __gxx__cxx_lambdas                        !defined(_LIBCPP_HAS_NO_LAMBDAS)
 #define __gxx__cxx_noexcept                       0  // Not sure, doesn't matter.
 #define __gxx__cxx_nullptr                        !defined(_LIBCPP_HAS_NO_NULLPTR)
-#define __gxx__cxx_reference_qualified_functions  (_GNUC_VER > 408) || ((_GNUC_VER == 408) && (__GNUC_PATCHLEVEL__ >= 1))  // See usage in libcxx/include/type_traits
+#define __gxx__cxx_reference_qualified_functions  (_GNUC_VER >= 408)  // Since 4.8.1
 #ifdef _LIBCPP_NO_RTTI
 #define __gxx__cxx_rtti                           0
 #else
@@ -464,7 +505,7 @@
 #define __gxx__is_empty                           1  // Not sure.  Also see usage in libcxx/include/type_traits
 #define __gxx__is_enum                            (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
 #define __gxx__is_final                           (_GNUC_VER >= 408)  // Not if 4.7 work. 4.6 certainly not.  Also see usage in libcxx/include/unordered_map,tuple,ext/hash_map,map,memory
-#define __gxx__is_literal                         0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
+#define __gxx__is_literal                         defined(_LIBCPP_IS_LITERAL)
 #define __gxx__is_pod                             (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
 #define __gxx__is_polymorphic                     1  // Not sure.  Also see usage in libcxx/include/type_traits
 #define __gxx__is_standard_layout                 1  // Not sure.  Also see usage in libcxx/include/type_traits
@@ -474,11 +515,8 @@
 #define __gxx__is_union                           (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
 #define __gxx__objc_arc                           defined(_LIBCPP_HAS_OBJC_ARC)
 #define __gxx__objc_arc_weak                      defined(_LIBCPP_HAS_OBJC_ARC_WEAK)
-#define __gxx__underlying_type                    1  // Not sure.  Also see usage in libcxx/include/type_traits
+#define __gxx__underlying_type                    defined(_LIBCPP_UNDERLYING_TYPE)
 
-#define __has_feature(__x) __gxx__ ## __x
-
-#endif // __has_feature
 
 #elif defined(_LIBCPP_MSVC)
 
@@ -493,7 +531,7 @@
 #define _ALIGNAS(x) __declspec(align(x))
 #define _LIBCPP_HAS_NO_VARIADICS
 
-#define _NOEXCEPT throw()
+#define _NOEXCEPT throw ()
 #define _NOEXCEPT_(x)
 #define _NOEXCEPT_OR_FALSE(x) false
 
@@ -505,6 +543,8 @@
 namespace std {
 }
 
+#define _LIBCPP_HAS_NO_ASAN
+
 #elif defined(__IBMCPP__)
 
 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -537,6 +577,8 @@
   }
 }
 
+#define _LIBCPP_HAS_NO_ASAN
+
 #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
 
 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
@@ -544,6 +586,10 @@
 typedef unsigned int   char32_t;
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 
+#ifndef __SIZEOF_INT128__
+#define _LIBCPP_HAS_NO_INT128
+#endif
+
 #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT
 
 template <bool> struct __static_assert_test;
@@ -619,6 +665,10 @@
 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
 #endif
 
+#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
+#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
+#endif
+
 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
@@ -663,6 +713,11 @@
 #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
 #endif
 
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __sanitizer_annotate_contiguous_container(
+  const void *, const void *, const void *, const void *);
+#endif
+
 // Try to find out if RTTI is disabled.
 // g++ and cl.exe have RTTI on by default and define a macro when it is.
 // g++ only defines the macro in 4.3.2 and onwards.
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__locale b/sources/cxx-stl/llvm-libc++/libcxx/include/__locale
index 5c33038..d078810 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/__locale
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__locale
@@ -21,7 +21,7 @@
 #include <locale.h>
 #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
 # include <support/win32/locale_win32.h>
-#elif _AIX
+#elif defined(_AIX)
 # include <support/ibm/xlocale.h>
 #elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
 # include <xlocale.h>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base b/sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base
index abb1c12..122b0b7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__mutex_base
@@ -22,12 +22,15 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if !_LIBCPP_SINGLE_THREADED
+
 class _LIBCPP_TYPE_VIS mutex
 {
     pthread_mutex_t __m_;
 
 public:
     _LIBCPP_INLINE_VISIBILITY
+
 #ifndef _LIBCPP_HAS_NO_CONSTEXPR
      constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {}
 #else
@@ -47,6 +50,7 @@
     typedef pthread_mutex_t* native_handle_type;
     _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
 };
+#endif // !_LIBCPP_SINGLE_THREADED
 
 struct _LIBCPP_TYPE_VIS defer_lock_t {};
 struct _LIBCPP_TYPE_VIS try_to_lock_t {};
@@ -262,6 +266,7 @@
 };
 _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
 
+#if !_LIBCPP_SINGLE_THREADED
 class _LIBCPP_TYPE_VIS condition_variable
 {
     pthread_cond_t __cv_;
@@ -282,7 +287,7 @@
     void notify_one() _NOEXCEPT;
     void notify_all() _NOEXCEPT;
 
-    void wait(unique_lock<mutex>& __lk);
+    void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
     template <class _Predicate>
         void wait(unique_lock<mutex>& __lk, _Predicate __pred);
 
@@ -313,8 +318,9 @@
 
 private:
     void __do_timed_wait(unique_lock<mutex>& __lk,
-                 chrono::time_point<chrono::system_clock, chrono::nanoseconds>);
+       chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
 };
+#endif // !_LIBCPP_SINGLE_THREADED
 
 template <class _To, class _Rep, class _Period>
 inline _LIBCPP_INLINE_VISIBILITY
@@ -332,6 +338,7 @@
     return __r;
 }
 
+#if !_LIBCPP_SINGLE_THREADED
 template <class _Predicate>
 void
 condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred)
@@ -396,6 +403,8 @@
                       _VSTD::move(__pred));
 }
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_END_NAMESPACE_STD
 
 #endif  // _LIBCPP___MUTEX_BASE
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__refstring b/sources/cxx-stl/llvm-libc++/libcxx/include/__refstring
new file mode 100644
index 0000000..6866bf1
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__refstring
@@ -0,0 +1,139 @@
+//===------------------------ __refstring ---------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___REFSTRING
+#define _LIBCPP___REFSTRING
+
+#include <__config>
+#include <cstddef>
+#include <cstring>
+#if __APPLE__
+#include <dlfcn.h>
+#include <mach-o/dyld.h>
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+class _LIBCPP_HIDDEN __libcpp_refstring
+{
+private:
+    const char* str_;
+
+    typedef int count_t;
+
+    struct _Rep_base
+    {
+        std::size_t len;
+        std::size_t cap;
+        count_t     count;
+    };
+
+    static
+    _Rep_base*
+    rep_from_data(const char *data_) _NOEXCEPT
+    {
+        char *data = const_cast<char *>(data_);
+        return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base));
+    }
+    static
+    char *
+    data_from_rep(_Rep_base *rep) _NOEXCEPT
+    {
+        char *data = reinterpret_cast<char *>(rep);
+        return data + sizeof(*rep);
+    }
+
+#if __APPLE__
+    static
+    const char*
+    compute_gcc_empty_string_storage() _NOEXCEPT
+    {
+        void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
+        if (handle == nullptr)
+            return nullptr;
+        void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE");
+        if (sym == nullptr)
+            return nullptr;
+        return data_from_rep(reinterpret_cast<_Rep_base *>(sym));
+    }
+
+    static
+    const char*
+    get_gcc_empty_string_storage() _NOEXCEPT
+    {
+        static const char* p = compute_gcc_empty_string_storage();
+        return p;
+    }
+
+    bool
+    uses_refcount() const
+    {
+        return str_ != get_gcc_empty_string_storage();
+    }
+#else
+    bool
+    uses_refcount() const
+    {
+        return true;
+    }
+#endif
+
+public:
+    explicit __libcpp_refstring(const char* msg) {
+        std::size_t len = strlen(msg);
+        _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1));
+        rep->len = len;
+        rep->cap = len;
+        rep->count = 0;
+        char *data = data_from_rep(rep);
+        std::memcpy(data, msg, len + 1);
+        str_ = data;
+    }
+
+    __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_)
+    {
+        if (uses_refcount())
+            __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+    }
+
+    __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT
+    {
+        bool adjust_old_count = uses_refcount();
+        struct _Rep_base *old_rep = rep_from_data(str_);
+        str_ = s.str_;
+        if (uses_refcount())
+            __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+        if (adjust_old_count)
+        {
+            if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0)
+            {
+                ::operator delete(old_rep);
+            }
+        }
+        return *this;
+    }
+
+    ~__libcpp_refstring()
+    {
+        if (uses_refcount())
+        {
+            _Rep_base* rep = rep_from_data(str_);
+            if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0)
+            {
+                ::operator delete(rep);
+            }
+        }
+    }
+
+    const char* c_str() const _NOEXCEPT {return str_;}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif //_LIBCPP___REFSTRING
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/__tree b/sources/cxx-stl/llvm-libc++/libcxx/include/__tree
index acf8759..8e5447a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/__tree
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/__tree
@@ -1980,9 +1980,9 @@
         __begin_node() = __r.__ptr_;
     --size();
     __node_allocator& __na = __node_alloc();
-    __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
     __tree_remove(__end_node()->__left_,
                   static_cast<__node_base_pointer>(__np));
+    __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
     __node_traits::deallocate(__na, __np, 1);
     return __r;
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm b/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm
index 367489f..303ec7d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm
@@ -281,11 +281,12 @@
 
 template <class RandomAccessIterator>
     void
-    random_shuffle(RandomAccessIterator first, RandomAccessIterator last);
+    random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14
 
 template <class RandomAccessIterator, class RandomNumberGenerator>
     void
-    random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator& rand);
+    random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
+                   RandomNumberGenerator& rand);  // deprecated in C++14
 
 template<class RandomAccessIterator, class UniformRandomNumberGenerator>
     void shuffle(RandomAccessIterator first, RandomAccessIterator last,
@@ -528,19 +529,19 @@
 
 template <class T>
     const T&
-    min(const T& a, const T& b);
+    min(const T& a, const T& b);  // constexpr in C++14
 
 template <class T, class Compare>
     const T&
-    min(const T& a, const T& b, Compare comp);
+    min(const T& a, const T& b, Compare comp);  // constexpr in C++14
 
 template<class T>
     T
-    min(initializer_list<T> t);
+    min(initializer_list<T> t);  // constexpr in C++14
 
 template<class T, class Compare>
     T
-    min(initializer_list<T> t, Compare comp);
+    min(initializer_list<T> t, Compare comp);  // constexpr in C++14
 
 template <class ForwardIterator>
     ForwardIterator
@@ -552,19 +553,19 @@
 
 template <class T>
     const T&
-    max(const T& a, const T& b);
+    max(const T& a, const T& b); // constexpr in C++14
 
 template <class T, class Compare>
     const T&
-    max(const T& a, const T& b, Compare comp);
+    max(const T& a, const T& b, Compare comp);  // constexpr in C++14
 
 template<class T>
     T
-    max(initializer_list<T> t);
+    max(initializer_list<T> t);  // constexpr in C++14
 
 template<class T, class Compare>
     T
-    max(initializer_list<T> t, Compare comp);
+    max(initializer_list<T> t, Compare comp);  // constexpr in C++14
 
 template<class ForwardIterator>
     pair<ForwardIterator, ForwardIterator>
@@ -576,19 +577,19 @@
 
 template<class T>
     pair<const T&, const T&>
-    minmax(const T& a, const T& b);
+    minmax(const T& a, const T& b);  // constexpr in C++14
 
 template<class T, class Compare>
     pair<const T&, const T&>
-    minmax(const T& a, const T& b, Compare comp);
+    minmax(const T& a, const T& b, Compare comp);  // constexpr in C++14
 
 template<class T>
     pair<T, T>
-    minmax(initializer_list<T> t);
+    minmax(initializer_list<T> t);  // constexpr in C++14
 
 template<class T, class Compare>
     pair<T, T>
-    minmax(initializer_list<T> t, Compare comp);
+    minmax(initializer_list<T> t, Compare comp);  // constexpr in C++14
 
 template <class InputIterator1, class InputIterator2>
     bool
@@ -643,6 +644,9 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+// I'd like to replace these with _VSTD::equal_to<void>, but can't because:
+//   * That only works with C++14 and later, and
+//   * We haven't included <functional> here.
 template <class _T1, class _T2 = _T1>
 struct __equal_to
 {
@@ -655,46 +659,59 @@
 template <class _T1>
 struct __equal_to<_T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1>
 struct __equal_to<const _T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1>
 struct __equal_to<_T1, const _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1, class _T2 = _T1>
 struct __less
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
+
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
+
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<_T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<const _T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<_T1, const _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
 template <class _Predicate>
@@ -2505,9 +2522,9 @@
 // min_element
 
 template <class _ForwardIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _ForwardIterator
-min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+__min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     if (__first != __last)
     {
@@ -2519,19 +2536,27 @@
     return __first;
 }
 
+template <class _ForwardIterator, class _Compare>
+inline _LIBCPP_INLINE_VISIBILITY
+_ForwardIterator
+min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+{
+    return __min_element(__first, __last, __comp);
+}
+
 template <class _ForwardIterator>
 inline _LIBCPP_INLINE_VISIBILITY
 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::min_element(__first, __last,
+    return __min_element(__first, __last,
               __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
 // min
 
 template <class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 const _Tp&
 min(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -2539,7 +2564,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 const _Tp&
 min(const _Tp& __a, const _Tp& __b)
 {
@@ -2549,19 +2574,19 @@
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template<class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp
 min(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::min_element(__t.begin(), __t.end(), __comp);
+    return *__min_element(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp
 min(initializer_list<_Tp> __t)
 {
-    return *_VSTD::min_element(__t.begin(), __t.end());
+    return *__min_element(__t.begin(), __t.end(), __less<_Tp>());
 }
 
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
@@ -2569,9 +2594,9 @@
 // max_element
 
 template <class _ForwardIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _ForwardIterator
-max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     if (__first != __last)
     {
@@ -2583,19 +2608,28 @@
     return __first;
 }
 
+
+template <class _ForwardIterator, class _Compare>
+inline _LIBCPP_INLINE_VISIBILITY
+_ForwardIterator
+max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+{
+    return __max_element(__first, __last, __comp);
+}
+
 template <class _ForwardIterator>
 inline _LIBCPP_INLINE_VISIBILITY
 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::max_element(__first, __last,
+    return __max_element(__first, __last,
               __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
 // max
 
 template <class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 const _Tp&
 max(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -2603,7 +2637,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 const _Tp&
 max(const _Tp& __a, const _Tp& __b)
 {
@@ -2613,19 +2647,19 @@
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template<class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp
 max(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::max_element(__t.begin(), __t.end(), __comp);
+    return *__max_element(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp
 max(initializer_list<_Tp> __t)
 {
-    return *_VSTD::max_element(__t.begin(), __t.end());
+    return *__max_element(__t.begin(), __t.end(), __less<_Tp>());
 }
 
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
@@ -2684,13 +2718,14 @@
 std::pair<_ForwardIterator, _ForwardIterator>
 minmax_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::minmax_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
+    return _VSTD::minmax_element(__first, __last,
+              __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
 // minmax
 
 template<class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 pair<const _Tp&, const _Tp&>
 minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -2699,7 +2734,7 @@
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 pair<const _Tp&, const _Tp&>
 minmax(const _Tp& __a, const _Tp& __b)
 {
@@ -2708,24 +2743,49 @@
 
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
-template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-pair<_Tp, _Tp>
-minmax(initializer_list<_Tp> __t)
-{
-    pair<const _Tp*, const _Tp*> __p =
-                                   _VSTD::minmax_element(__t.begin(), __t.end());
-    return pair<_Tp, _Tp>(*__p.first, *__p.second);
-}
-
 template<class _Tp, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 pair<_Tp, _Tp>
 minmax(initializer_list<_Tp> __t, _Compare __comp)
 {
-    pair<const _Tp*, const _Tp*> __p =
-                           _VSTD::minmax_element(__t.begin(), __t.end(), __comp);
-    return pair<_Tp, _Tp>(*__p.first, *__p.second);
+    typedef typename initializer_list<_Tp>::const_iterator _Iter;
+    _Iter __first = __t.begin();
+    _Iter __last  = __t.end();
+    std::pair<_Tp, _Tp> __result ( *__first, *__first );
+
+    ++__first;
+    if (__t.size() % 2 == 0)
+    {
+        if (__comp(*__first,  __result.first))
+            __result.first  = *__first;
+        else
+            __result.second = *__first;
+        ++__first;
+    }
+    
+    while (__first != __last)
+    {
+        _Tp __prev = *__first++;
+        if (__comp(__prev, *__first)) {
+            if (__comp(__prev, __result.first))    __result.first  = __prev;
+            if (__comp(__result.second, *__first)) __result.second = *__first;
+            }
+        else {
+            if (__comp(*__first, __result.first)) __result.first  = *__first;
+            if (__comp(__result.second, __prev))  __result.second = __prev;
+            }
+                
+        __first++;
+    }
+    return __result;
+}
+
+template<class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+pair<_Tp, _Tp>
+minmax(initializer_list<_Tp> __t)
+{
+    return _VSTD::minmax(__t, __less<_Tp>());
 }
 
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/atomic b/sources/cxx-stl/llvm-libc++/libcxx/include/atomic
index f6ab1cb..0c4cd10 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/atomic
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/atomic
@@ -545,6 +545,266 @@
     memory_order_release, memory_order_acq_rel, memory_order_seq_cst
 } memory_order;
 
+#if !defined(__clang__)
+
+namespace __gcc_atomic {
+template <typename T>
+struct __gcc_atomic_t {
+  __gcc_atomic_t() _NOEXCEPT {}
+  explicit __gcc_atomic_t(T value) _NOEXCEPT : __a_value(value) {}
+  T __a_value;
+};
+#define _Atomic(x) __gcc_atomic::__gcc_atomic_t<x>
+
+template <typename T> T __create();
+
+template <typename __Tp, typename __Td>
+typename enable_if<sizeof(__Tp()->__a_value = __create<__Td>()), char>::type
+    __test_atomic_assignable(int);
+template <typename T, typename U>
+__two __test_atomic_assignable(...);
+
+template <typename __Tp, typename __Td>
+struct __can_assign {
+  static const bool value =
+      sizeof(__test_atomic_assignable<__Tp, __Td>(1)) == sizeof(char);
+};
+
+static inline int __to_gcc_order(memory_order __order) {
+  switch (__order) {
+    case memory_order_relaxed:
+      return __ATOMIC_RELAXED;
+    case memory_order_consume:
+      return __ATOMIC_CONSUME;
+    case memory_order_acquire:
+      return __ATOMIC_ACQUIRE;
+    case memory_order_release:
+      return __ATOMIC_RELEASE;
+    case memory_order_acq_rel:
+      return __ATOMIC_ACQ_REL;
+    case memory_order_seq_cst:
+      return __ATOMIC_SEQ_CST;
+  }
+}
+
+} // namespace __gcc_atomic
+
+template <typename _Tp>
+static inline
+typename enable_if<
+    __gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value>::type
+__c11_atomic_init(volatile _Atomic(_Tp)* __a,  _Tp __val) {
+  __a->__a_value = __val;
+}
+
+template <typename _Tp>
+static inline
+typename enable_if<
+    !__gcc_atomic::__can_assign<volatile _Atomic(_Tp)*, _Tp>::value &&
+     __gcc_atomic::__can_assign<         _Atomic(_Tp)*, _Tp>::value>::type
+__c11_atomic_init(volatile _Atomic(_Tp)* __a,  _Tp __val) {
+  // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
+  // the default operator= in an object is not volatile, a byte-by-byte copy
+  // is required.
+  volatile char* to = reinterpret_cast<volatile char*>(&__a->__a_value);
+  volatile char* end = to + sizeof(_Tp);
+  char* from = reinterpret_cast<char*>(&__val);
+  while (to != end) {
+    *to++ = *from++;
+  }
+}
+
+template <typename _Tp>
+static inline void __c11_atomic_init(_Atomic(_Tp)* __a,  _Tp __val) {
+  __a->__a_value = __val;
+}
+
+static inline void __c11_atomic_thread_fence(memory_order __order) {
+  __atomic_thread_fence(__gcc_atomic::__to_gcc_order(__order));
+}
+
+static inline void __c11_atomic_signal_fence(memory_order __order) {
+  __atomic_signal_fence(__gcc_atomic::__to_gcc_order(__order));
+}
+
+static inline bool __c11_atomic_is_lock_free(size_t __size) {
+  return __atomic_is_lock_free(__size, 0);
+}
+
+template <typename _Tp>
+static inline void __c11_atomic_store(volatile _Atomic(_Tp)* __a,  _Tp __val,
+                                      memory_order __order) {
+  return __atomic_store(&__a->__a_value, &__val,
+                        __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline void __c11_atomic_store(_Atomic(_Tp)* __a,  _Tp __val,
+                                      memory_order __order) {
+  return __atomic_store(&__a->__a_value, &__val,
+                        __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_load(volatile _Atomic(_Tp)* __a,
+                                    memory_order __order) {
+  _Tp __ret;
+  __atomic_load(&__a->__a_value, &__ret,
+                __gcc_atomic::__to_gcc_order(__order));
+  return __ret;
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_load(_Atomic(_Tp)* __a, memory_order __order) {
+  _Tp __ret;
+  __atomic_load(&__a->__a_value, &__ret,
+                __gcc_atomic::__to_gcc_order(__order));
+  return __ret;
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_exchange(volatile _Atomic(_Tp)* __a,
+                                        _Tp __value, memory_order __order) {
+  _Tp __ret;
+  __atomic_exchange(&__a->__a_value, &__value, &__ret,
+                    __gcc_atomic::__to_gcc_order(__order));
+  return __ret;
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_exchange(_Atomic(_Tp)* __a, _Tp __value,
+                                        memory_order __order) {
+  _Tp __ret;
+  __atomic_exchange(&__a->__a_value, &__value, &__ret,
+                    __gcc_atomic::__to_gcc_order(__order));
+  return __ret;
+}
+
+template <typename _Tp>
+static inline bool __c11_atomic_compare_exchange_strong(
+    volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
+    memory_order __success, memory_order __failure) {
+  return __atomic_compare_exchange(&__a->__a_value, __expected, &__value,
+                                   false,
+                                   __gcc_atomic::__to_gcc_order(__success),
+                                   __gcc_atomic::__to_gcc_order(__failure));
+}
+
+template <typename _Tp>
+static inline bool __c11_atomic_compare_exchange_strong(
+    _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
+    memory_order __failure) {
+  return __atomic_compare_exchange(&__a->__a_value, __expected, &__value,
+                                   false,
+                                   __gcc_atomic::__to_gcc_order(__success),
+                                   __gcc_atomic::__to_gcc_order(__failure));
+}
+
+template <typename _Tp>
+static inline bool __c11_atomic_compare_exchange_weak(
+    volatile _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value,
+    memory_order __success, memory_order __failure) {
+  return __atomic_compare_exchange(&__a->__a_value, __expected, &__value,
+                                   true,
+                                   __gcc_atomic::__to_gcc_order(__success),
+                                   __gcc_atomic::__to_gcc_order(__failure));
+}
+
+template <typename _Tp>
+static inline bool __c11_atomic_compare_exchange_weak(
+    _Atomic(_Tp)* __a, _Tp* __expected, _Tp __value, memory_order __success,
+    memory_order __failure) {
+  return __atomic_compare_exchange(&__a->__a_value, __expected, &__value,
+                                   true,
+                                   __gcc_atomic::__to_gcc_order(__success),
+                                   __gcc_atomic::__to_gcc_order(__failure));
+}
+
+template <typename _Tp>
+struct __skip_amt { enum {value = 1}; };
+
+template <typename _Tp>
+struct __skip_amt<_Tp*> { enum {value = sizeof(_Tp)}; };
+
+// FIXME: Haven't figured out what the spec says about using arrays with
+// atomic_fetch_add. Force a failure rather than creating bad behavior.
+template <typename _Tp>
+struct __skip_amt<_Tp[]> { };
+template <typename _Tp, int n>
+struct __skip_amt<_Tp[n]> { };
+
+template <typename _Tp, typename _Td>
+static inline _Tp __c11_atomic_fetch_add(volatile _Atomic(_Tp)* __a,
+                                         _Td __delta, memory_order __order) {
+  return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp, typename _Td>
+static inline _Tp __c11_atomic_fetch_add(_Atomic(_Tp)* __a, _Td __delta,
+                                         memory_order __order) {
+  return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp, typename _Td>
+static inline _Tp __c11_atomic_fetch_sub(volatile _Atomic(_Tp)* __a,
+                                         _Td __delta, memory_order __order) {
+  return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp, typename _Td>
+static inline _Tp __c11_atomic_fetch_sub(_Atomic(_Tp)* __a, _Td __delta,
+                                         memory_order __order) {
+  return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_and(volatile _Atomic(_Tp)* __a,
+                                         _Tp __pattern, memory_order __order) {
+  return __atomic_fetch_and(&__a->__a_value, __pattern,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_and(_Atomic(_Tp)* __a,
+                                         _Tp __pattern, memory_order __order) {
+  return __atomic_fetch_and(&__a->__a_value, __pattern,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_or(volatile _Atomic(_Tp)* __a,
+                                        _Tp __pattern, memory_order __order) {
+  return __atomic_fetch_or(&__a->__a_value, __pattern,
+                           __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_or(_Atomic(_Tp)* __a, _Tp __pattern,
+                                        memory_order __order) {
+  return __atomic_fetch_or(&__a->__a_value, __pattern,
+                           __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_xor(volatile _Atomic(_Tp)* __a,
+                                         _Tp __pattern, memory_order __order) {
+  return __atomic_fetch_xor(&__a->__a_value, __pattern,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+template <typename _Tp>
+static inline _Tp __c11_atomic_fetch_xor(_Atomic(_Tp)* __a, _Tp __pattern,
+                                         memory_order __order) {
+  return __atomic_fetch_xor(&__a->__a_value, __pattern,
+                            __gcc_atomic::__to_gcc_order(__order));
+}
+
+#endif // !__clang__
+
 template <class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
 _Tp
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/bitset b/sources/cxx-stl/llvm-libc++/libcxx/include/bitset
index 4cc7dbd..8c278cc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/bitset
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/bitset
@@ -249,9 +249,9 @@
 _LIBCPP_CONSTEXPR
 __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
 #ifndef _LIBCPP_HAS_NO_CONSTEXPR
-#if __SIZE_WIDTH__ == 64
+#if __SIZEOF_SIZE_T__ == 8
     : __first_{__v}
-#elif __SIZE_WIDTH__ == 32
+#elif __SIZEOF_SIZE_T__ == 4
     : __first_{__v, __v >> __bits_per_word}
 #else
 #error This constructor has not been ported to this platform
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/cmath b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
index def49c0..964c672 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
@@ -1208,11 +1208,7 @@
 
 // fma
 
-inline _LIBCPP_INLINE_VISIBILITY float fmaf(float __x, float __y, float __z) _NOEXCEPT {return (float)((double)__x*__y + __z);}
-#ifndef FP_FAST_FMAF
-#define FP_FAST_FMAF
-#endif
-
+using ::fmaf;
 using ::fma;
 
 inline _LIBCPP_INLINE_VISIBILITY float       fma(float __x, float __y, float __z) _NOEXCEPT                   {return fmaf(__x, __y, __z);}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/condition_variable b/sources/cxx-stl/llvm-libc++/libcxx/include/condition_variable
index dc67266..603ee8f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/condition_variable
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/condition_variable
@@ -115,6 +115,8 @@
 #pragma GCC system_header
 #endif
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 class _LIBCPP_TYPE_VIS condition_variable_any
@@ -253,4 +255,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 #endif  // _LIBCPP_CONDITION_VARIABLE
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef b/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef
index 7ef16ff..b4a2283 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef
@@ -35,12 +35,6 @@
 
 #include <__config>
 
-#ifdef __GLIBC__
-#define __need_NULL
-#define __need_ptrdiff_t
-#define __need_size_t
-#endif  // __GLIBC__
-
 #include <stddef.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -52,7 +46,17 @@
 using ::ptrdiff_t;
 using ::size_t;
 
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+// Re-use the compiler's <stddef.h> max_align_t where possible.
+using ::max_align_t;
+#elif defined(__ANDROID__) && !__LP64__
+// If compiler doesn't have max_align_t (ie. clang), and it's on 32-bit Android, typedef max_align_t to
+// "long long" instead of "long double" because 32-bit Android treats "long double" the same as "double"
+// which is smaller than "long long"
+typedef long long max_align_t;
+#else
 typedef long double max_align_t;
+#endif
 
 #ifdef _LIBCPP_HAS_NO_NULLPTR
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/deque b/sources/cxx-stl/llvm-libc++/libcxx/include/deque
index f099000..9b256b7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/deque
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/deque
@@ -1208,7 +1208,7 @@
     deque()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
         {}
-    _LIBCPP_INLINE_VISIBILITY deque(const allocator_type& __a) : __base(__a) {}
+    _LIBCPP_INLINE_VISIBILITY explicit deque(const allocator_type& __a) : __base(__a) {}
     explicit deque(size_type __n);
 #if _LIBCPP_STD_VER > 11
     explicit deque(size_type __n, const _Allocator& __a);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/ext/__hash b/sources/cxx-stl/llvm-libc++/libcxx/include/ext/__hash
index c0523cc..5675d54 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/ext/__hash
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/ext/__hash
@@ -19,8 +19,7 @@
 namespace __gnu_cxx {
 using namespace std;
 
-template <typename _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash : public std::hash<_Tp>
-    { };
+template <typename _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash { };
 
 template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
     : public unary_function<const char*, size_t>
@@ -41,6 +40,96 @@
         return __do_string_hash<const char *>(__c, __c + strlen(__c));
     }
 };
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char>
+    : public unary_function<char, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(char __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
+    : public unary_function<signed char, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(signed char __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
+    : public unary_function<unsigned char, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(unsigned char __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<short>
+    : public unary_function<short, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(short __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
+    : public unary_function<unsigned short, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(unsigned short __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<int>
+    : public unary_function<int, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(int __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
+    : public unary_function<unsigned int, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(unsigned int __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<long>
+    : public unary_function<long, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(long __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
+
+template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
+    : public unary_function<unsigned long, size_t>
+{
+    _LIBCPP_INLINE_VISIBILITY
+    size_t operator()(unsigned long __c) const _NOEXCEPT
+    {
+        return __c;
+    }
+};
 }
 
 #endif  // _LIBCPP_EXT_HASH
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/ext/hash_map b/sources/cxx-stl/llvm-libc++/libcxx/include/ext/hash_map
index 225b72b..36cd595 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/ext/hash_map
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/ext/hash_map
@@ -430,9 +430,9 @@
     typedef const value_type&                                    reference;
     typedef typename __pointer_traits::template
 #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
-            rebind<value_type>
+            rebind<const value_type>
 #else
-            rebind<value_type>::other
+            rebind<const value_type>::other
 #endif
                                                                  pointer;
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/functional b/sources/cxx-stl/llvm-libc++/libcxx/include/functional
index 891ed46..167790b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/functional
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/functional
@@ -1617,21 +1617,22 @@
     if (__not_null(__f))
     {
         typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _FF;
-        if (sizeof(_FF) <= sizeof(__buf_) && is_nothrow_copy_constructible<_Fp>::value)
+        typedef typename __alloc_traits::template
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+            rebind_alloc<_FF>
+#else
+            rebind_alloc<_FF>::other
+#endif
+            _Ap;
+        _Ap __a(__a0);
+        if (sizeof(_FF) <= sizeof(__buf_) && 
+            is_nothrow_copy_constructible<_Fp>::value && is_nothrow_copy_constructible<_Ap>::value)
         {
             __f_ = (__base*)&__buf_;
-            ::new (__f_) _FF(_VSTD::move(__f));
+            ::new (__f_) _FF(_VSTD::move(__f), _Alloc(__a));
         }
         else
         {
-            typedef typename __alloc_traits::template
-#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
-                rebind_alloc<_FF>
-#else
-                rebind_alloc<_FF>::other
-#endif
-                                                         _Ap;
-            _Ap __a(__a0);
             typedef __allocator_destructor<_Ap> _Dp;
             unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
             ::new (__hold.get()) _FF(_VSTD::move(__f), _Alloc(__a));
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/future b/sources/cxx-stl/llvm-libc++/libcxx/include/future
index 73d5456..9a3af54 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/future
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/future
@@ -374,6 +374,8 @@
 #pragma GCC system_header
 #endif
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 //enum class future_errc
@@ -405,7 +407,7 @@
 
 #ifndef _LIBCPP_HAS_NO_STRONG_ENUMS
 
-#ifdef _LIBCXX_UNDERLYING_TYPE
+#ifdef _LIBCPP_UNDERLYING_TYPE
 typedef underlying_type<launch>::type __launch_underlying_type;
 #else
 typedef int __launch_underlying_type;
@@ -1872,7 +1874,7 @@
 __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
     : __f_(nullptr)
 {
-    typedef typename remove_reference<_Fp>::type _FR;
+    typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
     typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF;
     if (sizeof(_FF) <= sizeof(__buf_))
     {
@@ -1897,7 +1899,7 @@
     : __f_(nullptr)
 {
     typedef allocator_traits<_Alloc> __alloc_traits;
-    typedef typename remove_reference<_Fp>::type _FR;
+    typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
     typedef __packaged_task_func<_FR, _Alloc, _Rp(_ArgTypes...)> _FF;
     if (sizeof(_FF) <= sizeof(__buf_))
     {
@@ -2612,4 +2614,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 #endif  // _LIBCPP_FUTURE
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/iomanip b/sources/cxx-stl/llvm-libc++/libcxx/include/iomanip
index e334c7d..a5042c7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/iomanip
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/iomanip
@@ -519,15 +519,16 @@
 __quoted_output ( basic_ostream<_CharT, _Traits> &__os, 
         _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape )
 {
-    __os << __delim;
+    _VSTD::basic_string<_CharT, _Traits> __str;
+    __str.push_back(__delim);
     for ( ; __first != __last; ++ __first )
     {
         if (_Traits::eq (*__first, __escape) || _Traits::eq (*__first, __delim))
-            __os << __escape;
-        __os << *__first;
+            __str.push_back(__escape);
+        __str.push_back(*__first);
     }
-    __os << __delim;
-    return __os;
+    __str.push_back(__delim);
+    return __put_character_sequence(__os, __str.data(), __str.size());
 }
 
 template <class _CharT, class _Traits, class _String>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/iterator b/sources/cxx-stl/llvm-libc++/libcxx/include/iterator
index c6dd033..f338e01 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/iterator
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/iterator
@@ -138,6 +138,8 @@
 reverse_iterator<Iterator>
 operator+(typename reverse_iterator<Iterator>::difference_type n, const reverse_iterator<Iterator>& x);
 
+template <class Iterator> reverse_iterator<Iterator> make_reverse_iterator(Iterator i); // C++14
+
 template <class Container>
 class back_insert_iterator
 {
@@ -327,6 +329,7 @@
 */
 
 #include <__config>
+#include <__functional_base>
 #include <type_traits>
 #include <cstddef>
 #include <iosfwd>
@@ -534,7 +537,7 @@
                       typename iterator_traits<_Iter>::reference>
 {
 private:
-    mutable _Iter __t;
+    mutable _Iter __t;  // no longer used as of LWG #2360, not removed due to ABI break
 protected:
     _Iter current;
 public:
@@ -548,8 +551,8 @@
     template <class _Up> _LIBCPP_INLINE_VISIBILITY reverse_iterator(const reverse_iterator<_Up>& __u)
         : __t(__u.base()), current(__u.base()) {}
     _LIBCPP_INLINE_VISIBILITY _Iter base() const {return current;}
-    _LIBCPP_INLINE_VISIBILITY reference operator*() const {__t = current; return *--__t;}
-    _LIBCPP_INLINE_VISIBILITY pointer  operator->() const {return &(operator*());}
+    _LIBCPP_INLINE_VISIBILITY reference operator*() const {_Iter __tmp = current; return *--__tmp;}
+    _LIBCPP_INLINE_VISIBILITY pointer  operator->() const {return _VSTD::addressof(operator*());}
     _LIBCPP_INLINE_VISIBILITY reverse_iterator& operator++() {--current; return *this;}
     _LIBCPP_INLINE_VISIBILITY reverse_iterator  operator++(int)
         {reverse_iterator __tmp(*this); --current; return __tmp;}
@@ -632,6 +635,15 @@
     return reverse_iterator<_Iter>(__x.base() - __n);
 }
 
+#if _LIBCPP_STD_VER > 11
+template <class _Iter>
+inline _LIBCPP_INLINE_VISIBILITY
+reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
+{
+    return reverse_iterator<_Iter>(__i);
+}
+#endif
+
 template <class _Container>
 class _LIBCPP_TYPE_VIS_ONLY back_insert_iterator
     : public iterator<output_iterator_tag,
@@ -645,7 +657,7 @@
 public:
     typedef _Container container_type;
 
-    _LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(&__x) {}
+    _LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
     _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(const typename _Container::value_type& __value_)
         {container->push_back(__value_); return *this;}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -678,7 +690,7 @@
 public:
     typedef _Container container_type;
 
-    _LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(&__x) {}
+    _LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
     _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(const typename _Container::value_type& __value_)
         {container->push_front(__value_); return *this;}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -713,7 +725,7 @@
     typedef _Container container_type;
 
     _LIBCPP_INLINE_VISIBILITY insert_iterator(_Container& __x, typename _Container::iterator __i)
-        : container(&__x), iter(__i) {}
+        : container(_VSTD::addressof(__x)), iter(__i) {}
     _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(const typename _Container::value_type& __value_)
         {iter = container->insert(iter, __value_); ++iter; return *this;}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -1386,7 +1398,7 @@
 }
 
 template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp*
 begin(_Tp (&__array)[_Np])
 {
@@ -1394,7 +1406,7 @@
 }
 
 template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 _Tp*
 end(_Tp (&__array)[_Np])
 {
@@ -1466,17 +1478,17 @@
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 auto cbegin(const _Cp& __c) -> decltype(begin(__c))
 {
-    return _VSTD::begin(__c);
+    return begin(__c);
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 auto cend(const _Cp& __c) -> decltype(end(__c))
 {
-    return _VSTD::end(__c);
+    return end(__c);
 }
 
 template <class _Cp>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/limits b/sources/cxx-stl/llvm-libc++/libcxx/include/limits
index d917c57..2216966 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/limits
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/limits
@@ -768,7 +768,7 @@
 template <class _Tp>
     _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
 template <class _Tp>
-    const int numeric_limits<const volatile _Tp>::max_digits10;
+    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
 template <class _Tp>
     _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
 template <class _Tp>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/locale b/sources/cxx-stl/llvm-libc++/libcxx/include/locale
index cdfe120..60c6182 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/locale
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/locale
@@ -417,7 +417,7 @@
 //  and failbit is set in __err.
 //  Else an iterator pointing to the matching keyword is found.  If more than
 //  one keyword matches, an iterator to the first matching keyword is returned.
-//  If on exit __b == __e, eofbit is set in __err.  If __case_senstive is false,
+//  If on exit __b == __e, eofbit is set in __err.  If __case_sensitive is false,
 //  __ct is used to force to lower case before comparing characters.
 //  Examples:
 //  Keywords:  "a", "abb"
@@ -1180,11 +1180,11 @@
             break;
     }
     // Stage 3
-    __a[sizeof(__a)-1] = 0;
+    __buf.resize(__a_end - __a);
 #ifdef _LIBCPP_LOCALE__L_EXTENSIONS
-    if (sscanf_l(__a, _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
+    if (sscanf_l(__buf.c_str(), _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
 #else
-    if (__sscanf_l(__a, __cloc(), "%p", &__v) != 1)
+    if (__sscanf_l(__buf.c_str(), __cloc(), "%p", &__v) != 1)
 #endif
         __err = ios_base::failbit;
     // EOF checked
@@ -2038,7 +2038,7 @@
 locale::id
 time_get<_CharT, _InputIterator>::id;
 
-// time_get primatives
+// time_get primitives
 
 template <class _CharT, class _InputIterator>
 void
@@ -2259,7 +2259,7 @@
         __err |= ios_base::eofbit;
 }
 
-// time_get end primatives
+// time_get end primitives
 
 template <class _CharT, class _InputIterator>
 _InputIterator
@@ -2799,7 +2799,7 @@
     explicit moneypunct_byname(const char* __nm, size_t __refs = 0)
         : moneypunct<_CharT, _International>(__refs) {init(__nm);}
 
-    _LIBCPP_ALWAYS_INLINE
+    _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49
     explicit moneypunct_byname(const string& __nm, size_t __refs = 0)
         : moneypunct<_CharT, _International>(__refs) {init(__nm.c_str());}
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/map b/sources/cxx-stl/llvm-libc++/libcxx/include/map
index 9779b70..5534e40 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/map
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/map
@@ -835,11 +835,18 @@
     typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
 
     _LIBCPP_INLINE_VISIBILITY
-    explicit map(const key_compare& __comp = key_compare())
+    map()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
+        : __tree_(__vc(key_compare())) {}
+
+    _LIBCPP_INLINE_VISIBILITY
+    explicit map(const key_compare& __comp)
+        _NOEXCEPT_(
+            is_nothrow_default_constructible<allocator_type>::value &&
+            is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
     _LIBCPP_INLINE_VISIBILITY
@@ -1568,11 +1575,18 @@
     typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
 
     _LIBCPP_INLINE_VISIBILITY
-    explicit multimap(const key_compare& __comp = key_compare())
+    multimap()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
+        : __tree_(__vc(key_compare())) {}
+
+    _LIBCPP_INLINE_VISIBILITY
+    explicit multimap(const key_compare& __comp)
+        _NOEXCEPT_(
+            is_nothrow_default_constructible<allocator_type>::value &&
+            is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
     _LIBCPP_INLINE_VISIBILITY
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/memory b/sources/cxx-stl/llvm-libc++/libcxx/include/memory
index b9f61c2..d19bb7f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/memory
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/memory
@@ -479,6 +479,8 @@
     template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
     weak_ptr(weak_ptr const& r) noexcept;
     template<class Y> weak_ptr(weak_ptr<Y> const& r) noexcept;
+    weak_ptr(weak_ptr&& r) noexcept;                      // C++14
+    template<class Y> weak_ptr(weak_ptr<Y>&& r) noexcept; // C++14
 
     // destructor
     ~weak_ptr();
@@ -487,6 +489,8 @@
     weak_ptr& operator=(weak_ptr const& r) noexcept;
     template<class Y> weak_ptr& operator=(weak_ptr<Y> const& r) noexcept;
     template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
+    weak_ptr& operator=(weak_ptr&& r) noexcept;                      // C++14
+    template<class Y> weak_ptr& operator=(weak_ptr<Y>&& r) noexcept; // C++14
 
     // modifiers
     void swap(weak_ptr& r) noexcept;
@@ -2397,13 +2401,14 @@
 struct __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false>
     : false_type {};
 
-template <class _Ptr1, class _Ptr2, bool = is_scalar<_Ptr1>::value &&
-                                         !is_pointer<_Ptr1>::value>
+template <class _Ptr1, class _Ptr2, bool = is_pointer<_Ptr1>::value ||
+                                           is_same<_Ptr1, _Ptr2>::value ||
+                                           __has_element_type<_Ptr1>::value>
 struct __same_or_less_cv_qualified
     : __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
 
 template <class _Ptr1, class _Ptr2>
-struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, true>
+struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, false>
     : false_type {};
 
 // default_delete
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/mutex b/sources/cxx-stl/llvm-libc++/libcxx/include/mutex
index e0c02ad..b7a6709 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/mutex
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/mutex
@@ -187,6 +187,8 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if !_LIBCPP_SINGLE_THREADED
+
 class _LIBCPP_TYPE_VIS recursive_mutex
 {
     pthread_mutex_t __m_;
@@ -425,6 +427,8 @@
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 struct _LIBCPP_TYPE_VIS once_flag;
 
 #ifndef _LIBCPP_HAS_NO_VARIADICS
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/ostream b/sources/cxx-stl/llvm-libc++/libcxx/include/ostream
index 20587a1..9d96fd8 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/ostream
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/ostream
@@ -765,7 +765,7 @@
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
 {
-	return _VSTD::__put_character_sequence(__os, &__c, 1);
+    return _VSTD::__put_character_sequence(__os, &__c, 1);
 }
 
 template<class _CharT, class _Traits>
@@ -805,28 +805,28 @@
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, char __c)
 {
-	return _VSTD::__put_character_sequence(__os, &__c, 1);
+    return _VSTD::__put_character_sequence(__os, &__c, 1);
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
 {
-	return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
+    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
 {
-	return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
+    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
 }
 
 template<class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
 {
-	return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
+    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
 }
 
 template<class _CharT, class _Traits>
@@ -879,23 +879,23 @@
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
 {
-	return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
+    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
 {
-	const char *__s = (const char *) __str;
-	return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
+    const char *__s = (const char *) __str;
+    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
 {
-	const char *__s = (const char *) __str;
-	return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
+    const char *__s = (const char *) __str;
+    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
 }
 
 template <class _CharT, class _Traits>
@@ -1065,7 +1065,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const basic_string<_CharT, _Traits, _Allocator>& __str)
 {
-	return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
+    return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
 }
 
 template <class _CharT, class _Traits>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/regex b/sources/cxx-stl/llvm-libc++/libcxx/include/regex
index 8c95145..7d922cb 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/regex
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/regex
@@ -437,7 +437,7 @@
 public:
     typedef sub_match<BidirectionalIterator>                  value_type;
     typedef const value_type&                                 const_reference;
-    typedef const_reference                                   reference;
+    typedef value_type&                                       reference;
     typedef /implementation-defined/                          const_iterator;
     typedef const_iterator                                    iterator;
     typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
@@ -546,6 +546,13 @@
                 const basic_regex<charT, traits>& e,
                 regex_constants::match_flag_type flags = regex_constants::match_default);
 
+template <class ST, class SA, class Allocator, class charT, class traits>
+    bool
+    regex_match(const basic_string<charT, ST, SA>&& s,
+                match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
+                const basic_regex<charT, traits>& e,
+                regex_constants::match_flag_type flags = regex_constants::match_default) = delete; // C++14
+
 template <class charT, class traits>
     bool
     regex_match(const charT* str, const basic_regex<charT, traits>& e,
@@ -594,6 +601,13 @@
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
 
+template <class ST, class SA, class Allocator, class charT, class traits>
+    bool
+    regex_search(const basic_string<charT, ST, SA>&& s,
+                 match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
+                 const basic_regex<charT, traits>& e,
+                 regex_constants::match_flag_type flags = regex_constants::match_default) = delete; // C++14
+
 template <class OutputIterator, class BidirectionalIterator,
           class traits, class charT, class ST, class SA>
     OutputIterator
@@ -655,6 +669,10 @@
     regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
                    const regex_type& re,
                    regex_constants::match_flag_type m = regex_constants::match_default);
+    regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
+                   const regex_type&& __re,
+                   regex_constants::match_flag_type __m 
+                                     = regex_constants::match_default) = delete; // C++14
     regex_iterator(const regex_iterator&);
     regex_iterator& operator=(const regex_iterator&);
 
@@ -691,15 +709,28 @@
                          const regex_type& re, int submatch = 0,
                          regex_constants::match_flag_type m = regex_constants::match_default);
     regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+                         const regex_type&& re, int submatch = 0,
+                         regex_constants::match_flag_type m = regex_constants::match_default) = delete; // C++14
+    regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
                          const regex_type& re, const vector<int>& submatches,
                          regex_constants::match_flag_type m = regex_constants::match_default);
     regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+                         const regex_type&& re, const vector<int>& submatches,
+                         regex_constants::match_flag_type m = regex_constants::match_default) = delete; // C++14
+    regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
                          const regex_type& re, initializer_list<int> submatches,
                          regex_constants::match_flag_type m = regex_constants::match_default);
+    regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+                         const regex_type&& re, initializer_list<int> submatches,
+                         regex_constants::match_flag_type m = regex_constants::match_default) = delete; // C++14
     template <size_t N>
         regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
                              const regex_type& re, const int (&submatches)[N],
                              regex_constants::match_flag_type m = regex_constants::match_default);
+    template <size_t N>
+        regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+                             const regex_type& re, const int (&submatches)[N],
+                             regex_constants::match_flag_type m = regex_constants::match_default) = delete // C++14;
     regex_token_iterator(const regex_token_iterator&);
     regex_token_iterator& operator=(const regex_token_iterator&);
 
@@ -933,7 +964,11 @@
     typedef locale                  locale_type;
     typedef ctype_base::mask        char_class_type;
 
-    static const char_class_type __regex_word = 0x80;
+    // Note that Android's whitespace bit, aka. _B (see locale_android.cpp for
+    // the details) was unfortunately defined as 0x80 which made the whitespace
+    // character be recognized as a word.
+    static const char_class_type __regex_word = 0x200;
+
 private:
     locale __loc_;
     const ctype<char_type>* __ct_;
@@ -4510,6 +4545,13 @@
                 __push_char(_CharT(__sum));
             ++__first;
             break;
+        case '0':
+            if (__str)
+                *__str = _CharT(0);
+            else
+                __push_char(_CharT(0));
+            ++__first;
+            break;
         default:
             if (*__first != '_' && !__traits_.isctype(*__first, ctype_base::alnum))
             {
@@ -5232,7 +5274,7 @@
 public:
     _BidirectionalIterator __position_start_;
     typedef const value_type&                                 const_reference;
-    typedef const_reference                                   reference;
+    typedef value_type&                                       reference;
     typedef typename __container_type::const_iterator         const_iterator;
     typedef const_iterator                                    iterator;
     typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
@@ -5943,6 +5985,15 @@
     return __r;
 }
 
+#if _LIBCPP_STD_VER > 11
+template <class _ST, class _SA, class _Ap, class _Cp, class _Tp>
+bool
+regex_search(const basic_string<_Cp, _ST, _SA>&& __s,
+             match_results<typename basic_string<_Cp, _ST, _SA>::const_iterator, _Ap>&,
+             const basic_regex<_Cp, _Tp>& __e,
+             regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; 
+#endif
+
 // regex_match
 
 template <class _BidirectionalIterator, class _Allocator, class _CharT, class _Traits>
@@ -5995,6 +6046,16 @@
     return _VSTD::regex_match(__s.begin(), __s.end(), __m, __e, __flags);
 }
 
+#if _LIBCPP_STD_VER > 11
+template <class _ST, class _SA, class _Allocator, class _CharT, class _Traits>
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+regex_match(const basic_string<_CharT, _ST, _SA>&& __s,
+            match_results<typename basic_string<_CharT, _ST, _SA>::const_iterator, _Allocator>& __m,
+            const basic_regex<_CharT, _Traits>& __e,
+            regex_constants::match_flag_type __flags = regex_constants::match_default) = delete; 
+#endif
+
 template <class _CharT, class _Traits>
 inline _LIBCPP_INLINE_VISIBILITY
 bool
@@ -6040,7 +6101,14 @@
     regex_iterator();
     regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                    const regex_type& __re,
-                   regex_constants::match_flag_type __m = regex_constants::match_default);
+                   regex_constants::match_flag_type __m
+                                              = regex_constants::match_default);
+#if _LIBCPP_STD_VER > 11
+    regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
+                   const regex_type&& __re,
+                   regex_constants::match_flag_type __m 
+                                     = regex_constants::match_default) = delete;
+#endif
 
     bool operator==(const regex_iterator& __x) const;
     _LIBCPP_INLINE_VISIBILITY
@@ -6156,16 +6224,38 @@
                          const regex_type& __re, int __submatch = 0,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
+#if _LIBCPP_STD_VER > 11
+    regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
+                         const regex_type&& __re, int __submatch = 0,
+                         regex_constants::match_flag_type __m =
+                                       regex_constants::match_default) = delete;
+#endif
+
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type& __re, const vector<int>& __submatches,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
+#if _LIBCPP_STD_VER > 11
+    regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
+                         const regex_type&& __re, const vector<int>& __submatches,
+                         regex_constants::match_flag_type __m =
+                                     regex_constants::match_default) = delete;
+#endif
+
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type& __re,
                          initializer_list<int> __submatches,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
+
+#if _LIBCPP_STD_VER > 11
+    regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
+                         const regex_type&& __re,
+                         initializer_list<int> __submatches,
+                         regex_constants::match_flag_type __m =
+                                       regex_constants::match_default) = delete;
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     template <size_t _Np>
         regex_token_iterator(_BidirectionalIterator __a,
@@ -6174,6 +6264,16 @@
                              const int (&__submatches)[_Np],
                              regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
+#if _LIBCPP_STD_VER > 11
+    template <std::size_t _Np>
+        regex_token_iterator(_BidirectionalIterator __a,
+                             _BidirectionalIterator __b,
+                             const regex_type&& __re,
+                             const int (&__submatches)[_Np],
+                             regex_constants::match_flag_type __m =
+                                      regex_constants::match_default) = delete;
+#endif
+
     regex_token_iterator(const regex_token_iterator&);
     regex_token_iterator& operator=(const regex_token_iterator&);
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/set b/sources/cxx-stl/llvm-libc++/libcxx/include/set
index a537c5f..b9e776d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/set
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/set
@@ -425,14 +425,22 @@
     typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
 
     _LIBCPP_INLINE_VISIBILITY
-    explicit set(const value_compare& __comp = value_compare())
+    set()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
-        : __tree_(__comp) {}
+        : __tree_(value_compare()) {}
+
     _LIBCPP_INLINE_VISIBILITY
-    set(const value_compare& __comp, const allocator_type& __a)
+    explicit set(const value_compare& __comp)
+        _NOEXCEPT_(
+            is_nothrow_default_constructible<allocator_type>::value &&
+            is_nothrow_copy_constructible<key_compare>::value)
+        : __tree_(__comp) {}
+
+    _LIBCPP_INLINE_VISIBILITY
+    explicit set(const value_compare& __comp, const allocator_type& __a)
         : __tree_(__comp, __a) {}
     template <class _InputIterator>
         _LIBCPP_INLINE_VISIBILITY
@@ -822,14 +830,22 @@
 
     // construct/copy/destroy:
     _LIBCPP_INLINE_VISIBILITY
-    explicit multiset(const value_compare& __comp = value_compare())
+    multiset()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_default_constructible<key_compare>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
-        : __tree_(__comp) {}
+        : __tree_(value_compare()) {}
+
     _LIBCPP_INLINE_VISIBILITY
-    multiset(const value_compare& __comp, const allocator_type& __a)
+    explicit multiset(const value_compare& __comp)
+        _NOEXCEPT_(
+            is_nothrow_default_constructible<allocator_type>::value &&
+            is_nothrow_copy_constructible<key_compare>::value)
+        : __tree_(__comp) {}
+
+    _LIBCPP_INLINE_VISIBILITY
+    explicit multiset(const value_compare& __comp, const allocator_type& __a)
         : __tree_(__comp, __a) {}
     template <class _InputIterator>
         _LIBCPP_INLINE_VISIBILITY
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/shared_mutex b/sources/cxx-stl/llvm-libc++/libcxx/include/shared_mutex
index 5b1f53a..fe16ee7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/shared_mutex
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/shared_mutex
@@ -19,14 +19,14 @@
 namespace std
 {
 
-class shared_mutex
+class shared_timed_mutex
 {
 public:
-    shared_mutex();
-    ~shared_mutex();
+    shared_timed_mutex();
+    ~shared_timed_mutex();
 
-    shared_mutex(const shared_mutex&) = delete;
-    shared_mutex& operator=(const shared_mutex&) = delete;
+    shared_timed_mutex(const shared_timed_mutex&) = delete;
+    shared_timed_mutex& operator=(const shared_timed_mutex&) = delete;
 
     // Exclusive ownership
     void lock(); // blocking
@@ -112,9 +112,11 @@
 #pragma GCC system_header
 #endif
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS shared_mutex
+class _LIBCPP_TYPE_VIS shared_timed_mutex
 {
     mutex               __mut_;
     condition_variable  __gate1_;
@@ -124,11 +126,11 @@
     static const unsigned __write_entered_ = 1U << (sizeof(unsigned)*__CHAR_BIT__ - 1);
     static const unsigned __n_readers_ = ~__write_entered_;
 public:
-    shared_mutex();
-    _LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
+    shared_timed_mutex();
+    _LIBCPP_INLINE_VISIBILITY ~shared_timed_mutex() = default;
 
-    shared_mutex(const shared_mutex&) = delete;
-    shared_mutex& operator=(const shared_mutex&) = delete;
+    shared_timed_mutex(const shared_timed_mutex&) = delete;
+    shared_timed_mutex& operator=(const shared_timed_mutex&) = delete;
 
     // Exclusive ownership
     void lock();
@@ -163,7 +165,7 @@
 
 template <class _Clock, class _Duration>
 bool
-shared_mutex::try_lock_until(
+shared_timed_mutex::try_lock_until(
                         const chrono::time_point<_Clock, _Duration>& __abs_time)
 {
     unique_lock<mutex> __lk(__mut_);
@@ -198,7 +200,7 @@
 
 template <class _Clock, class _Duration>
 bool
-shared_mutex::try_lock_shared_until(
+shared_timed_mutex::try_lock_shared_until(
                         const chrono::time_point<_Clock, _Duration>& __abs_time)
 {
     unique_lock<mutex> __lk(__mut_);
@@ -414,6 +416,8 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
+#endif  // _LIBC_HAS_PTHREADS
+
 #endif  // _LIBCPP_STD_VER > 11
 
 #endif  // _LIBCPP_SHARED_MUTEX
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/stdexcept b/sources/cxx-stl/llvm-libc++/libcxx/include/stdexcept
index ef5de59..5fc912a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/stdexcept
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/stdexcept
@@ -50,6 +50,14 @@
 #pragma GCC system_header
 #endif
 
+#ifndef _LIBCPP___REFSTRING
+_LIBCPP_BEGIN_NAMESPACE_STD
+class _LIBCPP_HIDDEN __libcpp_refstring {
+    const char *__imp_;
+};
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
 namespace std  // purposefully not using versioning namespace
 {
 
@@ -57,7 +65,7 @@
     : public exception
 {
 private:
-    void* __imp_;
+    _VSTD::__libcpp_refstring __imp_;
 public:
     explicit logic_error(const string&);
     explicit logic_error(const char*);
@@ -74,7 +82,7 @@
     : public exception
 {
 private:
-    void* __imp_;
+    _VSTD::__libcpp_refstring __imp_;
 public:
     explicit runtime_error(const string&);
     explicit runtime_error(const char*);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/string b/sources/cxx-stl/llvm-libc++/libcxx/include/string
index f93fac1..ba83e22 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/string
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/string
@@ -161,7 +161,7 @@
     basic_string& operator+=(initializer_list<value_type>);
 
     basic_string& append(const basic_string& str);
-    basic_string& append(const basic_string& str, size_type pos, size_type n);
+    basic_string& append(const basic_string& str, size_type pos, size_type n=npos); //C++14
     basic_string& append(const value_type* s, size_type n);
     basic_string& append(const value_type* s);
     basic_string& append(size_type n, value_type c);
@@ -178,7 +178,7 @@
 
     basic_string& assign(const basic_string& str);
     basic_string& assign(basic_string&& str);
-    basic_string& assign(const basic_string& str, size_type pos, size_type n);
+    basic_string& assign(const basic_string& str, size_type pos, size_type n=npos); // C++14
     basic_string& assign(const value_type* s, size_type n);
     basic_string& assign(const value_type* s);
     basic_string& assign(size_type n, value_type c);
@@ -189,7 +189,7 @@
     basic_string& insert(size_type pos1, const basic_string& str);
     basic_string& insert(size_type pos1, const basic_string& str,
                          size_type pos2, size_type n);
-    basic_string& insert(size_type pos, const value_type* s, size_type n);
+    basic_string& insert(size_type pos, const value_type* s, size_type n=npos); //C++14
     basic_string& insert(size_type pos, const value_type* s);
     basic_string& insert(size_type pos, size_type n, value_type c);
     iterator      insert(const_iterator p, value_type c);
@@ -204,7 +204,7 @@
 
     basic_string& replace(size_type pos1, size_type n1, const basic_string& str);
     basic_string& replace(size_type pos1, size_type n1, const basic_string& str,
-                          size_type pos2, size_type n2);
+                          size_type pos2, size_type n2=npos); // C++14
     basic_string& replace(size_type pos, size_type n1, const value_type* s, size_type n2);
     basic_string& replace(size_type pos, size_type n1, const value_type* s);
     basic_string& replace(size_type pos, size_type n1, size_type n2, value_type c);
@@ -261,7 +261,7 @@
     int compare(const basic_string& str) const noexcept;
     int compare(size_type pos1, size_type n1, const basic_string& str) const;
     int compare(size_type pos1, size_type n1, const basic_string& str,
-                size_type pos2, size_type n2) const;
+                size_type pos2, size_type n2=npos) const; // C++14
     int compare(const value_type* s) const noexcept;
     int compare(size_type pos1, size_type n1, const value_type* s) const;
     int compare(size_type pos1, size_type n1, const value_type* s, size_type n2) const;
@@ -990,9 +990,81 @@
 
 // helper fns for basic_string
 
+// __find
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find(const _CharT *__p, _SizeT __sz, 
+             _CharT __c, _SizeT __pos) _NOEXCEPT
+{
+    if (__pos >= __sz)
+        return __npos;
+    const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c);
+    if (__r == 0)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find(const _CharT *__p, _SizeT __sz, 
+       const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+{
+    if (__pos > __sz || __sz - __pos < __n)
+        return __npos;
+    if (__n == 0)
+        return __pos;
+//     if (__n == 1)
+//     	return _VSTD::__find<_CharT, _SizeT, _Traits, __npos>(__p, __sz, *__s, __pos);
+    const _CharT* __r = 
+            _VSTD::search(__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq);
+    if (__r == __p + __sz)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+
+// __rfind
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__rfind(const _CharT *__p, _SizeT __sz, 
+              _CharT __c, _SizeT __pos) _NOEXCEPT
+{
+    if (__sz < 1)
+    	return __npos;
+	if (__pos < __sz)
+		++__pos;
+	else
+		__pos = __sz;
+	for (const _CharT* __ps = __p + __pos; __ps != __p;)
+	{
+		if (_Traits::eq(*--__ps, __c))
+			return static_cast<_SizeT>(__ps - __p);
+	}
+    return __npos;
+}
+
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__rfind(const _CharT *__p, _SizeT __sz, 
+        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+{
+    __pos = _VSTD::min(__pos, __sz);
+    if (__n < __sz - __pos)
+        __pos += __n;
+    else
+        __pos = __sz;
+    const _CharT* __r = _VSTD::find_end(__p, __p + __pos, __s, __s + __n, _Traits::eq);
+    if (__n > 0 && __r == __p + __pos)
+        return __npos;
+    return static_cast<_SizeT>(__r - __p);
+}
+
+// __find_first_of
+template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_of(const _CharT *__p, _SizeT __sz,
+                const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos >= __sz || __n == 0)
         return __npos;
@@ -1003,9 +1075,12 @@
     return static_cast<_SizeT>(__r - __p);
 }
 
+
+// __find_last_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY 
+__find_last_of(const _CharT *__p, _SizeT __sz,
+               const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
     {
     if (__n != 0)
     {
@@ -1024,9 +1099,11 @@
 }
 
 
+// __find_first_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_not_of(const _CharT *__p, _SizeT __sz,
-    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_not_of(const _CharT *__p, _SizeT __sz,
+                    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos < __sz)
     {
@@ -1040,8 +1117,9 @@
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_first_not_of(const _CharT *__p, _SizeT __sz,
-    _CharT __c, _SizeT __pos) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_first_not_of(const _CharT *__p, _SizeT __sz,
+                          _CharT __c, _SizeT __pos) _NOEXCEPT
 {
     if (__pos < __sz)
     {
@@ -1054,9 +1132,11 @@
 }
 
 
+// __find_last_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_not_of(const _CharT *__p, _SizeT __sz,
-        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_last_not_of(const _CharT *__p, _SizeT __sz,
+                   const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos < __sz)
         ++__pos;
@@ -1070,8 +1150,9 @@
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-_SizeT _LIBCPP_INLINE_VISIBILITY __find_last_not_of(const _CharT *__p, _SizeT __sz,
-        _CharT __c, _SizeT __pos) _NOEXCEPT
+_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+__find_last_not_of(const _CharT *__p, _SizeT __sz,
+                         _CharT __c, _SizeT __pos) _NOEXCEPT
 {
     if (__pos < __sz)
         ++__pos;
@@ -1287,26 +1368,26 @@
 public:
     static const size_type npos = -1;
 
-    _LIBCPP_INLINE_VISIBILITY basic_string()
+    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 basic_string()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
-    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a);
+    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 explicit basic_string(const allocator_type& __a);
     basic_string(const basic_string& __str);
     basic_string(const basic_string& __str, const allocator_type& __a);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
     basic_string(basic_string&& __str)
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
     _LIBCPP_INLINE_VISIBILITY
     basic_string(basic_string&& __str, const allocator_type& __a);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
+    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 basic_string(const value_type* __s);
     _LIBCPP_INLINE_VISIBILITY
     basic_string(const value_type* __s, const allocator_type& __a);
     _LIBCPP_INLINE_VISIBILITY
     basic_string(const value_type* __s, size_type __n);
     _LIBCPP_INLINE_VISIBILITY
     basic_string(const value_type* __s, size_type __n, const allocator_type& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
     basic_string(size_type __n, value_type __c);
     _LIBCPP_INLINE_VISIBILITY
     basic_string(size_type __n, value_type __c, const allocator_type& __a);
@@ -1426,7 +1507,7 @@
 
     _LIBCPP_INLINE_VISIBILITY
     basic_string& append(const basic_string& __str);
-    basic_string& append(const basic_string& __str, size_type __pos, size_type __n);
+    basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
     basic_string& append(const value_type* __s, size_type __n);
     basic_string& append(const value_type* __s);
     basic_string& append(size_type __n, value_type __c);
@@ -1465,7 +1546,7 @@
     basic_string& assign(basic_string&& str)
         {*this = _VSTD::move(str); return *this;}
 #endif
-    basic_string& assign(const basic_string& __str, size_type __pos, size_type __n);
+    basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
     basic_string& assign(const value_type* __s, size_type __n);
     basic_string& assign(const value_type* __s);
     basic_string& assign(size_type __n, value_type __c);
@@ -1491,7 +1572,7 @@
 
     _LIBCPP_INLINE_VISIBILITY
     basic_string& insert(size_type __pos1, const basic_string& __str);
-    basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n);
+    basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
     basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
     basic_string& insert(size_type __pos, const value_type* __s);
     basic_string& insert(size_type __pos, size_type __n, value_type __c);
@@ -1527,7 +1608,7 @@
 
     _LIBCPP_INLINE_VISIBILITY
     basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str);
-    basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2);
+    basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos);
     basic_string& replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
     basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
     basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
@@ -1619,7 +1700,7 @@
     int compare(const basic_string& __str) const _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     int compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
-    int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const;
+    int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos) const;
     int compare(const value_type* __s) const _NOEXCEPT;
     int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
     int compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;
@@ -1891,7 +1972,7 @@
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
 basic_string<_CharT, _Traits, _Allocator>::basic_string()
     _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
 {
@@ -1902,7 +1983,7 @@
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
     : __r_(__a)
 {
@@ -1961,7 +2042,7 @@
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s)
 {
     _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
@@ -2035,7 +2116,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
 basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
     : __r_(_VSTD::move(__str.__r_))
@@ -2092,7 +2173,7 @@
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c)
 {
     __init(__n, __c);
@@ -2311,7 +2392,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
     size_type __cap = capacity();
     if (__cap >= __n)
     {
@@ -2485,7 +2566,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::assign recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::assign received nullptr");
     return assign(__s, traits_type::length(__s));
 }
 
@@ -2495,7 +2576,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
     size_type __cap = capacity();
     size_type __sz = size();
     if (__cap - __sz >= __n)
@@ -2632,7 +2713,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::append recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::append received nullptr");
     return append(__s, traits_type::length(__s));
 }
 
@@ -2642,7 +2723,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         this->__throw_out_of_range();
@@ -2794,7 +2875,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::insert recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::insert received nullptr");
     return insert(__pos, __s, traits_type::length(__s));
 }
 
@@ -2845,7 +2926,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace recieved nullptr");
+    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         this->__throw_out_of_range();
@@ -2977,7 +3058,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::replace recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::replace received nullptr");
     return replace(__pos, __n1, __s, traits_type::length(__s));
 }
 
@@ -3345,18 +3426,9 @@
                                                 size_type __pos,
                                                 size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): recieved nullptr");
-    size_type __sz = size();
-    if (__pos > __sz || __sz - __pos < __n)
-        return npos;
-    if (__n == 0)
-        return __pos;
-    const value_type* __p = data();
-    const value_type* __r = _VSTD::search(__p + __pos, __p + __sz, __s, __s + __n,
-                                     __traits_eq<traits_type>());
-    if (__r == __p + __sz)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3365,7 +3437,8 @@
 basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
                                                 size_type __pos) const _NOEXCEPT
 {
-    return find(__str.data(), __pos, __str.size());
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3374,8 +3447,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                 size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find(): recieved nullptr");
-    return find(__s, __pos, traits_type::length(__s));
+    _LIBCPP_ASSERT(__s != nullptr, "string::find(): received nullptr");
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3383,14 +3457,8 @@
 basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
                                                 size_type __pos) const _NOEXCEPT
 {
-    size_type __sz = size();
-    if (__pos >= __sz)
-        return npos;
-    const value_type* __p = data();
-    const value_type* __r = traits_type::find(__p + __pos, __sz - __pos, __c);
-    if (__r == 0)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    return _VSTD::__find<value_type, size_type, traits_type, npos>
+        (data(), size(), __c, __pos);
 }
 
 // rfind
@@ -3401,19 +3469,9 @@
                                                  size_type __pos,
                                                  size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): recieved nullptr");
-    size_type __sz = size();
-    __pos = _VSTD::min(__pos, __sz);
-    if (__n < __sz - __pos)
-        __pos += __n;
-    else
-        __pos = __sz;
-    const value_type* __p = data();
-    const value_type* __r = _VSTD::find_end(__p, __p + __pos, __s, __s + __n,
-                                       __traits_eq<traits_type>());
-    if (__n > 0 && __r == __p + __pos)
-        return npos;
-    return static_cast<size_type>(__r - __p);
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3422,7 +3480,8 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
                                                  size_type __pos) const _NOEXCEPT
 {
-    return rfind(__str.data(), __pos, __str.size());
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3431,8 +3490,9 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                  size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::rfind(): recieved nullptr");
-    return rfind(__s, __pos, traits_type::length(__s));
+    _LIBCPP_ASSERT(__s != nullptr, "string::rfind(): received nullptr");
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3440,21 +3500,8 @@
 basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
                                                  size_type __pos) const _NOEXCEPT
 {
-    size_type __sz = size();
-    if (__sz)
-    {
-        if (__pos < __sz)
-            ++__pos;
-        else
-            __pos = __sz;
-        const value_type* __p = data();
-        for (const value_type* __ps = __p + __pos; __ps != __p;)
-        {
-            if (traits_type::eq(*--__ps, __c))
-                return static_cast<size_type>(__ps - __p);
-        }
-    }
-    return npos;
+    return _VSTD::__rfind<value_type, size_type, traits_type, npos>
+        (data(), size(), __c, __pos);
 }
 
 // find_first_of
@@ -3465,9 +3512,9 @@
                                                          size_type __pos,
                                                          size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
     return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, __n);
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3477,7 +3524,7 @@
                                                          size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __str.data(), __pos, __str.size());
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3486,9 +3533,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                          size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): received nullptr");
     return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, traits_type::length(__s));
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3508,9 +3555,9 @@
                                                         size_type __pos,
                                                         size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
     return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, __n);
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3520,7 +3567,7 @@
                                                         size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __str.data(), __pos, __str.size());
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3529,9 +3576,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                         size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): received nullptr");
     return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, traits_type::length(__s));
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3551,9 +3598,9 @@
                                                              size_type __pos,
                                                              size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, __n);
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3563,7 +3610,7 @@
                                                              size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __str.data(), __pos, __str.size());
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3572,9 +3619,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                              size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): received nullptr");
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, traits_type::length(__s));
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3584,7 +3631,7 @@
                                                              size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __c, __pos);
+        (data(), size(), __c, __pos);
 }
 
 // find_last_not_of
@@ -3595,9 +3642,9 @@
                                                             size_type __pos,
                                                             size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, __n);
+        (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3607,7 +3654,7 @@
                                                             size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __str.data(), __pos, __str.size());
+        (data(), size(), __str.data(), __pos, __str.size());
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3616,9 +3663,9 @@
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                             size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): received nullptr");
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __s, __pos, traits_type::length(__s));
+        (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3628,7 +3675,7 @@
                                                             size_type __pos) const _NOEXCEPT
 {
     return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
-    	(data(), size(), __c, __pos);
+        (data(), size(), __c, __pos);
 }
 
 // compare
@@ -3680,7 +3727,7 @@
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(0, npos, __s, traits_type::length(__s));
 }
 
@@ -3690,7 +3737,7 @@
                                                    size_type __n1,
                                                    const value_type* __s) const
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(__pos1, __n1, __s, traits_type::length(__s));
 }
 
@@ -3701,7 +3748,7 @@
                                                    const value_type* __s,
                                                    size_type __n2) const
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): recieved nullptr");
+    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
     size_type __sz = size();
     if (__pos1 > __sz || __n2 == npos)
         this->__throw_out_of_range();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/thread b/sources/cxx-stl/llvm-libc++/libcxx/include/thread
index 1f1e4a2..0202440 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/thread
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/thread
@@ -106,6 +106,8 @@
 
 #define __STDCPP_THREADS__ __cplusplus
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
@@ -455,4 +457,6 @@
 
 _LIBCPP_END_NAMESPACE_STD
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 #endif  // _LIBCPP_THREAD
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/tuple b/sources/cxx-stl/llvm-libc++/libcxx/include/tuple
index 24e086d..27a5a46 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/tuple
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/tuple
@@ -74,7 +74,7 @@
 
 template <class... T> tuple<V...>  make_tuple(T&&...); // constexpr in C++14
 template <class... T> tuple<ATypes...> forward_as_tuple(T&&...) noexcept; // constexpr in C++14
-template <class... T> tuple<T&...> tie(T&...) noexcept;
+template <class... T> tuple<T&...> tie(T&...) noexcept; // constexpr in C++14
 template <class... Tuples> tuple<CTypes...> tuple_cat(Tuples&&... tpls); // constexpr in C++14
   
 // 20.4.1.4, tuple helper classes:
@@ -82,13 +82,15 @@
 template <class... T> class tuple_size<tuple<T...>>;
 template <intsize_t I, class T> class tuple_element; // undefined
 template <intsize_t I, class... T> class tuple_element<I, tuple<T...>>;
+template <size_t _Ip, class ..._Tp>
+  using tuple_element_t = typename tuple_element <_Ip, _Tp...>::type; // C++14
 
 // 20.4.1.5, element access:
 template <intsize_t I, class... T>
     typename tuple_element<I, tuple<T...>>::type&
     get(tuple<T...>&) noexcept; // constexpr in C++14
 template <intsize_t I, class... T>
-    typename tuple_element<I, tuple<T...>>::type const&
+    typename const tuple_element<I, tuple<T...>>::type &
     get(const tuple<T...>&) noexcept; // constexpr in C++14
 template <intsize_t I, class... T>
     typename tuple_element<I, tuple<T...>>::type&&
@@ -152,6 +154,11 @@
     typedef typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
 };
 
+#if _LIBCPP_STD_VER > 11
+template <size_t _Ip, class ..._Tp>
+using tuple_element_t = typename tuple_element <_Ip, _Tp...>::type;
+#endif
+
 // __tuple_leaf
 
 template <size_t _Ip, class _Hp, bool=is_empty<_Hp>::value
@@ -261,17 +268,8 @@
                                 >::value)),
        "Attempted to construct a reference element in a tuple with an rvalue");}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    __tuple_leaf(const __tuple_leaf& __t) _NOEXCEPT_(is_nothrow_copy_constructible<_Hp>::value)
-        : value(__t.get())
-        {static_assert(!is_rvalue_reference<_Hp>::value, "Can not copy a tuple with rvalue reference member");}
-
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    __tuple_leaf(__tuple_leaf&& __t) _NOEXCEPT_(is_nothrow_move_constructible<_Hp>::value)
-        : value(_VSTD::forward<_Hp>(__t.get()))
-        {}
+    __tuple_leaf(const __tuple_leaf& __t) = default;
+    __tuple_leaf(__tuple_leaf&& __t) = default;
 
     template <class _Tp>
         _LIBCPP_INLINE_VISIBILITY
@@ -796,7 +794,7 @@
 // tie
 
 template <class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
 tuple<_Tp&...>
 tie(_Tp&... __t) _NOEXCEPT
 {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/type_traits b/sources/cxx-stl/llvm-libc++/libcxx/include/type_traits
index 3e3d8b7..c027035 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/type_traits
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/type_traits
@@ -91,6 +91,7 @@
     template <class T> struct is_empty;
     template <class T> struct is_polymorphic;
     template <class T> struct is_abstract;
+    template <class T> struct is_final; // C++14
 
     template <class T, class... Args> struct is_constructible;
     template <class T>                struct is_default_constructible;
@@ -236,10 +237,10 @@
     typedef _Tp               value_type;
     typedef integral_constant type;
     _LIBCPP_INLINE_VISIBILITY
-        _LIBCPP_CONSTEXPR operator value_type() const {return value;}
+        _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT {return value;}
 #if _LIBCPP_STD_VER > 11
     _LIBCPP_INLINE_VISIBILITY
-         constexpr value_type operator ()() const {return value;}
+         constexpr value_type operator ()() const _NOEXCEPT {return value;}
 #endif
 };
 
@@ -324,6 +325,10 @@
 template <>          struct __libcpp_is_integral<unsigned long>      : public true_type {};
 template <>          struct __libcpp_is_integral<long long>          : public true_type {};
 template <>          struct __libcpp_is_integral<unsigned long long> : public true_type {};
+#ifndef _LIBCPP_HAS_NO_INT128
+template <>          struct __libcpp_is_integral<__int128_t>         : public true_type {};
+template <>          struct __libcpp_is_integral<__uint128_t>        : public true_type {};
+#endif
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_integral
     : public __libcpp_is_integral<typename remove_cv<_Tp>::type> {};
@@ -377,7 +382,7 @@
 
 // is_union
 
-#if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_union) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
     : public integral_constant<bool, __is_union(_Tp)> {};
@@ -392,7 +397,7 @@
 
 // is_class
 
-#if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_class) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
     : public integral_constant<bool, __is_class(_Tp)> {};
@@ -439,8 +444,26 @@
 
 // is_member_function_pointer
 
-template <class _Tp> struct            __libcpp_is_member_function_pointer             : public false_type {};
-template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
+// template <class _Tp> struct            __libcpp_is_member_function_pointer             : public false_type {};
+// template <class _Tp, class _Up> struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {};
+// 
+
+template <class _MP, bool _IsMemberFuctionPtr, bool _IsMemberObjectPtr>
+struct __member_pointer_traits_imp
+{  // forward declaration; specializations later
+};
+
+
+namespace __libcpp_is_member_function_pointer_imp {
+	template <typename _Tp>
+	char __test(typename std::__member_pointer_traits_imp<_Tp, true, false>::_FnType *);
+
+	template <typename>
+	std::__two __test(...);
+};
+	
+template <class _Tp> struct __libcpp_is_member_function_pointer
+    : public integral_constant<bool, sizeof(__libcpp_is_member_function_pointer_imp::__test<_Tp>(nullptr)) == 1> {};
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_function_pointer
     : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
@@ -461,7 +484,7 @@
 
 // is_enum
 
-#if __has_feature(is_enum) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_enum) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
     : public integral_constant<bool, __is_enum(_Tp)> {};
@@ -759,6 +782,13 @@
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_abstract : public __libcpp_abstract<_Tp> {};
 
+// is_final
+
+#if _LIBCPP_STD_VER > 11 && __has_feature(is_final)
+template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY 
+is_final : public integral_constant<bool, __is_final(_Tp)> {};
+#endif
+
 // is_base_of
 
 #ifdef _LIBCPP_HAS_IS_BASE_OF
@@ -767,7 +797,7 @@
 struct _LIBCPP_TYPE_VIS_ONLY is_base_of
     : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
 
-#else  // __has_feature(is_base_of)
+#else  // _LIBCPP_HAS_IS_BASE_OF
 
 namespace __is_base_of_imp
 {
@@ -792,7 +822,7 @@
     : public integral_constant<bool, is_class<_Bp>::value &&
                                      sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
 
-#endif  // __has_feature(is_base_of)
+#endif  // _LIBCPP_HAS_IS_BASE_OF
 
 // is_convertible
 
@@ -806,14 +836,20 @@
 
 namespace __is_convertible_imp
 {
-template <class _Tp> char  __test(_Tp);
-template <class _Tp> __two __test(...);
+// Test taken directly from definition of is_convertible predicate in [meta.rel]p4.
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> _Tp&& __source();
+template <class _Tp> typename add_rvalue_reference<_Tp>::type __create();
 #else
-template <class _Tp> typename remove_reference<_Tp>::type& __source();
+template <class _Tp> typename remove_reference<_Tp>::type& __create();
 #endif
 
+template <class _Tp> char helper(_Tp);
+
+template <class _Tp, class _Tf>
+typename enable_if<sizeof(helper<_Tp>(__create<_Tf>())) == 1, char>::type
+    __test(int);
+template <class _Tp, class _Tf> __two __test(...);
+
 template <class _Tp, bool _IsArray =    is_array<_Tp>::value,
                      bool _IsFunction = is_function<_Tp>::value,
                      bool _IsVoid =     is_void<_Tp>::value>
@@ -842,9 +878,9 @@
 struct __is_convertible
     : public integral_constant<bool,
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-        sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1
+        sizeof(__is_convertible_imp::__test<_T2, _T1>(1)) == 1
 #else
-        sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1
+        sizeof(__is_convertible_imp::__test<_T2, _T1>(1)) == 1
          && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value
               && (!is_const<typename remove_reference<_T2>::type>::value
                   || is_volatile<typename remove_reference<_T2>::type>::value)
@@ -857,12 +893,12 @@
 
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 0> : false_type {};
 
-template <class _T1> struct __is_convertible<_T1, const _T1&, 1, 0> : true_type {};
+template <class _T1> struct __is_convertible<_T1, const typename remove_const<_T1>::type&, 1, 0> : true_type {};
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 template <class _T1> struct __is_convertible<_T1, _T1&&, 1, 0> : true_type {};
-template <class _T1> struct __is_convertible<_T1, const _T1&&, 1, 0> : true_type {};
-template <class _T1> struct __is_convertible<_T1, volatile _T1&&, 1, 0> : true_type {};
-template <class _T1> struct __is_convertible<_T1, const volatile _T1&&, 1, 0> : true_type {};
+template <class _T1> struct __is_convertible<_T1, const typename remove_const<_T1>::type&&, 1, 0> : true_type {};
+template <class _T1> struct __is_convertible<_T1, volatile typename remove_volatile<_T1>::type&&, 1, 0> : true_type {};
+template <class _T1> struct __is_convertible<_T1, const volatile typename remove_cv<_T1>::type&&, 1, 0> : true_type {};
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2*, 1, 0>
@@ -887,18 +923,22 @@
 template <class _T1>            struct __is_convertible<_T1, _T1*volatile, 2, 0>       : public true_type {};
 template <class _T1>            struct __is_convertible<_T1, _T1*const volatile, 2, 0> : public true_type {};
 
+// Per N2255 on is_convertible, void -> !void is not convertible.
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 0> : public false_type {};
 
+// Per N2255 on is_convertible, * -> array is not converitble.
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 1> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 1> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 1> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 1> : public false_type {};
 
+// Per N2255 on is_convertible, * -> function is not converitble.
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 2> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 2> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 2> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 2> : public false_type {};
 
+// Per N2255 on is_convertible, only void -> void is convertible.
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 0, 3> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
@@ -915,7 +955,7 @@
 
 // is_empty
 
-#if __has_feature(is_empty)
+#if __has_feature(is_empty) || (_GNUC_VER >= 407)
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_empty
@@ -946,7 +986,7 @@
 
 // is_polymorphic
 
-#if __has_feature(is_polymorphic)
+#if __has_feature(is_polymorphic) || defined(_LIBCPP_MSVC)
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
@@ -966,7 +1006,7 @@
 
 // has_virtual_destructor
 
-#if __has_feature(has_virtual_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_virtual_destructor) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
     : public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
@@ -1239,7 +1279,13 @@
     __type_list<signed int,
     __type_list<signed long,
     __type_list<signed long long,
+#ifndef _LIBCPP_HAS_NO_INT128
+    __type_list<__int128_t,
+#endif
     __nat
+#ifndef _LIBCPP_HAS_NO_INT128
+    >
+#endif
     > > > > > __signed_types;
 
 typedef
@@ -1248,7 +1294,13 @@
     __type_list<unsigned int,
     __type_list<unsigned long,
     __type_list<unsigned long long,
+#ifndef _LIBCPP_HAS_NO_INT128
+    __type_list<__uint128_t,
+#endif
     __nat
+#ifndef _LIBCPP_HAS_NO_INT128
+    >
+#endif
     > > > > > __unsigned_types;
 
 template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeList::_Head)> struct __find_first;
@@ -1332,6 +1384,10 @@
 template <> struct __make_signed<unsigned long,      true> {typedef long      type;};
 template <> struct __make_signed<  signed long long, true> {typedef long long type;};
 template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
+#ifndef _LIBCPP_HAS_NO_INT128
+template <> struct __make_signed<__int128_t,         true> {typedef __int128_t type;};
+template <> struct __make_signed<__uint128_t,        true> {typedef __int128_t type;};
+#endif
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY make_signed
@@ -1361,6 +1417,10 @@
 template <> struct __make_unsigned<unsigned long,      true> {typedef unsigned long      type;};
 template <> struct __make_unsigned<  signed long long, true> {typedef unsigned long long type;};
 template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
+#ifndef _LIBCPP_HAS_NO_INT128
+template <> struct __make_unsigned<__int128_t,         true> {typedef __uint128_t        type;};
+template <> struct __make_unsigned<__uint128_t,        true> {typedef __uint128_t        type;};
+#endif
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY make_unsigned
@@ -1622,11 +1682,6 @@
 
 #endif
 
-template <class _MP, bool _IsMemberFuctionPtr, bool _IsMemberObjectPtr>
-struct __member_pointer_traits_imp
-{
-};
-
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1634,6 +1689,7 @@
 {
     typedef _Class _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1641,6 +1697,7 @@
 {
     typedef _Class const _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1648,6 +1705,7 @@
 {
     typedef _Class volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1655,6 +1713,7 @@
 {
     typedef _Class const volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 #if __has_feature(cxx_reference_qualified_functions)
@@ -1664,6 +1723,7 @@
 {
     typedef _Class& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1671,6 +1731,7 @@
 {
     typedef _Class const& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1678,6 +1739,7 @@
 {
     typedef _Class volatile& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1685,6 +1747,7 @@
 {
     typedef _Class const volatile& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1692,6 +1755,7 @@
 {
     typedef _Class&& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1699,6 +1763,7 @@
 {
     typedef _Class const&& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1706,6 +1771,7 @@
 {
     typedef _Class volatile&& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 template <class _Rp, class _Class, class ..._Param>
@@ -1713,6 +1779,7 @@
 {
     typedef _Class const volatile&& _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_Param...);
 };
 
 #endif  // __has_feature(cxx_reference_qualified_functions)
@@ -1724,6 +1791,7 @@
 {
     typedef _Class _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) ();
 };
 
 template <class _Rp, class _Class, class _P0>
@@ -1731,6 +1799,7 @@
 {
     typedef _Class _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1>
@@ -1738,6 +1807,7 @@
 {
     typedef _Class _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
@@ -1745,6 +1815,7 @@
 {
     typedef _Class _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
 template <class _Rp, class _Class>
@@ -1752,6 +1823,7 @@
 {
     typedef _Class const _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) ();
 };
 
 template <class _Rp, class _Class, class _P0>
@@ -1759,6 +1831,7 @@
 {
     typedef _Class const _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1>
@@ -1766,6 +1839,7 @@
 {
     typedef _Class const _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
@@ -1773,6 +1847,7 @@
 {
     typedef _Class const _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
 template <class _Rp, class _Class>
@@ -1780,6 +1855,7 @@
 {
     typedef _Class volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) ();
 };
 
 template <class _Rp, class _Class, class _P0>
@@ -1787,6 +1863,7 @@
 {
     typedef _Class volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1>
@@ -1794,6 +1871,7 @@
 {
     typedef _Class volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
@@ -1801,6 +1879,7 @@
 {
     typedef _Class volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
 template <class _Rp, class _Class>
@@ -1808,6 +1887,7 @@
 {
     typedef _Class const volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) ();
 };
 
 template <class _Rp, class _Class, class _P0>
@@ -1815,6 +1895,7 @@
 {
     typedef _Class const volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1>
@@ -1822,6 +1903,7 @@
 {
     typedef _Class const volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1);
 };
 
 template <class _Rp, class _Class, class _P0, class _P1, class _P2>
@@ -1829,6 +1911,7 @@
 {
     typedef _Class const volatile _ClassType;
     typedef _Rp _ReturnType;
+    typedef _Rp (_FnType) (_P0, _P1, _P2);
 };
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
@@ -1848,6 +1931,7 @@
 {
 //     typedef ... _ClassType;
 //     typedef ... _ReturnType;
+//     typedef ... _FnType;
 };
 
 // result_of
@@ -2002,10 +2086,24 @@
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
 // template <class T, class... Args> struct is_constructible;
 
+namespace __is_construct
+{
+struct __nat {};
+}
+
+#if __has_feature(is_constructible)
+
+template <class _Tp, class ..._Args>
+struct _LIBCPP_TYPE_VIS_ONLY is_constructible
+    : public integral_constant<bool, __is_constructible(_Tp, _Args...)>
+    {};
+
+#else
+
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
 //      main is_constructible test
 
 template <class _Tp, class ..._Args>
@@ -2233,13 +2331,6 @@
 
 //      is_constructible entry point
 
-namespace __is_construct
-{
-
-struct __nat {};
-
-}
-
 template <class _Tp, class _A0 = __is_construct::__nat,
                      class _A1 = __is_construct::__nat>
 struct _LIBCPP_TYPE_VIS_ONLY is_constructible
@@ -2304,6 +2395,7 @@
     {};
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
+#endif  // __has_feature(is_constructible)
 
 // is_default_constructible
 
@@ -2352,7 +2444,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
-#if __has_feature(has_trivial_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_trivial_constructor) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_trivial_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2481,7 +2573,7 @@
 
 // is_trivially_assignable
 
-#if __has_feature(is_trivially_constructible)
+#if __has_feature(is_trivially_assignable)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2489,7 +2581,7 @@
 {
 };
 
-#else  // !__has_feature(is_trivially_constructible)
+#else  // !__has_feature(is_trivially_assignable)
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
@@ -2515,7 +2607,7 @@
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-#endif  // !__has_feature(is_trivially_constructible)
+#endif  // !__has_feature(is_trivially_assignable)
 
 // is_trivially_copy_assignable
 
@@ -2537,7 +2629,7 @@
 
 // is_trivially_destructible
 
-#if __has_feature(has_trivial_destructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_trivial_destructor) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
     : public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
@@ -2555,9 +2647,18 @@
 
 // is_nothrow_constructible
 
+#if 0
+template <class _Tp, class... _Args>
+struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+    : public integral_constant<bool, __is_nothrow_constructible(_Tp(_Args...))>
+{
+};
+
+#else
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp, class... _Args> struct __libcpp_is_nothrow_constructible;
 
@@ -2595,7 +2696,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_constructor) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2609,7 +2710,7 @@
 #else
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
 #endif
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2619,7 +2720,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2629,7 +2730,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2651,7 +2752,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_constructor) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_constructor) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_constructor(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2662,7 +2763,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2673,7 +2774,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2684,7 +2785,7 @@
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&,
                                                        __is_construct::__nat>
-#if __has_feature(has_nothrow_copy) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_copy) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_copy(_Tp)>
 #else
     : integral_constant<bool, is_scalar<_Tp>::value>
@@ -2693,6 +2794,7 @@
 };
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
+#endif  // __has_feature(is_nothrow_constructible)
 
 // is_nothrow_default_constructible
 
@@ -2718,7 +2820,7 @@
 
 // is_nothrow_assignable
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp, class _Arg> struct __libcpp_is_nothrow_assignable;
 
@@ -2748,7 +2850,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2756,7 +2858,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2764,7 +2866,7 @@
 
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, const _Tp&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2774,7 +2876,7 @@
 
 template <class _Tp>
 struct is_nothrow_assignable<_Tp&, _Tp&&>
-#if __has_feature(has_nothrow_assign) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(has_nothrow_assign) || defined(_LIBCPP_HAS_TYPE_TRAITS)
     : integral_constant<bool, __has_nothrow_assign(_Tp)> {};
 #else
     : integral_constant<bool, is_scalar<_Tp>::value> {};
@@ -2804,7 +2906,7 @@
 
 // is_nothrow_destructible
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp> struct __libcpp_is_nothrow_destructible;
 
@@ -2861,7 +2963,7 @@
 
 // is_pod
 
-#if __has_feature(is_pod) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if __has_feature(is_pod) || defined(_LIBCPP_HAS_TYPE_TRAITS)
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
     : public integral_constant<bool, __is_pod(_Tp)> {};
@@ -2879,8 +2981,8 @@
 // is_literal_type;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_literal_type
-#if __has_feature(is_literal)
-    : public integral_constant<bool, __is_literal(_Tp)>
+#ifdef _LIBCPP_IS_LITERAL
+    : public integral_constant<bool, _LIBCPP_IS_LITERAL(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value ||
                               is_reference<typename remove_all_extents<_Tp>::type>::value>
@@ -2890,7 +2992,7 @@
 // is_standard_layout;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_standard_layout
-#if __has_feature(is_standard_layout)
+#if __has_feature(is_standard_layout) || (_GNUC_VER >= 407)
     : public integral_constant<bool, __is_standard_layout(_Tp)>
 #else
     : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
@@ -2910,7 +3012,7 @@
 // is_trivial;
 
 template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivial
-#if __has_feature(is_trivial)
+#if __has_feature(is_trivial) || (_GNUC_VER >= 407)
     : public integral_constant<bool, __is_trivial(_Tp)>
 #else
     : integral_constant<bool, is_trivially_copyable<_Tp>::value &&
@@ -3240,7 +3342,7 @@
 {
 };
 
-#if __has_feature(cxx_noexcept)
+#if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L)
 
 template <bool, class _Tp>
 struct __is_nothrow_swappable_imp
@@ -3271,19 +3373,19 @@
 
 #endif  // __has_feature(cxx_noexcept)
 
-#ifdef _LIBCXX_UNDERLYING_TYPE
+#ifdef _LIBCPP_UNDERLYING_TYPE
 
 template <class _Tp>
 struct underlying_type
 {
-    typedef _LIBCXX_UNDERLYING_TYPE(_Tp) type;
+    typedef _LIBCPP_UNDERLYING_TYPE(_Tp) type;
 };
 
 #if _LIBCPP_STD_VER > 11
 template <class _Tp> using underlying_type_t = typename underlying_type<_Tp>::type;
 #endif
 
-#else  // _LIBCXX_UNDERLYING_TYPE
+#else  // _LIBCPP_UNDERLYING_TYPE
 
 template <class _Tp, bool _Support = false>
 struct underlying_type
@@ -3293,7 +3395,7 @@
                             "libc++ does not know how to use it.");
 };
 
-#endif // _LIBCXX_UNDERLYING_TYPE
+#endif // _LIBCPP_UNDERLYING_TYPE
 
 #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/typeinfo b/sources/cxx-stl/llvm-libc++/libcxx/include/typeinfo
index 6ffee0f..14ef77b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/typeinfo
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/typeinfo
@@ -60,6 +60,7 @@
 #include <__config>
 #include <exception>
 #include <cstddef>
+#include <cstdint>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -73,32 +74,75 @@
     type_info& operator=(const type_info&);
     type_info(const type_info&);
 protected:
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
     const char* __type_name;
+#else
+    // A const char* with the non-unique RTTI bit possibly set.
+    uintptr_t __type_name;
+#endif
 
     _LIBCPP_INLINE_VISIBILITY
     explicit type_info(const char* __n)
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
         : __type_name(__n) {}
+#else
+        : __type_name(reinterpret_cast<uintptr_t>(__n)) {}
+#endif
 
 public:
     virtual ~type_info();
 
     _LIBCPP_INLINE_VISIBILITY
-    const char* name() const _NOEXCEPT {return __type_name;}
+    const char* name() const _NOEXCEPT
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
+        {return __type_name;}
+#else
+        {return reinterpret_cast<const char*>(__type_name & ~_LIBCPP_NONUNIQUE_RTTI_BIT);}
+#endif
 
     _LIBCPP_INLINE_VISIBILITY
     bool before(const type_info& __arg) const _NOEXCEPT
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
         {return __type_name < __arg.__type_name;}
+#else
+        {if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
+           return __type_name < __arg.__type_name;
+         return __compare_nonunique_names(__arg) < 0;}
+#endif
+
     _LIBCPP_INLINE_VISIBILITY
     size_t hash_code() const _NOEXCEPT
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
         {return *reinterpret_cast<const size_t*>(&__type_name);}
+#else
+        {if (!(__type_name & _LIBCPP_NONUNIQUE_RTTI_BIT)) return __type_name;
+         const char *__ptr = name();
+         size_t __hash = 5381;
+         while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
+           __hash = (__hash * 33) ^ __c;
+         return __hash;}
+#endif
 
     _LIBCPP_INLINE_VISIBILITY
     bool operator==(const type_info& __arg) const _NOEXCEPT
+#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
         {return __type_name == __arg.__type_name;}
+#else
+        {if (__type_name == __arg.__type_name) return true;
+         if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
+           return false;
+         return __compare_nonunique_names(__arg) == 0;}
+#endif
     _LIBCPP_INLINE_VISIBILITY
     bool operator!=(const type_info& __arg) const _NOEXCEPT
         {return !operator==(__arg);}
 
+#ifdef _LIBCPP_NONUNIQUE_RTTI_BIT
+  private:
+    _LIBCPP_INLINE_VISIBILITY
+    int __compare_nonunique_names(const type_info &__arg) const _NOEXCEPT
+        {return __builtin_strcmp(name(), __arg.name());}
+#endif
 };
 
 class _LIBCPP_EXCEPTION_ABI bad_cast
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/utility b/sources/cxx-stl/llvm-libc++/libcxx/include/utility
index 0a1a7f1..8a7e1dc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/utility
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/utility
@@ -101,30 +101,30 @@
 template <class T> class tuple_size;
 template <size_t I, class T> class tuple_element;
 
-template <class T1, class T2> struct tuple_size<std::pair<T1, T2> >;
-template <class T1, class T2> struct tuple_element<0, std::pair<T1, T2> >;
-template <class T1, class T2> struct tuple_element<1, std::pair<T1, T2> >;
+template <class T1, class T2> struct tuple_size<pair<T1, T2> >;
+template <class T1, class T2> struct tuple_element<0, pair<T1, T2> >;
+template <class T1, class T2> struct tuple_element<1, pair<T1, T2> >;
 
 template<size_t I, class T1, class T2>
-    typename tuple_element<I, std::pair<T1, T2> >::type&
-    get(std::pair<T1, T2>&) noexcept; // constexpr in C++14
+    typename tuple_element<I, pair<T1, T2> >::type&
+    get(pair<T1, T2>&) noexcept; // constexpr in C++14
 
 template<size_t I, class T1, class T2>
-    const typename const tuple_element<I, std::pair<T1, T2> >::type&
-    get(const std::pair<T1, T2>&) noexcept; // constexpr in C++14
+    const typename const tuple_element<I, pair<T1, T2> >::type&
+    get(const pair<T1, T2>&) noexcept; // constexpr in C++14
 
 template<size_t I, class T1, class T2>
-    typename tuple_element<I, std::pair<T1, T2> >::type&&
-    get(std::pair<T1, T2>&&) noexcept; // constexpr in C++14
+    typename tuple_element<I, pair<T1, T2> >::type&&
+    get(pair<T1, T2>&&) noexcept; // constexpr in C++14
 
 template<class T1, class T2>
-    constexpr T1& get(std::pair<T1, T2>&) noexcept; // C++14
+    constexpr T1& get(pair<T1, T2>&) noexcept; // C++14
 
 template<size_t I, class T1, class T2>
-    constexpr T1 const& get(std::pair<T1, T2> const &) noexcept; // C++14
+    constexpr T1 const& get(pair<T1, T2> const &) noexcept; // C++14
 
 template<size_t I, class T1, class T2>
-    constexpr T1&& get(std::pair<T1, T2>&&) noexcept; // C++14
+    constexpr T1&& get(pair<T1, T2>&&) noexcept; // C++14
 
 // C++14
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/vector b/sources/cxx-stl/llvm-libc++/libcxx/include/vector
index 6ac78d5..2cc23e5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/vector
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/vector
@@ -483,6 +483,7 @@
 {
 private:
     typedef __vector_base<_Tp, _Allocator>           __base;
+    typedef allocator<_Tp>                           __default_allocator_type;
 public:
     typedef vector                                   __self;
     typedef _Tp                                      value_type;
@@ -749,7 +750,9 @@
     _LIBCPP_INLINE_VISIBILITY
     void clear() _NOEXCEPT
     {
+        size_type __old_size = size();
         __base::clear();
+        __annotate_shrink(__old_size);
         __invalidate_all_iterators();
     }
 
@@ -816,7 +819,9 @@
         }
         __get_db()->unlock();
 #endif
+        size_type __old_size = size();
         __base::__destruct_at_end(__new_last);
+        __annotate_shrink(__old_size);
     }
     template <class _Up>
         void
@@ -830,17 +835,52 @@
         void
         __emplace_back_slow_path(_Args&&... __args);
 #endif
+    // The following functions are no-ops outside of AddressSanitizer mode.
+    // We call annotatations only for the default Allocator because other allocators
+    // may not meet the AddressSanitizer alignment constraints.
+    // See the documentation for __sanitizer_annotate_contiguous_container for more details.
+    void __annotate_contiguous_container
+    (const void *__beg, const void *__end, const void *__old_mid, const void *__new_mid)
+    {
+#ifndef _LIBCPP_HAS_NO_ASAN
+      if (__beg && is_same<allocator_type, __default_allocator_type>::value)
+        __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
+#endif
+    }
+
+    void __annotate_new(size_type __current_size)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + capacity(), data() + __current_size);
+    }
+    void __annotate_delete()
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + size(), data() + capacity());
+    }
+    void __annotate_increase(size_type __n)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + size(), data() + size() + __n);
+    }
+    void __annotate_shrink(size_type __old_size)
+    {
+      __annotate_contiguous_container(data(), data() + capacity(),
+                                      data() + __old_size, data() + size());
+    }
 };
 
 template <class _Tp, class _Allocator>
 void
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
 {
+    __annotate_delete();
     __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
     _VSTD::swap(this->__begin_, __v.__begin_);
     _VSTD::swap(this->__end_, __v.__end_);
     _VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
+    __annotate_new(size());
     __invalidate_all_iterators();
 }
 
@@ -848,6 +888,7 @@
 typename vector<_Tp, _Allocator>::pointer
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p)
 {
+    __annotate_delete();
     pointer __r = __v.__begin_;
     __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, __p, __v.__begin_);
     __alloc_traits::__construct_forward(this->__alloc(), __p, this->__end_, __v.__end_);
@@ -855,6 +896,7 @@
     _VSTD::swap(this->__end_, __v.__end_);
     _VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
+    __annotate_new(size());
     __invalidate_all_iterators();
     return __r;
 }
@@ -874,6 +916,7 @@
         this->__throw_length_error();
     this->__begin_ = this->__end_ = __alloc_traits::allocate(this->__alloc(), __n);
     this->__end_cap() = this->__begin_ + __n;
+    __annotate_new(0);
 }
 
 template <class _Tp, class _Allocator>
@@ -920,6 +963,7 @@
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
 {
     allocator_type& __a = this->__alloc();
+    __annotate_increase(__n);
     do
     {
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_));
@@ -940,6 +984,7 @@
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
 {
     allocator_type& __a = this->__alloc();
+    __annotate_increase(__n);
     do
     {
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), __x);
@@ -960,6 +1005,7 @@
     allocator_type& __a = this->__alloc();
     for (; __first != __last; ++__first)
     {
+        __annotate_increase(1);
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), *__first);
         ++this->__end_;
     }
@@ -972,6 +1018,7 @@
     allocator_type& __a = this->__alloc();
     for (; __first != __last; ++__first)
     {
+        __annotate_increase(1);
         __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::move(*__first));
         ++this->__end_;
@@ -1535,6 +1582,7 @@
 {
     if (this->__end_ != this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_), __x);
         ++this->__end_;
@@ -1552,6 +1600,7 @@
 {
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::move(__x));
@@ -1584,6 +1633,7 @@
 {
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         __alloc_traits::construct(this->__alloc(),
                                   _VSTD::__to_raw_pointer(this->__end_),
                                   _VSTD::forward<_Args>(__args)...);
@@ -1666,6 +1716,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1705,6 +1756,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1743,6 +1795,7 @@
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
+        __annotate_increase(1);
         if (__p == this->__end_)
         {
             __alloc_traits::construct(this->__alloc(),
@@ -1794,6 +1847,7 @@
             }
             if (__n > 0)
             {
+                __annotate_increase(__n);
                 __move_range(__p, __old_last, __p + __old_n);
                 const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
                 if (__p <= __xr && __xr < this->__end_)
@@ -1904,6 +1958,7 @@
             }
             if (__n > 0)
             {
+                __annotate_increase(__n);
                 __move_range(__p, __old_last, __p + __old_n);
                 _VSTD::copy(__first, __m, __p);
             }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/algorithm.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/algorithm.cpp
index 10c4c33..2ee8b00 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/algorithm.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/algorithm.cpp
@@ -48,12 +48,16 @@
 
 template unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
 
+#if !_LIBCPP_SINGLE_THREADED
 static pthread_mutex_t __rs_mut = PTHREAD_MUTEX_INITIALIZER;
+#endif
 unsigned __rs_default::__c_ = 0;
 
 __rs_default::__rs_default()
 {
+#if !_LIBCPP_SINGLE_THREADED
     pthread_mutex_lock(&__rs_mut);
+#endif
     __c_ = 1;
 }
 
@@ -64,8 +68,12 @@
 
 __rs_default::~__rs_default()
 {
+#if !_LIBCPP_SINGLE_THREADED
     if (--__c_ == 0)
         pthread_mutex_unlock(&__rs_mut);
+#else
+    --__c_;
+#endif
 }
 
 __rs_default::result_type
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/chrono.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/chrono.cpp
index 15a6f46..f3e594d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/chrono.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/chrono.cpp
@@ -108,11 +108,6 @@
 }
 
 #else  // __APPLE__
-// FIXME: We assume that clock_gettime(CLOCK_MONOTONIC) works on
-// non-apple systems.  Instead, we should check _POSIX_TIMERS and
-// _POSIX_MONOTONIC_CLOCK and fall back to something else if those
-// don't exist.
-
 // Warning:  If this is not truly steady, then it is non-conforming.  It is
 //  better for it to not exist and have the rest of libc++ use system_clock
 //  instead.
@@ -120,10 +115,18 @@
 steady_clock::time_point
 steady_clock::now() _NOEXCEPT
 {
+#if (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) && \
+    (defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0)
     struct timespec tp;
     if (0 != clock_gettime(CLOCK_MONOTONIC, &tp))
         __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed");
     return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec));
+#else
+#warning According to unistd.h, there is no monotonic clock on this system so \
+         we are falling back to std::system_clock (which may not be \
+         monotonic, and therefore may not be conforming).
+    return time_point(system_clock::now().time_since_epoch());
+#endif
 }
 #endif  // __APPLE__
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/condition_variable.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/condition_variable.cpp
index de0f6f4..f21142d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/condition_variable.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/condition_variable.cpp
@@ -12,6 +12,8 @@
 #include "system_error"
 #include "cassert"
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 condition_variable::~condition_variable()
@@ -32,7 +34,7 @@
 }
 
 void
-condition_variable::wait(unique_lock<mutex>& lk)
+condition_variable::wait(unique_lock<mutex>& lk) _NOEXCEPT
 {
     if (!lk.owns_lock())
         __throw_system_error(EPERM,
@@ -44,7 +46,7 @@
 
 void
 condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
-               chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp)
+     chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp) _NOEXCEPT
 {
     using namespace chrono;
     if (!lk.owns_lock())
@@ -79,3 +81,6 @@
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+#endif // !_LIBCPP_SINGLE_THREADED
+
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/debug.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/debug.cpp
index d0e8679..05ec703 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/debug.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/debug.cpp
@@ -35,6 +35,7 @@
 namespace
 {
 
+#if !_LIBCPP_SINGLE_THREADED
 typedef mutex mutex_type;
 typedef lock_guard<mutex_type> WLock;
 typedef lock_guard<mutex_type> RLock;
@@ -45,6 +46,7 @@
     static mutex_type m;
     return m;
 }
+#endif // !_LIBCPP_SINGLE_THREADED
 
 }  // unnamed namespace
 
@@ -108,7 +110,9 @@
 void*
 __libcpp_db::__find_c_from_i(void* __i) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     _LIBCPP_ASSERT(i != nullptr, "iterator not found in debug database.");
     return i->__c_ != nullptr ? i->__c_->__c_ : nullptr;
@@ -117,7 +121,9 @@
 void
 __libcpp_db::__insert_ic(void* __i, const void* __c)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     if (__cbeg_ == __cend_)
         return;
     size_t hc = hash<const void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
@@ -138,7 +144,9 @@
 __c_node*
 __libcpp_db::__insert_c(void* __c)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     if (__csz_ + 1 > static_cast<size_t>(__cend_ - __cbeg_))
     {
         size_t nc = __next_prime(2*static_cast<size_t>(__cend_ - __cbeg_) + 1);
@@ -184,7 +192,9 @@
 void
 __libcpp_db::__erase_i(void* __i)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     if (__ibeg_ != __iend_)
     {
         size_t hi = hash<void*>()(__i) % static_cast<size_t>(__iend_ - __ibeg_);
@@ -215,7 +225,9 @@
 void
 __libcpp_db::__invalidate_all(void* __c)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     if (__cend_ != __cbeg_)
     {
         size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
@@ -239,17 +251,23 @@
 __c_node*
 __libcpp_db::__find_c_and_lock(void* __c) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     mut().lock();
+#endif
     if (__cend_ == __cbeg_)
     {
+#if !_LIBCPP_SINGLE_THREADED
         mut().unlock();
+#endif
         return nullptr;
     }
     size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
     __c_node* p = __cbeg_[hc];
     if (p == nullptr)
     {
+#if !_LIBCPP_SINGLE_THREADED
         mut().unlock();
+#endif
         return nullptr;
     }
     while (p->__c_ != __c)
@@ -257,7 +275,9 @@
         p = p->__next_;
         if (p == nullptr)
         {
+#if !_LIBCPP_SINGLE_THREADED
             mut().unlock();
+#endif
             return nullptr;
         }
     }
@@ -281,13 +301,17 @@
 void
 __libcpp_db::unlock() const
 {
+#if !_LIBCPP_SINGLE_THREADED
     mut().unlock();
+#endif
 }
 
 void
 __libcpp_db::__erase_c(void* __c)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     if (__cend_ != __cbeg_)
     {
         size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
@@ -322,7 +346,9 @@
 void
 __libcpp_db::__iterator_copy(void* __i, const void* __i0)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     __i_node* i0 = __find_iterator(__i0);
     __c_node* c0 = i0 != nullptr ? i0->__c_ : nullptr;
@@ -348,7 +374,9 @@
 bool
 __libcpp_db::__dereferenceable(const void* __i) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     return i != nullptr && i->__c_ != nullptr && i->__c_->__dereferenceable(__i);
 }
@@ -356,7 +384,9 @@
 bool
 __libcpp_db::__decrementable(const void* __i) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     return i != nullptr && i->__c_ != nullptr && i->__c_->__decrementable(__i);
 }
@@ -364,7 +394,9 @@
 bool
 __libcpp_db::__addable(const void* __i, ptrdiff_t __n) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     return i != nullptr && i->__c_ != nullptr && i->__c_->__addable(__i, __n);
 }
@@ -372,7 +404,9 @@
 bool
 __libcpp_db::__subscriptable(const void* __i, ptrdiff_t __n) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     return i != nullptr && i->__c_ != nullptr && i->__c_->__subscriptable(__i, __n);
 }
@@ -380,7 +414,9 @@
 bool
 __libcpp_db::__less_than_comparable(const void* __i, const void* __j) const
 {
+#if !_LIBCPP_SINGLE_THREADED
     RLock _(mut());
+#endif
     __i_node* i = __find_iterator(__i);
     __i_node* j = __find_iterator(__j);
     __c_node* ci = i != nullptr ? i->__c_ : nullptr;
@@ -391,7 +427,9 @@
 void
 __libcpp_db::swap(void* c1, void* c2)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     size_t hc = hash<void*>()(c1) % static_cast<size_t>(__cend_ - __cbeg_);
     __c_node* p1 = __cbeg_[hc];
     _LIBCPP_ASSERT(p1 != nullptr, "debug mode internal logic error swap A");
@@ -420,7 +458,9 @@
 void
 __libcpp_db::__insert_i(void* __i)
 {
+#if !_LIBCPP_SINGLE_THREADED
     WLock _(mut());
+#endif
     __insert_iterator(__i);
 }
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/future.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/future.cpp
index c67dc58..91756e1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/future.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/future.cpp
@@ -10,6 +10,8 @@
 #include "future"
 #include "string"
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 class _LIBCPP_HIDDEN __future_error_category
@@ -298,3 +300,7 @@
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+#endif // !_LIBCPP_SINGLE_THREADED
+
+
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/hash.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/hash.cpp
index 388ab2e..dc90f78 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/hash.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/hash.cpp
@@ -136,7 +136,7 @@
 // The algorithm creates a list of small primes, plus an open-ended list of
 // potential primes.  All prime numbers are potential prime numbers.  However
 // some potential prime numbers are not prime.  In an ideal world, all potential
-// prime numbers would be prime.  Candiate prime numbers are chosen as the next
+// prime numbers would be prime.  Candidate prime numbers are chosen as the next
 // highest potential prime.  Then this number is tested for prime by dividing it
 // by all potential prime numbers less than the sqrt of the candidate.
 //
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/ios.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/ios.cpp
index 7019eb4..e241394 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/ios.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/ios.cpp
@@ -56,7 +56,9 @@
     if (ev != static_cast<int>(io_errc::stream)
 #ifdef ELAST
         && ev <= ELAST
-#endif
+#elif defined(__linux__)
+        && ev <= 4095
+#endif  // ELAST
         )
         return __do_message::message(ev);
     return string("unspecified iostream_category error");
@@ -303,7 +305,7 @@
 ios_base::copyfmt(const ios_base& rhs)
 {
     // If we can't acquire the needed resources, throw bad_alloc (can't set badbit)
-    // Don't alter *this until all needed resources are aquired
+    // Don't alter *this until all needed resources are acquired
     unique_ptr<event_callback, void (*)(void*)> new_callbacks(0, free);
     unique_ptr<int, void (*)(void*)> new_ints(0, free);
     unique_ptr<long, void (*)(void*)> new_longs(0, free);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp
index 0fba54d..43bbd54 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp
@@ -842,7 +842,7 @@
     return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
     return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
     return isascii(c) ? _toupper_tab_[c + 1] : c;
 #else
     return (isascii(c) && iswlower_l(c, __cloc())) ? c-L'a'+L'A' : c;
@@ -858,7 +858,7 @@
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
         *low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low]
                              : *low;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
         *low = isascii(*low) ? _toupper_tab_[*low + 1] : *low;
 #else
         *low = (isascii(*low) && islower_l(*low, __cloc())) ? (*low-L'a'+L'A') : *low;
@@ -873,7 +873,7 @@
     return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
     return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
     return isascii(c) ? _tolower_tab_[c + 1] : c;
 #else
     return (isascii(c) && isupper_l(c, __cloc())) ? c-L'A'+'a' : c;
@@ -889,7 +889,7 @@
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
         *low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low]
                              : *low;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
         *low = isascii(*low) ? _tolower_tab_[*low + 1] : *low;
 #else
         *low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-L'A'+L'a' : *low;
@@ -958,9 +958,9 @@
 #elif defined(__NetBSD__)
     return static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]);
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
-    return isascii(c) ? 
+    return isascii(c) ?
       static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
     return isascii(c) ? _toupper_tab_[c + 1] : c;
 #else
     return (isascii(c) && islower_l(c, __cloc())) ? c-'a'+'A' : c;
@@ -979,7 +979,7 @@
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
         *low = isascii(*low) ?
           static_cast<char>(__classic_upper_table()[static_cast<size_t>(*low)]) : *low;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
         *low = isascii(*low) ? _toupper_tab_[*low + 1] : *low;
 #else
         *low = (isascii(*low) && islower_l(*low, __cloc())) ? *low-'a'+'A' : *low;
@@ -998,7 +998,7 @@
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
     return isascii(c) ?
       static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
     return isascii(c) ? _tolower_tab_[c + 1] : c;
 #else
     return (isascii(c) && isupper_l(c, __cloc())) ? c-'A'+'a' : c;
@@ -1015,7 +1015,7 @@
         *low = static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(*low)]);
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
         *low = isascii(*low) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(*low)]) : *low;
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) && !__LP64__
         *low = isascii(*low) ? _tolower_tab_[*low + 1] : *low;
 #else
         *low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-'A'+'a' : *low;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/memory.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/memory.cpp
index 666673f..2938538 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/memory.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/memory.cpp
@@ -119,7 +119,7 @@
 
 #endif  // _LIBCPP_NO_RTTI
 
-#if __has_feature(cxx_atomic)
+#if __has_feature(cxx_atomic) && !_LIBCPP_SINGLE_THREADED
 
 static const std::size_t __sp_mut_count = 16;
 static pthread_mutex_t mut_back_imp[__sp_mut_count] =
@@ -172,7 +172,7 @@
     return muts[hash<const void*>()(p) & (__sp_mut_count-1)];
 }
 
-#endif // __has_feature(cxx_atomic)
+#endif // __has_feature(cxx_atomic) && LIBCPP_HAS_PTHREADS
 
 void
 declare_reachable(void*)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/mutex.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/mutex.cpp
index 0767897..18a68b1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/mutex.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/mutex.cpp
@@ -14,6 +14,7 @@
 #include "cassert"
 
 _LIBCPP_BEGIN_NAMESPACE_STD
+#if !_LIBCPP_SINGLE_THREADED
 
 const defer_lock_t  defer_lock = {};
 const try_to_lock_t try_to_lock = {};
@@ -206,21 +207,27 @@
     }
 }
 
+#endif // !_LIBCPP_SINGLE_THREADED
+
 // If dispatch_once_f ever handles C++ exceptions, and if one can get to it
 // without illegal macros (unexpected macros not beginning with _UpperCase or
 // __lowercase), and if it stops spinning waiting threads, then call_once should
 // call into dispatch_once_f instead of here. Relevant radar this code needs to
 // keep in sync with:  7741191.
 
+#if !_LIBCPP_SINGLE_THREADED
 static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t  cv  = PTHREAD_COND_INITIALIZER;
+#endif
 
 void
 __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
 {
+#if !_LIBCPP_SINGLE_THREADED
     pthread_mutex_lock(&mut);
     while (flag == 1)
         pthread_cond_wait(&cv, &mut);
+#endif // !_LIBCPP_SINGLE_THREADED
     if (flag == 0)
     {
 #ifndef _LIBCPP_NO_EXCEPTIONS
@@ -228,26 +235,38 @@
         {
 #endif  // _LIBCPP_NO_EXCEPTIONS
             flag = 1;
+#if !_LIBCPP_SINGLE_THREADED
             pthread_mutex_unlock(&mut);
+#endif // !_LIBCPP_SINGLE_THREADED
             func(arg);
+#if !_LIBCPP_SINGLE_THREADED
             pthread_mutex_lock(&mut);
+#endif // !_LIBCPP_SINGLE_THREADED
             flag = ~0ul;
+#if !_LIBCPP_SINGLE_THREADED
             pthread_mutex_unlock(&mut);
             pthread_cond_broadcast(&cv);
+#endif // !_LIBCPP_SINGLE_THREADED
 #ifndef _LIBCPP_NO_EXCEPTIONS
         }
         catch (...)
         {
+#if !_LIBCPP_SINGLE_THREADED
             pthread_mutex_lock(&mut);
+#endif // !_LIBCPP_SINGLE_THREADED
             flag = 0ul;
+#if !_LIBCPP_SINGLE_THREADED
             pthread_mutex_unlock(&mut);
             pthread_cond_broadcast(&cv);
+#endif // !_LIBCPP_SINGLE_THREADED
             throw;
         }
 #endif  // _LIBCPP_NO_EXCEPTIONS
     }
+#if !_LIBCPP_SINGLE_THREADED
     else
         pthread_mutex_unlock(&mut);
+#endif // !_LIBCPP_SINGLE_THREADED
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp
index 9130ab3..24d50f6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/new.cpp
@@ -35,7 +35,8 @@
     #endif  // _LIBCPPABI_VERSION
 #endif
 
-#ifndef __GLIBCXX__
+// libc++abi provides operator new and delete as part of the abi layer.
+#if !defined(__GLIBCXX__) && !defined(_LIBCPPABI_VERSION)
 
 // Implement all new and delete operators as weak definitions
 // in this shared library, so that they can be overriden by programs
@@ -145,7 +146,7 @@
     ::operator delete[](ptr);
 }
 
-#endif // !__GLIBCXX__
+#endif // !defined(__GLIBCXX__) && !defined(_LIBCPPABI_VERSION)
 
 namespace std
 {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/random.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/random.cpp
index bd24f2e..86017ef 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/random.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/random.cpp
@@ -49,7 +49,7 @@
 random_device::random_device(const string& __token)
     : __f_(open(__token.c_str(), O_RDONLY))
 {
-    if (__f_ <= 0)
+    if (__f_ < 0)
         __throw_system_error(errno, ("random_device failed to open " + __token).c_str());
 }
 
@@ -62,7 +62,22 @@
 random_device::operator()()
 {
     unsigned r;
-    read(__f_, &r, sizeof(r));
+    size_t n = sizeof(r);
+    char* p = reinterpret_cast<char*>(&r);
+    while (n > 0)
+    {
+        ssize_t s = read(__f_, p, n);
+        if (s == 0)
+            __throw_system_error(ENODATA, "random_device got EOF");
+        if (s == -1)
+        {
+            if (errno != EINTR)
+                __throw_system_error(errno, "random_device got an unexpected error");
+            continue;
+        }
+        n -= static_cast<size_t>(s);
+        p += static_cast<size_t>(s);
+    }
     return r;
 }
 #endif // defined(_WIN32)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/shared_mutex.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/shared_mutex.cpp
index 5fb22e4..860e23a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/shared_mutex.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/shared_mutex.cpp
@@ -10,9 +10,11 @@
 #define _LIBCPP_BUILDING_SHARED_MUTEX
 #include "shared_mutex"
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-shared_mutex::shared_mutex()
+shared_timed_mutex::shared_timed_mutex()
     : __state_(0)
 {
 }
@@ -20,7 +22,7 @@
 // Exclusive ownership
 
 void
-shared_mutex::lock()
+shared_timed_mutex::lock()
 {
     unique_lock<mutex> lk(__mut_);
     while (__state_ & __write_entered_)
@@ -31,7 +33,7 @@
 }
 
 bool
-shared_mutex::try_lock()
+shared_timed_mutex::try_lock()
 {
     unique_lock<mutex> lk(__mut_);
     if (__state_ == 0)
@@ -43,7 +45,7 @@
 }
 
 void
-shared_mutex::unlock()
+shared_timed_mutex::unlock()
 {
     lock_guard<mutex> _(__mut_);
     __state_ = 0;
@@ -53,7 +55,7 @@
 // Shared ownership
 
 void
-shared_mutex::lock_shared()
+shared_timed_mutex::lock_shared()
 {
     unique_lock<mutex> lk(__mut_);
     while ((__state_ & __write_entered_) || (__state_ & __n_readers_) == __n_readers_)
@@ -64,7 +66,7 @@
 }
 
 bool
-shared_mutex::try_lock_shared()
+shared_timed_mutex::try_lock_shared()
 {
     unique_lock<mutex> lk(__mut_);
     unsigned num_readers = __state_ & __n_readers_;
@@ -79,7 +81,7 @@
 }
 
 void
-shared_mutex::unlock_shared()
+shared_timed_mutex::unlock_shared()
 {
     lock_guard<mutex> _(__mut_);
     unsigned num_readers = (__state_ & __n_readers_) - 1;
@@ -99,3 +101,7 @@
 
 
 _LIBCPP_END_NAMESPACE_STD
+
+#endif // !_LIBCPP_SINGLE_THREADED
+
+
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/stdexcept.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/stdexcept.cpp
index 6a46f34..26de25f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/stdexcept.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/stdexcept.cpp
@@ -7,124 +7,42 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "__refstring"
 #include "stdexcept"
 #include "new"
 #include "string"
-#include <cstdlib>
-#include <cstring>
-#include <cstdint>
-#include <cstddef>
 #include "system_error"
 
 #ifndef __has_include
 #define __has_include(inc) 0
 #endif
 
-#ifdef __APPLE__
-#include <cxxabi.h>
-#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>) || defined(__ANDROID__)
+/* For _LIBCPPABI_VERSION */
+#if __has_include(<cxxabi.h>) || defined(__APPLE_) || defined(LIBCXXRT) || defined(__ANDROID__)
 #include <cxxabi.h>
 #endif
 
-// Note:  optimize for size
-
-#if ! defined(_LIBCPP_MSVC)
-#pragma GCC visibility push(hidden)
-#endif
-
-namespace
-{
-
-class __libcpp_nmstr
-{
-private:
-    const char* str_;
-
-    typedef std::size_t unused_t;
-    typedef std::ptrdiff_t count_t;
-
-    static const std::ptrdiff_t offset = static_cast<std::ptrdiff_t>(2*sizeof(unused_t) +
-                                                                       sizeof(count_t));
-
-    count_t& count() const _NOEXCEPT {return *const_cast<count_t *>(reinterpret_cast<const count_t *>(str_ - sizeof(count_t)));}
-public:
-    explicit __libcpp_nmstr(const char* msg);
-    __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
-    __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
-    ~__libcpp_nmstr();
-    const char* c_str() const _NOEXCEPT {return str_;}
-};
-
-__libcpp_nmstr::__libcpp_nmstr(const char* msg)
-{
-    std::size_t len = strlen(msg);
-    str_ = new char[len + 1 + offset];
-    unused_t* c = reinterpret_cast<unused_t*>(const_cast<char *>(str_));
-    c[0] = c[1] = len;
-    str_ += offset;
-    count() = 0;
-    std::memcpy(const_cast<char*>(c_str()), msg, len + 1);
-}
-
-inline
-__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
-    : str_(s.str_)
-{
-    __sync_add_and_fetch(&count(), 1);
-}
-
-__libcpp_nmstr&
-__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
-{
-    const char* p = str_;
-    str_ = s.str_;
-    __sync_add_and_fetch(&count(), 1);
-    if (__sync_add_and_fetch(reinterpret_cast<count_t*>(const_cast<char*>(p)-sizeof(count_t)), count_t(-1)) < 0)
-        delete [] (p-offset);
-    return *this;
-}
-
-inline
-__libcpp_nmstr::~__libcpp_nmstr()
-{
-    if (__sync_add_and_fetch(&count(), count_t(-1)) < 0)
-        delete [] (str_ - offset);
-}
-
-}
-
-#if ! defined(_LIBCPP_MSVC)
-#pragma GCC visibility pop
-#endif
+static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
 
 namespace std  // purposefully not using versioning namespace
 {
 
-logic_error::logic_error(const string& msg)
+logic_error::logic_error(const string& msg) : __imp_(msg.c_str())
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    ::new(s) __libcpp_nmstr(msg.c_str());
 }
 
-logic_error::logic_error(const char* msg)
+logic_error::logic_error(const char* msg) : __imp_(msg)
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    ::new(s) __libcpp_nmstr(msg);
 }
 
-logic_error::logic_error(const logic_error& le) _NOEXCEPT
+logic_error::logic_error(const logic_error& le) _NOEXCEPT : __imp_(le.__imp_)
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
-    ::new(s) __libcpp_nmstr(*s2);
 }
 
 logic_error&
 logic_error::operator=(const logic_error& le) _NOEXCEPT
 {
-    __libcpp_nmstr *s1 = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
-    *s1 = *s2;
+    __imp_ = le.__imp_;
     return *this;
 }
 
@@ -132,44 +50,33 @@
 
 logic_error::~logic_error() _NOEXCEPT
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    s->~__libcpp_nmstr();
 }
 
 const char*
 logic_error::what() const _NOEXCEPT
 {
-    const __libcpp_nmstr *s = reinterpret_cast<const __libcpp_nmstr *>(&__imp_);
-    return s->c_str();
+    return __imp_.c_str();
 }
 
 #endif
 
-runtime_error::runtime_error(const string& msg)
+runtime_error::runtime_error(const string& msg) : __imp_(msg.c_str())
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    ::new(s) __libcpp_nmstr(msg.c_str());
 }
 
-runtime_error::runtime_error(const char* msg)
+runtime_error::runtime_error(const char* msg) : __imp_(msg)
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    ::new(s) __libcpp_nmstr(msg);
 }
 
 runtime_error::runtime_error(const runtime_error& le) _NOEXCEPT
+  : __imp_(le.__imp_)
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
-    ::new(s) __libcpp_nmstr(*s2);
 }
 
 runtime_error&
 runtime_error::operator=(const runtime_error& le) _NOEXCEPT
 {
-    __libcpp_nmstr *s1 = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    const __libcpp_nmstr *s2 = reinterpret_cast<const __libcpp_nmstr *>(&le.__imp_);
-    *s1 = *s2;
+    __imp_ = le.__imp_;
     return *this;
 }
 
@@ -177,15 +84,12 @@
 
 runtime_error::~runtime_error() _NOEXCEPT
 {
-    __libcpp_nmstr *s = reinterpret_cast<__libcpp_nmstr *>(&__imp_);
-    s->~__libcpp_nmstr();
 }
 
 const char*
 runtime_error::what() const _NOEXCEPT
 {
-    const __libcpp_nmstr *s = reinterpret_cast<const __libcpp_nmstr *>(&__imp_);
-    return s->c_str();
+    return __imp_.c_str();
 }
 
 domain_error::~domain_error() _NOEXCEPT {}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/string.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/string.cpp
index fde5212..653198c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/string.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/string.cpp
@@ -186,7 +186,7 @@
     const typename S::value_type* const p = str.c_str();
     typename remove_reference<decltype(errno)>::type errno_save = errno;
     errno = 0;
-    V r = f(p, &ptr);
+    V r = static_cast<V>(f(p, &ptr));
     swap(errno, errno_save);
     if (errno_save == ERANGE)
         throw_from_string_out_of_range(func);
@@ -206,7 +206,7 @@
 float
 as_float( const string& func, const string& s, size_t* idx )
 {
-    return as_float_helper<float>( func, s, idx, strtof );
+    return as_float_helper<float>( func, s, idx, strtod );
 }
 
 template<>
@@ -230,7 +230,7 @@
 float
 as_float( const string& func, const wstring& s, size_t* idx )
 {
-    return as_float_helper<float>( func, s, idx, wcstof );
+    return as_float_helper<float>( func, s, idx, wcstod );
 }
 
 template<>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/support/win32/support.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/support/win32/support.cpp
index 6ee31e0..e989681 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/support/win32/support.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/support/win32/support.cpp
@@ -107,8 +107,8 @@
 // Converts max_source_chars from the wide character buffer pointer to by *src,
 // into the multi byte character sequence buffer stored at dst which must be
 // dst_size_bytes bytes in size.
-// Returns >= 0: the number of bytes in the sequence sequence 
-// converted frome *src, excluding the null terminator.
+// Returns >= 0: the number of bytes in the sequence
+// converted from *src, excluding the null terminator.
 // Returns size_t(-1) if an error occurs, also sets errno.
 // If dst is NULL dst_size_bytes is ignored and no bytes are copied to dst 
 // and no "out" parameters are updated.
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/system_error.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/system_error.cpp
index b40409f..d5cb2d4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/system_error.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/system_error.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define	_LIBCPP_BUILDING_SYSTEM_ERROR
+#define _LIBCPP_BUILDING_SYSTEM_ERROR
 #include "system_error"
 #include "string"
 #include "cstring"
@@ -68,6 +68,9 @@
 #ifdef ELAST
     if (ev > ELAST)
       return string("unspecified generic_category error");
+#elif defined(__linux__)
+    if (ev > 4095)
+      return string("unspecified generic_category error");
 #endif  // ELAST
     return __do_message::message(ev);
 }
@@ -100,6 +103,9 @@
 #ifdef ELAST
     if (ev > ELAST)
       return string("unspecified system_category error");
+#elif defined(__linux__)
+    if (ev > 4095)
+      return string("unspecified system_category error");
 #endif  // ELAST
     return __do_message::message(ev);
 }
@@ -110,6 +116,9 @@
 #ifdef ELAST
     if (ev > ELAST)
       return error_condition(ev, system_category());
+#elif defined(__linux__)
+    if (ev > 4095)
+      return error_condition(ev, system_category());
 #endif  // ELAST
     return error_condition(ev, generic_category());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/src/thread.cpp b/sources/cxx-stl/llvm-libc++/libcxx/src/thread.cpp
index bd2b7c3..c03a42f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/src/thread.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/src/thread.cpp
@@ -27,6 +27,8 @@
 #include <windows.h>
 #endif
 
+#if !_LIBCPP_SINGLE_THREADED
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 thread::~thread()
@@ -121,7 +123,12 @@
             ts.tv_sec = ts_sec_max;
             ts.tv_nsec = giga::num - 1;
         }
-        nanosleep(&ts, 0);
+#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || defined(__ANDROID__)
+        while (nanosleep(&ts, &ts) == -1 && errno == EINTR)
+            ;
+#else
+#warning sleep_for not yet implemented
+#endif
     }
 }
 
@@ -223,3 +230,6 @@
 }
 
 _LIBCPP_END_NAMESPACE_STD
+
+#endif // !_LIBCPP_SINGLE_THREADED
+
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
index 3fa8b2c..71dfeef 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
@@ -27,12 +27,12 @@
     int ia[] = {1, 2, 3, 4};
     const unsigned sa = sizeof(ia)/sizeof(ia[0]);
     int ib[] = {1, 2, 3};
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+2));
-    assert(std::lexicographical_compare(ib, ib+2, ia, ia+sa));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+3));
-    assert(std::lexicographical_compare(ib, ib+3, ia, ia+sa));
-    assert(std::lexicographical_compare(ia, ia+sa, ib+1, ib+3));
-    assert(!std::lexicographical_compare(ib+1, ib+3, ia, ia+sa));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+2)));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+2),  Iter2(ia),   Iter2(ia+sa)));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+3)));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa)));
+    assert( std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib+1), Iter2(ib+3)));
+    assert(!std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa)));
 }
 
 int main()
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
index f5f1c07..c185156 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare_comp.pass.cpp
@@ -31,12 +31,12 @@
     int ib[] = {1, 2, 3};
     typedef std::greater<int> C;
     C c;
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+2, c));
-    assert(std::lexicographical_compare(ib, ib+2, ia, ia+sa, c));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+3, c));
-    assert(std::lexicographical_compare(ib, ib+3, ia, ia+sa, c));
-    assert(!std::lexicographical_compare(ia, ia+sa, ib+1, ib+3, c));
-    assert(std::lexicographical_compare(ib+1, ib+3, ia, ia+sa, c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+2),  c));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+2),  Iter2(ia),   Iter2(ia+sa), c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib),   Iter2(ib+3),  c));
+    assert( std::lexicographical_compare(Iter1(ib),   Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa), c));
+    assert(!std::lexicographical_compare(Iter1(ia),   Iter1(ia+sa), Iter2(ib+1), Iter2(ib+3),  c));
+    assert( std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3),  Iter2(ia),   Iter2(ia+sa), c));
 }
 
 int main()
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max.pass.cpp
index ebb42a9..c560c22 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max.pass.cpp
@@ -43,4 +43,12 @@
     test(x, y, x);
     test(y, x, x);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+    constexpr int x = 1;
+    constexpr int y = 0;
+    static_assert(std::max(x, y) == x, "" );
+    static_assert(std::max(y, x) == x, "" );
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp
index e92d2b9..95241af 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp
@@ -45,4 +45,12 @@
     test(x, y, std::greater<int>(), y);
     test(y, x, std::greater<int>(), y);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+    constexpr int x = 1;
+    constexpr int y = 0;
+    static_assert(std::max(x, y, std::greater<int>()) == y, "" );
+    static_assert(std::max(y, x, std::greater<int>()) == y, "" );
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
index c99c693..74e9fe6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
@@ -58,10 +58,28 @@
     test<Iter>(1000);
 }
 
+template <class Iter, class Pred>
+void test_eq0(Iter first, Iter last, Pred p)
+{
+    assert(first == std::max_element(first, last, p));
+}
+
+void test_eq()
+{
+    const size_t N = 10;
+    int* a = new int[N];
+    for (int i = 0; i < N; ++i)
+        a[i] = 10; // all the same
+    test_eq0(a, a+N, std::less<int>());
+    test_eq0(a, a+N, std::greater<int>());
+    delete [] a;
+}
+
 int main()
 {
     test<forward_iterator<const int*> >();
     test<bidirectional_iterator<const int*> >();
     test<random_access_iterator<const int*> >();
     test<const int*>();
+    test_eq();
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
index 0b28c83..0438412 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
@@ -31,5 +31,12 @@
     assert(i == 3);
     i = std::max({1, 3, 2});
     assert(i == 3);
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert(std::max({1, 3, 2}) == 3, "");
+    static_assert(std::max({2, 1, 3}) == 3, "");
+    static_assert(std::max({3, 2, 1}) == 3, "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
index 62484b2..4dd47a7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
@@ -32,5 +32,12 @@
     assert(i == 1);
     i = std::max({1, 3, 2}, std::greater<int>());
     assert(i == 1);
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert(std::max({1, 3, 2}, std::greater<int>()) == 1, "");
+    static_assert(std::max({2, 1, 3}, std::greater<int>()) == 1, "");
+    static_assert(std::max({3, 2, 1}, std::greater<int>()) == 1, "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min.pass.cpp
index 573adfa..bbbd97b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min.pass.cpp
@@ -43,4 +43,12 @@
     test(x, y, y);
     test(y, x, y);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+    constexpr int x = 1;
+    constexpr int y = 0;
+    static_assert(std::min(x, y) == y, "" );
+    static_assert(std::min(y, x) == y, "" );
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp
index 37205f5..4ef705e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_comp.pass.cpp
@@ -45,4 +45,12 @@
     test(x, y, std::greater<int>(), x);
     test(y, x, std::greater<int>(), x);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+    constexpr int x = 1;
+    constexpr int y = 0;
+    static_assert(std::min(x, y, std::greater<int>()) == x, "" );
+    static_assert(std::min(y, x, std::greater<int>()) == x, "" );
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
index 55d7215..2b5fdb1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
@@ -58,10 +58,28 @@
     test<Iter>(1000);
 }
 
+template <class Iter, class Pred>
+void test_eq0(Iter first, Iter last, Pred p)
+{
+    assert(first == std::min_element(first, last, p));
+}
+
+void test_eq()
+{
+    const size_t N = 10;
+    int* a = new int[N];
+    for (int i = 0; i < N; ++i)
+        a[i] = 10; // all the same
+    test_eq0(a, a+N, std::less<int>());
+    test_eq0(a, a+N, std::greater<int>());
+    delete [] a;
+}
+
 int main()
 {
     test<forward_iterator<const int*> >();
     test<bidirectional_iterator<const int*> >();
     test<random_access_iterator<const int*> >();
     test<const int*>();
+    test_eq();
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
index 33ac195..eed4ebd 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
@@ -31,5 +31,12 @@
     assert(i == 1);
     i = std::min({1, 3, 2});
     assert(i == 1);
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert(std::min({1, 3, 2}) == 1, "");
+    static_assert(std::min({2, 1, 3}) == 1, "");
+    static_assert(std::min({3, 2, 1}) == 1, "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
index c20b15b..5e0301b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
@@ -32,5 +32,12 @@
     assert(i == 3);
     i = std::min({1, 3, 2}, std::greater<int>());
     assert(i == 3);
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert(std::min({1, 3, 2}, std::greater<int>()) == 3, "");
+    static_assert(std::min({2, 1, 3}, std::greater<int>()) == 3, "");
+    static_assert(std::min({3, 2, 1}, std::greater<int>()) == 3, "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
index 6ebf964..6ac972a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax.pass.cpp
@@ -45,4 +45,18 @@
     test(x, y, y, x);
     test(y, x, y, x);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+//  Note that you can't take a reference to a local var, since 
+//  its address is not a compile-time constant.
+    constexpr static int x = 1;
+    constexpr static int y = 0;
+    constexpr auto p1 = std::minmax (x, y);
+    static_assert(p1.first  == y, "");
+    static_assert(p1.second == x, "");
+    constexpr auto p2 = std::minmax (y, x);
+    static_assert(p2.first  == y, "");
+    static_assert(p2.second == x, "");
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
index bddc01f..771c8f8 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
@@ -27,6 +27,7 @@
     assert(&p.second == &y);
 }
 
+
 int main()
 {
     {
@@ -47,4 +48,18 @@
     test(x, y, std::greater<int>(), x, y);
     test(y, x, std::greater<int>(), x, y);
     }
+#if _LIBCPP_STD_VER > 11
+    {
+//  Note that you can't take a reference to a local var, since 
+//  its address is not a compile-time constant.
+    constexpr static int x = 1;
+    constexpr static int y = 0;
+    constexpr auto p1 = std::minmax(x, y, std::greater<>());
+    static_assert(p1.first  == x, "");
+    static_assert(p1.second == y, "");
+    constexpr auto p2 = std::minmax(y, x, std::greater<>());
+    static_assert(p2.first  == x, "");
+    static_assert(p2.second == y, "");
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
index 57e0737..0196d10 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
@@ -25,5 +25,15 @@
     assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)));
     assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)));
     assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)));
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3)), "");
+    static_assert((std::minmax({1, 3, 2}) == std::pair<int, int>(1, 3)), "");
+    static_assert((std::minmax({2, 1, 3}) == std::pair<int, int>(1, 3)), "");
+    static_assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)), "");
+    static_assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)), "");
+    static_assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)), "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
index 9288ccc..95a8c85 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
@@ -26,5 +26,15 @@
     assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
     assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
     assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
+#if _LIBCPP_STD_VER > 11
+    {
+    static_assert((std::minmax({1, 2, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    static_assert((std::minmax({1, 3, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    static_assert((std::minmax({2, 1, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    static_assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    static_assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    static_assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)), "");
+    }
+#endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
index 5104ce9..dc5564e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
@@ -29,6 +29,7 @@
     std::random_shuffle(array, array+N);
     std::nth_element(array, array+M, array+N);
     assert(array[M] == M);
+    std::nth_element(array, array+N, array+N); // begin, end, end
     delete [] array;
 }
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
index 538ec22..cf86590 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
@@ -42,6 +42,7 @@
     std::random_shuffle(array, array+N);
     std::nth_element(array, array+M, array+N, std::greater<int>());
     assert(array[M] == N-M-1);
+    std::nth_element(array, array+N, array+N, std::greater<int>()); // begin, end, end
     delete [] array;
 }
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/MoveOnly.h b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/MoveOnly.h
index cf988cf..e4d9f64 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/MoveOnly.h
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/MoveOnly.h
@@ -17,14 +17,7 @@
 
 class MoveOnly
 {
-#if !defined(__clang__)
-// GCC 4.8 when compile containers/associative/map/map.cons/move_alloc.pass.cpp, etc,
-// complains about the following being private
-public:
-    MoveOnly(const MoveOnly&) {}
-#else
     MoveOnly(const MoveOnly&);
-#endif
     MoveOnly& operator=(const MoveOnly&);
 
     int data_;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.access/iterator.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.access/iterator.pass.cpp
index 7aa713c..552e87d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.access/iterator.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.access/iterator.pass.cpp
@@ -215,10 +215,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.cons/default.pass.cpp
index 2c6908e..1832a32 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/map/map.cons/default.pass.cpp
@@ -31,5 +31,10 @@
     assert(m.empty());
     assert(m.begin() == m.end());
     }
+    {
+    std::map<int, double> m = {};
+    assert(m.empty());
+    assert(m.begin() == m.end());
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/iterator.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/iterator.pass.cpp
index 1fdbfa1..2763129 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/iterator.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/iterator.pass.cpp
@@ -219,10 +219,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/multimap.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/multimap.cons/default.pass.cpp
index 2651d90..1c3ab8c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/multimap.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multimap/multimap.cons/default.pass.cpp
@@ -31,5 +31,10 @@
     assert(m.empty());
     assert(m.begin() == m.end());
     }
+    {
+    std::multimap<int, double> m = {};
+    assert(m.empty());
+    assert(m.begin() == m.end());
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/iterator.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/iterator.pass.cpp
index ccb6c66..d1f0ecf 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/iterator.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/iterator.pass.cpp
@@ -203,10 +203,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/multiset.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/multiset.cons/default.pass.cpp
index b6176c9..5bb0312 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/multiset.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/multiset/multiset.cons/default.pass.cpp
@@ -31,5 +31,10 @@
     assert(m.empty());
     assert(m.begin() == m.end());
     }
+    {
+    std::multiset<int> m = {};
+    assert(m.empty());
+    assert(m.begin() == m.end());
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/iterator.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/iterator.pass.cpp
index 39c8cc6..ecd950f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/iterator.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/iterator.pass.cpp
@@ -199,10 +199,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/set.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/set.cons/default.pass.cpp
index d047b12..746a2d1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/set.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/associative/set/set.cons/default.pass.cpp
@@ -31,5 +31,10 @@
     assert(m.empty());
     assert(m.begin() == m.end());
     }
+    {
+    std::set<int> m = {};
+    assert(m.empty());
+    assert(m.begin() == m.end());
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp
index 71353ae..82e44b4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp
@@ -13,6 +13,7 @@
 
 #include <queue>
 #include <cassert>
+#include <functional>
 
 template <class C>
 C
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp
index de96cd9..2c73cbc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp
@@ -13,6 +13,7 @@
 
 #include <queue>
 #include <cassert>
+#include <functional>
 
 template <class C>
 C
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp
index 84839b1..f1129bc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp
@@ -13,6 +13,7 @@
 
 #include <queue>
 #include <cassert>
+#include <functional>
 
 template <class C>
 C
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp
index bb3cde9..17a698c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <queue>
 #include <cassert>
+#include <functional>
 
 int main()
 {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/array/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/array/iterators.pass.cpp
index 3014fd5..98997d8 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/array/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/array/iterators.pass.cpp
@@ -72,10 +72,23 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
+        assert (!(ii1 <  cii ));
+        assert (!(cii <  ii1 ));
+        assert ( (ii1 <= cii ));
+        assert ( (cii <= ii1 ));
+        assert (!(ii1 >  cii ));
+        assert (!(cii >  ii1 ));
+        assert ( (ii1 >= cii ));
+        assert ( (cii >= ii1 ));
+        assert (cii - ii1 == 0);
+        assert (ii1 - cii == 0);
 
         C c;
         assert ( c.begin()   == std::begin(c));
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.cons/default.pass.cpp
index f8754f1..b725dad 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.cons/default.pass.cpp
@@ -24,6 +24,10 @@
 {
     std::deque<T, Allocator> d;
     assert(d.size() == 0);
+#if __cplusplus >= 201103L
+    std::deque<T, Allocator> d1 = {};
+    assert(d1.size() == 0);
+#endif
 }
 
 int main()
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
index 0aee63e..3e62879 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
@@ -19,12 +19,16 @@
 
 
 class CMyClass {
-    public: CMyClass();
+    public: CMyClass(int tag);
     public: CMyClass(const CMyClass& iOther);
     public: ~CMyClass();
 
-    private: int fMagicValue;
-
+    bool equal(const CMyClass &rhs) const
+        { return fTag == rhs.fTag && fMagicValue == rhs.fMagicValue; }
+    private:
+        int fMagicValue;
+        int fTag;
+        
     private: static int kStartedConstructionMagicValue;
     private: static int kFinishedConstructionMagicValue;
 };
@@ -34,15 +38,15 @@
 // Value for fMagicValue when the constructor has finished running
 int CMyClass::kFinishedConstructionMagicValue = 12345;
 
-CMyClass::CMyClass() :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(int tag) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(tag)
 {
     // Signal that the constructor has finished running
     fMagicValue = kFinishedConstructionMagicValue;
 }
 
-CMyClass::CMyClass(const CMyClass& /*iOther*/) :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(const CMyClass& iOther) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
     if (gCopyConstructorShouldThow) {
@@ -57,17 +61,21 @@
     assert(fMagicValue == kFinishedConstructionMagicValue);
 }
 
+bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); }
+
 int main()
 {
-    CMyClass instance;
+    CMyClass instance(42);
     std::deque<CMyClass> vec;
 
     vec.push_back(instance);
+    std::deque<CMyClass> vec2(vec);
 
     gCopyConstructorShouldThow = true;
     try {
         vec.push_back(instance);
     }
     catch (...) {
+        assert(vec==vec2);
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
index 662f9a4..6ae06db 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
@@ -19,12 +19,16 @@
 
 
 class CMyClass {
-    public: CMyClass();
+    public: CMyClass(int tag);
     public: CMyClass(const CMyClass& iOther);
     public: ~CMyClass();
 
-    private: int fMagicValue;
-
+    bool equal(const CMyClass &rhs) const
+        { return fTag == rhs.fTag && fMagicValue == rhs.fMagicValue; }
+    private:
+        int fMagicValue;
+        int fTag;
+        
     private: static int kStartedConstructionMagicValue;
     private: static int kFinishedConstructionMagicValue;
 };
@@ -34,15 +38,15 @@
 // Value for fMagicValue when the constructor has finished running
 int CMyClass::kFinishedConstructionMagicValue = 12345;
 
-CMyClass::CMyClass() :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(int tag) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(tag)
 {
     // Signal that the constructor has finished running
     fMagicValue = kFinishedConstructionMagicValue;
 }
 
-CMyClass::CMyClass(const CMyClass& /*iOther*/) :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(const CMyClass& iOther) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
     if (gCopyConstructorShouldThow) {
@@ -57,17 +61,21 @@
     assert(fMagicValue == kFinishedConstructionMagicValue);
 }
 
+bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); }
+
 int main()
 {
-    CMyClass instance;
+    CMyClass instance(42);
     std::deque<CMyClass> vec;
 
     vec.push_front(instance);
+    std::deque<CMyClass> vec2(vec);
 
     gCopyConstructorShouldThow = true;
     try {
         vec.push_front(instance);
     }
     catch (...) {
+        assert(vec==vec2);
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/iterators.pass.cpp
index 9140e02..8ec491f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/deque/iterators.pass.cpp
@@ -51,11 +51,24 @@
         std::deque<int>::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
 
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
+        assert (!(ii1 <  cii ));
+        assert (!(cii <  ii1 ));
+        assert ( (ii1 <= cii ));
+        assert ( (cii <= ii1 ));
+        assert (!(ii1 >  cii ));
+        assert (!(cii >  ii1 ));
+        assert ( (ii1 >= cii ));
+        assert ( (cii >= ii1 ));
+        assert (cii - ii1 == 0);
+        assert (ii1 - cii == 0);
+        
 //         std::deque<int> c;
 //         assert ( ii1 != c.cbegin());
 //         assert ( cii != c.begin());
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp
index dcc438c..38e95fa 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp
@@ -31,5 +31,11 @@
         C c;
         assert(c.empty());
     }
+    {
+        typedef int T;
+        typedef std::forward_list<T> C;
+        C c = {};
+        assert(c.empty());
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
index 02e17d7..6f3ac54 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp
@@ -127,10 +127,13 @@
         std::forward_list<int>::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
+ 
+        assert (!(ii1 != ii2 ));
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
 
 //         std::forward_list<int> c;
 //         assert ( ii1 != c.cbegin());
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/iterators.pass.cpp
index a843334..a33ee3e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/iterators.pass.cpp
@@ -143,10 +143,13 @@
         std::list<int>::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
 
         assert ( ii1 != c.cbegin());
         assert ( cii != c.begin());
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/list.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/list.cons/default.pass.cpp
index 6962d28..c05bd74 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/list.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/list/list.cons/default.pass.cpp
@@ -49,5 +49,10 @@
         assert(l.size() == 0);
         assert(std::distance(l.begin(), l.end()) == 0);
     }
+    {
+        std::list<int> l = {};
+        assert(l.size() == 0);
+        assert(std::distance(l.begin(), l.end()) == 0);
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/construct_default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/construct_default.pass.cpp
index 51ecbb1..d3d6670 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/construct_default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/construct_default.pass.cpp
@@ -26,6 +26,12 @@
     assert(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
+#if __cplusplus >= 201103L
+    C c1 = {};
+    assert(c1.__invariants());
+    assert(c1.empty());
+    assert(c1.get_allocator() == typename C::allocator_type());
+#endif
 }
 
 template <class C>
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/find.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/find.pass.cpp
index 8bad87e..75567a9 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/find.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/find.pass.cpp
@@ -25,6 +25,7 @@
             std::vector<bool> b(i,true);
             std::vector<bool>::iterator j = std::find(b.begin()+1, b.end(), false);
             assert(j-b.begin() == i);
+            assert(b.end() == j);
         }
     }
     {
@@ -33,6 +34,7 @@
             std::vector<bool> b(i,false);
             std::vector<bool>::iterator j = std::find(b.begin()+1, b.end(), true);
             assert(j-b.begin() == i);
+            assert(b.end() == j);
         }
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/iterators.pass.cpp
index b63f6a6..c54fa4a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector.bool/iterators.pass.cpp
@@ -101,9 +101,23 @@
         std::vector<bool>::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
+        assert (!(ii1 <  cii ));
+        assert (!(cii <  ii1 ));
+        assert ( (ii1 <= cii ));
+        assert ( (cii <= ii1 ));
+        assert (!(ii1 >  cii ));
+        assert (!(cii >  ii1 ));
+        assert ( (ii1 >= cii ));
+        assert ( (cii >= ii1 ));
+        assert (cii - ii1 == 0);
+        assert (ii1 - cii == 0);
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/asan.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/asan.pass.cpp
new file mode 100644
index 0000000..86c02b2
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/asan.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <vector>
+
+// reference operator[](size_type n);
+
+#include <vector>
+#include <cassert>
+#include <cstdlib>
+
+#include "min_allocator.h"
+#include "asan_testing.h"
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __asan_set_error_exit_code(int);
+
+int main()
+{
+#if __cplusplus >= 201103L
+    {
+        typedef int T;
+        typedef std::vector<T, min_allocator<T>> C;
+        const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+        C c(std::begin(t), std::end(t));
+        c.reserve(2*c.size());
+        T foo = c[c.size()];    // bad, but not caught by ASAN
+    }
+#endif
+    
+    __asan_set_error_exit_code(0);
+    {
+        typedef int T;
+        typedef std::vector<T> C;
+        const T t[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+        C c(std::begin(t), std::end(t));
+        c.reserve(2*c.size());
+        assert(is_contiguous_container_asan_correct(c)); 
+        assert(!__sanitizer_verify_contiguous_container ( c.data(), c.data() + 1, c.data() + c.capacity()));
+        T foo = c[c.size()];    // should trigger ASAN
+        assert(false);          // if we got here, ASAN didn't trigger
+    }
+}
+#else
+int main () { return 0; }
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/iterators.pass.cpp
index 82de665..75a0828 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/iterators.pass.cpp
@@ -143,9 +143,23 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
+        assert (!(ii1 <  cii ));
+        assert (!(cii <  ii1 ));
+        assert ( (ii1 <= cii ));
+        assert ( (cii <= ii1 ));
+        assert (!(ii1 >  cii ));
+        assert (!(cii >  ii1 ));
+        assert ( (ii1 >= cii ));
+        assert ( (cii >= ii1 ));
+        assert (cii - ii1 == 0);
+        assert (ii1 - cii == 0);
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
index a22c6da..21082c8 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/capacity.pass.cpp
@@ -15,29 +15,34 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v;
         assert(v.capacity() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
         assert(v.capacity() == 100);
         v.push_back(0);
         assert(v.capacity() > 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         assert(v.capacity() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
         assert(v.capacity() == 100);
         v.push_back(0);
         assert(v.capacity() > 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
index 2914af9..4df5702 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/reserve.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,6 +23,7 @@
         std::vector<int> v;
         v.reserve(10);
         assert(v.capacity() >= 10);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
@@ -32,6 +34,7 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 250> > v(100);
@@ -42,12 +45,14 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(10);
         assert(v.capacity() >= 10);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
@@ -58,6 +63,7 @@
         v.reserve(150);
         assert(v.size() == 100);
         assert(v.capacity() == 150);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
index e415cee..a47c513 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../stack_allocator.h"
 #include "../../../MoveOnly.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -25,18 +26,22 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> > v(100);
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #else  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
@@ -44,18 +49,22 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 300> > v(100);
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #if __cplusplus >= 201103L
@@ -64,9 +73,11 @@
         v.resize(50);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
index 49f373a..de5126b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -27,6 +28,7 @@
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
         for (unsigned i = 0; i < 50; ++i)
             assert(v[i] == 0);
         for (unsigned i = 50; i < 200; ++i)
@@ -40,6 +42,7 @@
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -47,10 +50,12 @@
         v.resize(50, 1);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert((v == std::vector<int, min_allocator<int>>(50)));
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
         for (unsigned i = 0; i < 50; ++i)
             assert(v[i] == 0);
         for (unsigned i = 50; i < 200; ++i)
@@ -61,9 +66,11 @@
         v.resize(50, 1);
         assert(v.size() == 50);
         assert(v.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.resize(200, 1);
         assert(v.size() == 200);
         assert(v.capacity() >= 200);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
index 6b0cce4..49ab9cc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
@@ -15,39 +15,48 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, stack_allocator<int, 401> > v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #ifndef _LIBCPP_NO_EXCEPTIONS
     {
         std::vector<int, stack_allocator<int, 400> > v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 200);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v(100);
         v.push_back(1);
+        assert(is_contiguous_container_asan_correct(v)); 
         v.shrink_to_fit();
         assert(v.capacity() == 101);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/swap.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
index 46d8403..f3d9289 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.capacity/swap.pass.cpp
@@ -15,27 +15,36 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v1(100);
         std::vector<int> v2(200);
+        assert(is_contiguous_container_asan_correct(v1)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         v1.swap(v2);
         assert(v1.size() == 200);
         assert(v1.capacity() == 200);
+        assert(is_contiguous_container_asan_correct(v1)); 
         assert(v2.size() == 100);
         assert(v2.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v1(100);
         std::vector<int, min_allocator<int>> v2(200);
+        assert(is_contiguous_container_asan_correct(v1)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         v1.swap(v2);
         assert(v1.size() == 200);
         assert(v1.capacity() == 200);
+        assert(is_contiguous_container_asan_correct(v1)); 
         assert(v2.size() == 100);
         assert(v2.capacity() == 100);
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
index c0dafce..f5c06b1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d;
     d.assign({3, 4, 5, 6});
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -33,6 +35,7 @@
     std::vector<int, min_allocator<int>> d;
     d.assign({3, 4, 5, 6});
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
index 1365038..d87ac86 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/assign_move.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -28,54 +29,72 @@
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(test_allocator<MoveOnly>(5));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(test_allocator<MoveOnly>(6));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(6));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2(other_allocator<MoveOnly>(6));
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2(min_allocator<MoveOnly>{});
         l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
index f8b66f4..75772be 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp
@@ -18,6 +18,7 @@
 #include "../../../NotConstructible.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -27,6 +28,14 @@
     assert(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c)); 
+#if __cplusplus >= 201103L
+    C c1 = {};
+    assert(c1.__invariants());
+    assert(c1.empty());
+    assert(c1.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c1)); 
+#endif
 }
 
 template <class C>
@@ -37,6 +46,7 @@
     assert(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
index 8dde17f..36e231a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
@@ -17,6 +17,7 @@
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C, class Iterator>
 void
@@ -25,6 +26,7 @@
     C c(first, last);
     assert(c.__invariants());
     assert(c.size() == std::distance(first, last));
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
index 9edc10c..7fa748a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
@@ -18,6 +18,7 @@
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C, class Iterator, class A>
 void
@@ -26,6 +27,7 @@
     C c(first, last, a);
     assert(c.__invariants());
     assert(c.size() == std::distance(first, last));
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
index c6bbf6e..e033895 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size.pass.cpp
@@ -17,6 +17,7 @@
 #include "DefaultOnly.h"
 #include "min_allocator.h"
 #include "test_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -27,6 +28,7 @@
     assert(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == a);
+    assert(is_contiguous_container_asan_correct(c)); 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
@@ -42,6 +44,7 @@
     assert(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == typename C::allocator_type());
+    assert(is_contiguous_container_asan_correct(c)); 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
index 6a52d52..5b6c498 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
@@ -16,6 +16,7 @@
 
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -24,6 +25,7 @@
     C c(n, x);
     assert(c.__invariants());
     assert(c.size() == n);
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
index 5653521..c62b841 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -24,6 +25,7 @@
     assert(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
+    assert(is_contiguous_container_asan_correct(c)); 
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy.pass.cpp
index 6962f70..677963d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -25,6 +26,7 @@
     assert(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
@@ -37,15 +39,23 @@
     {
         std::vector<int, test_allocator<int> > v(3, 2, test_allocator<int>(5));
         std::vector<int, test_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == v.get_allocator());
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
     {
         std::vector<int, other_allocator<int> > v(3, 2, other_allocator<int>(5));
         std::vector<int, other_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == other_allocator<int>(-2));
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #if __cplusplus >= 201103L
@@ -57,8 +67,12 @@
     {
         std::vector<int, min_allocator<int> > v(3, 2, min_allocator<int>());
         std::vector<int, min_allocator<int> > v2 = v;
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
         assert(v2 == v);
         assert(v2.get_allocator() == v.get_allocator());
+        assert(is_contiguous_container_asan_correct(v)); 
+        assert(is_contiguous_container_asan_correct(v2)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
index 7ff2a1e..128328c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 template <class C>
 void
@@ -25,6 +26,7 @@
     assert(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
+    assert(is_contiguous_container_asan_correct(c)); 
 }
 
 int main()
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/default.recursive.pass.cpp
similarity index 72%
copy from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
copy to sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/default.recursive.pass.cpp
index 060fb92..1a4a189 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/default.recursive.pass.cpp
@@ -7,17 +7,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-// <shared_mutex>
+// <vector>
+// class vector
+// vector();
 
-// class shared_mutex;
+#include <vector>
 
-// shared_mutex();
-
-#include <shared_mutex>
+struct X
+{
+    std::vector<X> q;
+};
 
 int main()
 {
-#if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
-#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
index f231fcf..7eb834f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -21,6 +22,7 @@
     {
     std::vector<int> d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -30,6 +32,7 @@
     {
     std::vector<int, min_allocator<int>> d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
index b57d2ed..5d7ae88 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp
@@ -16,6 +16,7 @@
 
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,6 +25,7 @@
     std::vector<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
     assert(d.get_allocator() == test_allocator<int>(3));
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -34,6 +36,7 @@
     std::vector<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
     assert(d.get_allocator() == min_allocator<int>());
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move.pass.cpp
index f09e346..bb61d54 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,58 +24,79 @@
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
         std::vector<int>::const_iterator i = c1.begin();
         std::vector<int> c2 = std::move(c1);
+        assert(is_contiguous_container_asan_correct(c2)); 
         std::vector<int>::iterator j = c2.erase(i);
         assert(*j == 3);
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2 = std::move(l);
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
         std::vector<int, min_allocator<int>>::const_iterator i = c1.begin();
         std::vector<int, min_allocator<int>> c2 = std::move(c1);
+        assert(is_contiguous_container_asan_correct(c2)); 
         std::vector<int, min_allocator<int>>::iterator j = c2.erase(i);
         assert(*j == 3);
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
index 0aac64d..1923e68 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,55 +24,75 @@
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(std::move(l), test_allocator<MoveOnly>(6));
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(6));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, test_allocator<MoveOnly> > l(test_allocator<MoveOnly>(5));
         std::vector<MoveOnly, test_allocator<MoveOnly> > lo(test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, test_allocator<MoveOnly> > l2(std::move(l), test_allocator<MoveOnly>(5));
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == test_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
     {
         std::vector<MoveOnly, other_allocator<MoveOnly> > l(other_allocator<MoveOnly>(5));
         std::vector<MoveOnly, other_allocator<MoveOnly> > lo(other_allocator<MoveOnly>(5));
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, other_allocator<MoveOnly> > l2(std::move(l), other_allocator<MoveOnly>(4));
         assert(l2 == lo);
         assert(!l.empty());
         assert(l2.get_allocator() == other_allocator<MoveOnly>(4));
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<MoveOnly, min_allocator<MoveOnly> > l(min_allocator<MoveOnly>{});
         std::vector<MoveOnly, min_allocator<MoveOnly> > lo(min_allocator<MoveOnly>{});
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         for (int i = 1; i <= 3; ++i)
         {
             l.push_back(i);
             lo.push_back(i);
         }
+        assert(is_contiguous_container_asan_correct(l)); 
+        assert(is_contiguous_container_asan_correct(lo)); 
         std::vector<MoveOnly, min_allocator<MoveOnly> > l2(std::move(l), min_allocator<MoveOnly>());
         assert(l2 == lo);
         assert(l.empty());
         assert(l2.get_allocator() == min_allocator<MoveOnly>());
+        assert(is_contiguous_container_asan_correct(l2)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
index 13ec845..592b714 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d;
     d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
@@ -33,6 +35,7 @@
     std::vector<int, min_allocator<int>> d;
     d = {3, 4, 5, 6};
     assert(d.size() == 4);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(d[0] == 3);
     assert(d[1] == 4);
     assert(d[2] == 5);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data.pass.cpp
index 4bda599..aed56bc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data.pass.cpp
@@ -15,25 +15,30 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         std::vector<int> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data_const.pass.cpp
index 7cb64f8..cb60626 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.data/data_const.pass.cpp
@@ -15,25 +15,30 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     {
         const std::vector<int> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         const std::vector<int> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         const std::vector<int, min_allocator<int>> v;
         assert(v.data() == 0);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         const std::vector<int, min_allocator<int>> v(100);
         assert(v.data() == &v.front());
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
index 37298a5..8af6bda 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
@@ -66,6 +67,7 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cend(), 3, 4.5);
         assert(i == c.end()-1);
         assert(c.size() == 2);
@@ -73,6 +75,7 @@
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cbegin()+1, 4, 6.5);
         assert(i == c.begin()+1);
         assert(c.size() == 3);
@@ -82,6 +85,7 @@
         assert(c[1].getd() == 6.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
     {
         std::vector<A, stack_allocator<A, 7> > c;
@@ -90,6 +94,7 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cend(), 3, 4.5);
         assert(i == c.end()-1);
         assert(c.size() == 2);
@@ -97,6 +102,7 @@
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         i = c.emplace(c.cbegin()+1, 4, 6.5);
         assert(i == c.begin()+1);
         assert(c.size() == 3);
@@ -106,6 +112,7 @@
         assert(c[1].getd() == 6.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #if _LIBCPP_DEBUG >= 1
     {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
index a399433..bbf91a4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
@@ -61,12 +62,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
     {
         std::vector<A, stack_allocator<A, 4> > c;
@@ -74,12 +77,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -88,12 +93,14 @@
         assert(c.size() == 1);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
+        assert(is_contiguous_container_asan_correct(c)); 
         c.emplace_back(3, 4.5);
         assert(c.size() == 2);
         assert(c.front().geti() == 2);
         assert(c.front().getd() == 3.5);
         assert(c.back().geti() == 3);
         assert(c.back().getd() == 4.5);
+        assert(is_contiguous_container_asan_correct(c)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
index 04ff228..85a4707 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,31 +23,39 @@
     {
         std::vector<int> v;
         v.reserve(3);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int> v;
         v.reserve(4);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(3);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
     {
         std::vector<int, min_allocator<int>> v;
         v.reserve(4);
+        assert(is_contiguous_container_asan_correct(v)); 
         v = { 1, 2, 3 };
         v.emplace(v.begin(), v.back());
         assert(v[0] == 3);
+        assert(is_contiguous_container_asan_correct(v)); 
     }
 #endif
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
index fb9d808..7a850ed 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,6 +23,7 @@
     int a1[] = {1, 2, 3};
     std::vector<int> l1(a1, a1+3);
     std::vector<int>::const_iterator i = l1.begin();
+    assert(is_contiguous_container_asan_correct(l1)); 
     ++i;
     std::vector<int>::iterator j = l1.erase(i);
     assert(l1.size() == 2);
@@ -29,21 +31,25 @@
     assert(*j == 3);
     assert(*l1.begin() == 1);
     assert(*next(l1.begin()) == 3);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(j);
     assert(j == l1.end());
     assert(l1.size() == 1);
     assert(distance(l1.begin(), l1.end()) == 1);
     assert(*l1.begin() == 1);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(l1.begin());
     assert(j == l1.end());
     assert(l1.size() == 0);
     assert(distance(l1.begin(), l1.end()) == 0);
+    assert(is_contiguous_container_asan_correct(l1)); 
     }
 #if __cplusplus >= 201103L
     {
     int a1[] = {1, 2, 3};
     std::vector<int, min_allocator<int>> l1(a1, a1+3);
     std::vector<int, min_allocator<int>>::const_iterator i = l1.begin();
+    assert(is_contiguous_container_asan_correct(l1)); 
     ++i;
     std::vector<int, min_allocator<int>>::iterator j = l1.erase(i);
     assert(l1.size() == 2);
@@ -51,15 +57,18 @@
     assert(*j == 3);
     assert(*l1.begin() == 1);
     assert(*next(l1.begin()) == 3);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(j);
     assert(j == l1.end());
     assert(l1.size() == 1);
     assert(distance(l1.begin(), l1.end()) == 1);
     assert(*l1.begin() == 1);
+    assert(is_contiguous_container_asan_correct(l1)); 
     j = l1.erase(l1.begin());
     assert(j == l1.end());
     assert(l1.size() == 0);
     assert(distance(l1.begin(), l1.end()) == 0);
+    assert(is_contiguous_container_asan_correct(l1)); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
index e82d3a0..bfc18bc 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp
@@ -15,84 +15,113 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
     int a1[] = {1, 2, 3};
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), l1.cbegin());
         assert(l1.size() == 3);
         assert(distance(l1.cbegin(), l1.cend()) == 3);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin()));
         assert(l1.size() == 2);
         assert(distance(l1.cbegin(), l1.cend()) == 2);
         assert(i == l1.begin());
         assert(l1 == std::vector<int>(a1+1, a1+3));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2));
         assert(l1.size() == 1);
         assert(distance(l1.cbegin(), l1.cend()) == 1);
         assert(i == l1.begin());
         assert(l1 == std::vector<int>(a1+2, a1+3));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3));
         assert(l1.size() == 0);
         assert(distance(l1.cbegin(), l1.cend()) == 0);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<std::vector<int> > outer(2, std::vector<int>(1));
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
         outer.erase(outer.begin(), outer.begin());
         assert(outer.size() == 2);
         assert(outer[0].size() == 1);
         assert(outer[1].size() == 1);
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
     }
 #if __cplusplus >= 201103L
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), l1.cbegin());
         assert(l1.size() == 3);
         assert(distance(l1.cbegin(), l1.cend()) == 3);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin()));
         assert(l1.size() == 2);
         assert(distance(l1.cbegin(), l1.cend()) == 2);
         assert(i == l1.begin());
         assert((l1 == std::vector<int, min_allocator<int>>(a1+1, a1+3)));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2));
         assert(l1.size() == 1);
         assert(distance(l1.cbegin(), l1.cend()) == 1);
         assert(i == l1.begin());
         assert((l1 == std::vector<int, min_allocator<int>>(a1+2, a1+3)));
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<int, min_allocator<int>> l1(a1, a1+3);
+        assert(is_contiguous_container_asan_correct(l1)); 
         std::vector<int, min_allocator<int>>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3));
         assert(l1.size() == 0);
         assert(distance(l1.cbegin(), l1.cend()) == 0);
         assert(i == l1.begin());
+        assert(is_contiguous_container_asan_correct(l1)); 
     }
     {
         std::vector<std::vector<int, min_allocator<int>>, min_allocator<std::vector<int, min_allocator<int>>>> outer(2, std::vector<int, min_allocator<int>>(1));
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
         outer.erase(outer.begin(), outer.begin());
         assert(outer.size() == 2);
         assert(outer[0].size() == 1);
         assert(outer[1].size() == 1);
+        assert(is_contiguous_container_asan_correct(outer)); 
+        assert(is_contiguous_container_asan_correct(outer[0])); 
+        assert(is_contiguous_container_asan_correct(outer[1])); 
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
index 386a4f6b..30b8017 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -23,6 +24,7 @@
     std::vector<int> d(10, 1);
     std::vector<int>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
     assert(d.size() == 14);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(i == d.begin() + 2);
     assert(d[0] == 1);
     assert(d[1] == 1);
@@ -44,6 +46,7 @@
     std::vector<int, min_allocator<int>> d(10, 1);
     std::vector<int, min_allocator<int>>::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6});
     assert(d.size() == 14);
+    assert(is_contiguous_container_asan_correct(d)); 
     assert(i == d.begin() + 2);
     assert(d[0] == 1);
     assert(d[1] == 1);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
index 97255b0..cf24a87 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
@@ -21,6 +21,7 @@
 #include "../../../stack_allocator.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -31,6 +32,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -47,6 +49,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -63,6 +66,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -79,6 +83,7 @@
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -107,6 +112,7 @@
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, input_iterator<const int*>(a),
                                         input_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -123,6 +129,7 @@
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, forward_iterator<const int*>(a),
                                         forward_iterator<const int*>(a+N));
         assert(v.size() == 100 + N);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
index 7ceb933..cf3715c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp
@@ -20,6 +20,7 @@
 #include "../../../stack_allocator.h"
 #include "../../../MoveOnly.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -28,6 +29,7 @@
         std::vector<MoveOnly> v(100);
         std::vector<MoveOnly>::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -40,6 +42,7 @@
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> > v(100);
         std::vector<MoveOnly, stack_allocator<MoveOnly, 300> >::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -61,6 +64,7 @@
         std::vector<MoveOnly, min_allocator<MoveOnly>> v(100);
         std::vector<MoveOnly, min_allocator<MoveOnly>>::iterator i = v.insert(v.cbegin() + 10, MoveOnly(3));
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
index 322c9ff..42effc7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -26,6 +27,7 @@
         std::vector<int> v(100);
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -39,6 +41,7 @@
         std::vector<int, stack_allocator<int, 300> > v(100);
         std::vector<int, stack_allocator<int, 300> >::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -61,6 +64,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -74,6 +78,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 5, 1);
         assert(v.size() == 105);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
index 28c7718..feb74c0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
@@ -19,6 +19,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -26,6 +27,7 @@
         std::vector<int> v(100);
         std::vector<int>::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -38,6 +40,7 @@
         std::vector<int, stack_allocator<int, 300> > v(100);
         std::vector<int, stack_allocator<int, 300> >::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
@@ -60,6 +63,7 @@
         std::vector<int, min_allocator<int>> v(100);
         std::vector<int, min_allocator<int>>::iterator i = v.insert(v.cbegin() + 10, 1);
         assert(v.size() == 101);
+        assert(is_contiguous_container_asan_correct(v)); 
         assert(i == v.begin() + 10);
         int j;
         for (j = 0; j < 10; ++j)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
index 5446b74..eeeba62 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
@@ -15,6 +15,7 @@
 #include <cassert>
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -22,22 +23,27 @@
         std::vector<int> c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
@@ -45,22 +51,27 @@
         std::vector<int, stack_allocator<int, 15> > c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
@@ -69,22 +80,27 @@
         std::vector<int, min_allocator<int>> c;
         c.push_back(0);
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(1);
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(2);
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(3);
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
         c.push_back(4);
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == j);
     }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
index cd81e60..6615a25 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
@@ -14,17 +14,23 @@
 #include <vector>
 #include <cassert>
 
+#include "asan_testing.h"
+
 // Flag that makes the copy constructor for CMyClass throw an exception
 static bool gCopyConstructorShouldThow = false;
 
 
 class CMyClass {
-    public: CMyClass();
+    public: CMyClass(int tag);
     public: CMyClass(const CMyClass& iOther);
     public: ~CMyClass();
 
-    private: int fMagicValue;
-
+    bool equal(const CMyClass &rhs) const
+        { return fTag == rhs.fTag && fMagicValue == rhs.fMagicValue; }
+    private:
+        int fMagicValue;
+        int fTag;
+        
     private: static int kStartedConstructionMagicValue;
     private: static int kFinishedConstructionMagicValue;
 };
@@ -34,15 +40,15 @@
 // Value for fMagicValue when the constructor has finished running
 int CMyClass::kFinishedConstructionMagicValue = 12345;
 
-CMyClass::CMyClass() :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(int tag) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(tag)
 {
     // Signal that the constructor has finished running
     fMagicValue = kFinishedConstructionMagicValue;
 }
 
-CMyClass::CMyClass(const CMyClass& /*iOther*/) :
-    fMagicValue(kStartedConstructionMagicValue)
+CMyClass::CMyClass(const CMyClass& iOther) :
+    fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
     if (gCopyConstructorShouldThow) {
@@ -57,17 +63,24 @@
     assert(fMagicValue == kFinishedConstructionMagicValue);
 }
 
+bool operator==(const CMyClass &lhs, const CMyClass &rhs) { return lhs.equal(rhs); }
+
 int main()
 {
-    CMyClass instance;
+    CMyClass instance(42);
     std::vector<CMyClass> vec;
 
     vec.push_back(instance);
+    std::vector<CMyClass> vec2(vec);
+    assert(is_contiguous_container_asan_correct(vec)); 
+    assert(is_contiguous_container_asan_correct(vec2)); 
 
     gCopyConstructorShouldThow = true;
     try {
         vec.push_back(instance);
     }
     catch (...) {
+        assert(vec==vec2);
+        assert(is_contiguous_container_asan_correct(vec)); 
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
index bb1af29..be48893 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
@@ -16,6 +16,7 @@
 #include "../../../MoveOnly.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,22 +25,27 @@
         std::vector<MoveOnly> c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
@@ -47,22 +53,27 @@
         std::vector<MoveOnly, stack_allocator<MoveOnly, 15> > c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
@@ -71,22 +82,27 @@
         std::vector<MoveOnly, min_allocator<MoveOnly>> c;
         c.push_back(MoveOnly(0));
         assert(c.size() == 1);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(1));
         assert(c.size() == 2);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(2));
         assert(c.size() == 3);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(3));
         assert(c.size() == 4);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
         c.push_back(MoveOnly(4));
         assert(c.size() == 5);
+        assert(is_contiguous_container_asan_correct(c)); 
         for (int j = 0; j < c.size(); ++j)
             assert(c[j] == MoveOnly(j));
     }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.special/swap.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.special/swap.pass.cpp
index a7d0c40..27001ae 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.special/swap.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/sequences/vector/vector.special/swap.pass.cpp
@@ -16,6 +16,7 @@
 #include <cassert>
 #include "test_allocator.h"
 #include "min_allocator.h"
+#include "asan_testing.h"
 
 int main()
 {
@@ -24,40 +25,56 @@
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1 == std::vector<int>(a2, a2+sizeof(a2)/sizeof(a2[0])));
         assert(c2 == std::vector<int>(a1, a1+sizeof(a1)/sizeof(a1[0])));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1);
         std::vector<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1 == std::vector<int>(a2, a2+sizeof(a2)/sizeof(a2[0])));
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2 == std::vector<int>(a1, a1+sizeof(a1)/sizeof(a1[0])));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int> c1(a1, a1);
         std::vector<int> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #ifndef _LIBCPP_DEBUG_LEVEL
 // This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
@@ -80,11 +97,15 @@
         typedef other_allocator<int> A;
         std::vector<int, A> c1(a1, a1+sizeof(a1)/sizeof(a1[0]), A(1));
         std::vector<int, A> c2(a2, a2+sizeof(a2)/sizeof(a2[0]), A(2));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, A>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c1.get_allocator() == A(2));
         assert((c2 == std::vector<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
         assert(c2.get_allocator() == A(1));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #if __cplusplus >= 201103L
     {
@@ -92,40 +113,56 @@
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int, min_allocator<int>> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, min_allocator<int>>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert((c2 == std::vector<int, min_allocator<int>>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1);
         std::vector<int, min_allocator<int>> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, min_allocator<int>>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
         std::vector<int, min_allocator<int>> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert((c2 == std::vector<int, min_allocator<int>>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
     {
         int a1[] = {1, 3, 7, 9, 10};
         int a2[] = {0, 2, 4, 5, 6, 8, 11};
         std::vector<int, min_allocator<int>> c1(a1, a1);
         std::vector<int, min_allocator<int>> c2(a2, a2);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert(c1.empty());
         assert(distance(c1.begin(), c1.end()) == 0);
         assert(c2.empty());
         assert(distance(c2.begin(), c2.end()) == 0);
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #ifndef _LIBCPP_DEBUG_LEVEL
 // This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
@@ -135,11 +172,15 @@
         typedef min_allocator<int> A;
         std::vector<int, A> c1(a1, a1+sizeof(a1)/sizeof(a1[0]), A());
         std::vector<int, A> c2(a2, a2+sizeof(a2)/sizeof(a2[0]), A());
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
         swap(c1, c2);
         assert((c1 == std::vector<int, A>(a2, a2+sizeof(a2)/sizeof(a2[0]))));
         assert(c1.get_allocator() == A());
         assert((c2 == std::vector<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
         assert(c2.get_allocator() == A());
+        assert(is_contiguous_container_asan_correct(c1)); 
+        assert(is_contiguous_container_asan_correct(c2)); 
     }
 #endif
 #endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/bucket_count.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/bucket_count.pass.cpp
index 9b8b4ab..d3e80d8 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/bucket_count.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/bucket_count.pass.cpp
@@ -39,7 +39,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -67,7 +67,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/count.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/count.pass.cpp
index ebacf2b..50abb53 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/count.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/count.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -51,7 +51,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/eq.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/eq.pass.cpp
index 17184e6..9258378 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/eq.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/eq.pass.cpp
@@ -35,7 +35,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -73,7 +73,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -101,7 +101,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -121,7 +121,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -141,7 +141,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_const.pass.cpp
index d61c2e2..fe166c9 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_non_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
index 508205a..9e8d1a9 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/equal_range_non_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_const.pass.cpp
index ee897d9..120efa3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_non_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_non_const.pass.cpp
index efab12b..7582a79 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_non_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/find_non_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/iterators.pass.cpp
index 4ac126a..47b1d73 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/iterators.pass.cpp
@@ -116,10 +116,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
         
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/load_factor.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/load_factor.pass.cpp
index 3b12480..472e41a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/load_factor.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/load_factor.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/swap_member.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/swap_member.pass.cpp
index 6e6503e..8ab1eb6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/swap_member.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/swap_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -165,7 +165,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -181,7 +181,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -247,7 +247,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -263,7 +263,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -346,7 +346,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -362,7 +362,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -428,7 +428,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -444,7 +444,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -527,7 +527,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -543,7 +543,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
index 622ce50..fa01056 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
@@ -86,7 +86,7 @@
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
         C *p = &c;
-		c = *p;
+        c = *p;
         assert(c.size() == 4);
         assert(std::is_permutation(c.begin(), c.end(), a));
     }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
index 42f1faa..a0825db 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
@@ -65,5 +65,14 @@
         assert(c.load_factor() == 0);
         assert(c.max_load_factor() == 1);
     }
+    {
+        std::unordered_map<int, int> c = {};
+        assert(c.bucket_count() == 0);
+        assert(c.size() == 0);
+        assert(c.empty());
+        assert(std::distance(c.begin(), c.end()) == 0);
+        assert(c.load_factor() == 0);
+        assert(c.max_load_factor() == 1);
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
index 6993a7e..7e04b8d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -165,7 +165,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -181,7 +181,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -247,7 +247,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -263,7 +263,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -346,7 +346,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -362,7 +362,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -428,7 +428,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -444,7 +444,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
@@ -527,7 +527,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -543,7 +543,7 @@
         assert(c1.at(10) == "ten");
         assert(c1.at(20) == "twenty");
         assert(c1.at(30) == "thirty");
-        assert(c1.at(40) == "fourty");
+        assert(c1.at(40) == "forty");
         assert(c1.at(50) == "fifty");
         assert(c1.at(60) == "sixty");
         assert(c1.at(70) == "seventy");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unorder.map.modifiers/erase_key.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unorder.map.modifiers/erase_key.pass.cpp
index e6741a8..0e8ef8b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unorder.map.modifiers/erase_key.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.map/unorder.map.modifiers/erase_key.pass.cpp
@@ -21,6 +21,23 @@
 
 #include "min_allocator.h"
 
+#if __cplusplus >= 201103L
+template <typename Unordered>
+bool only_deletions ( const Unordered &whole, const Unordered &part ) {
+    typename Unordered::const_iterator w = whole.begin();
+    typename Unordered::const_iterator p = part.begin();
+    
+    while ( w != whole.end () && p != part.end()) {        
+        if ( *w == *p )
+            p++;
+        w++;
+        }
+
+    return p == part.end();
+}
+#endif
+
+
 int main()
 {
     {
@@ -137,5 +154,24 @@
         assert(c.erase(3) == 0);
         assert(c.size() == 0);
     }
+    {
+    typedef std::unordered_map<int, int> C;
+    C m, m2;
+    for ( int i = 0; i < 10; ++i ) {
+        m[i] = i;
+        m2[i] = i;
+        }
+    
+    C::iterator i = m2.begin();
+    int ctr = 0;
+    while (i != m2.end()) {
+        if (ctr++ % 2 == 0)
+            m2.erase(i++);
+        else
+            ++i;
+        }
+
+    assert (only_deletions (m, m2));
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/bucket_count.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/bucket_count.pass.cpp
index 66d84e9..d44412f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/bucket_count.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/bucket_count.pass.cpp
@@ -37,7 +37,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/count.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/count.pass.cpp
index 66ac28c..efaf02e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/count.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/count.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/eq.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/eq.pass.cpp
index 3e6eaf6..3604e77 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/eq.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/eq.pass.cpp
@@ -36,7 +36,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -58,7 +58,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -80,7 +80,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -111,7 +111,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -134,7 +134,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
@@ -157,7 +157,7 @@
             P(20, "twenty"),
             P(20, "twenty 2"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fifty 2"),
             P(50, "fifty 3"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
index 11116e9..67613b0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -68,7 +68,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
index 98d6862..eb4c019 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/equal_range_non_const.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
@@ -68,7 +68,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(50, "fiftyA"),
             P(50, "fiftyB"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_const.pass.cpp
index 0d9ccaa..bc2650d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_non_const.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_non_const.pass.cpp
index fd623d9..5a128c0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_non_const.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/find_non_const.pass.cpp
@@ -31,7 +31,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -54,7 +54,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/iterators.pass.cpp
index 8a3faa8..1831cf1 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/iterators.pass.cpp
@@ -122,10 +122,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/load_factor.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/load_factor.pass.cpp
index 0d25ef5..f407097 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/load_factor.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/load_factor.pass.cpp
@@ -32,7 +32,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -57,7 +57,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/swap_member.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/swap_member.pass.cpp
index 12822a9..225eccd 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/swap_member.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/swap_member.pass.cpp
@@ -67,7 +67,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -83,7 +83,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -168,7 +168,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -184,7 +184,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -252,7 +252,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -268,7 +268,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -353,7 +353,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -369,7 +369,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -437,7 +437,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -453,7 +453,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -538,7 +538,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -554,7 +554,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
index b7a01a4..1884065 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
@@ -65,5 +65,14 @@
         assert(c.load_factor() == 0);
         assert(c.max_load_factor() == 1);
     }
+    {
+        std::unordered_multimap<int, int> c = {};
+        assert(c.bucket_count() == 0);
+        assert(c.size() == 0);
+        assert(c.empty());
+        assert(std::distance(c.begin(), c.end()) == 0);
+        assert(c.load_factor() == 0);
+        assert(c.max_load_factor() == 1);
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp
index 3c099f3..892f8a2 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp
@@ -21,6 +21,22 @@
 
 #include "min_allocator.h"
 
+#if __cplusplus >= 201103L
+template <typename Unordered>
+bool only_deletions ( const Unordered &whole, const Unordered &part ) {
+    typename Unordered::const_iterator w = whole.begin();
+    typename Unordered::const_iterator p = part.begin();
+    
+    while ( w != whole.end () && p != part.end()) {
+        if ( *w == *p )
+            p++;
+        w++;
+        }
+
+    return p == part.end();
+}
+#endif
+
 int main()
 {
     {
@@ -347,5 +363,26 @@
         assert(std::distance(c.begin(), c.end()) == c.size());
         assert(std::distance(c.cbegin(), c.cend()) == c.size());
     }
+    {
+    typedef std::unordered_multimap<int, int> C;
+    C m, m2;
+    for ( int i = 0; i < 10; ++i ) {
+        for (int j = 0; j < 2; ++j ) {
+            m.insert (std::make_pair(i,j));
+            m2.insert(std::make_pair(i,j));
+            }
+        }
+    
+    C::iterator i = m2.begin();
+    int ctr = 0;
+    while (i != m2.end()) {
+        if (ctr++ % 2 == 0)
+            m2.erase(i++);
+        else
+            ++i;
+        }
+
+    assert (only_deletions (m, m2));
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
index a73d7fc..0f579e0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
@@ -66,7 +66,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -82,7 +82,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -167,7 +167,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -183,7 +183,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -251,7 +251,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -267,7 +267,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -352,7 +352,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -368,7 +368,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -436,7 +436,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -452,7 +452,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
@@ -537,7 +537,7 @@
             P(10, "ten"),
             P(20, "twenty"),
             P(30, "thirty"),
-            P(40, "fourty"),
+            P(40, "forty"),
             P(50, "fifty"),
             P(60, "sixty"),
             P(70, "seventy"),
@@ -553,7 +553,7 @@
         assert(c1.find(10)->second == "ten");
         assert(c1.find(20)->second == "twenty");
         assert(c1.find(30)->second == "thirty");
-        assert(c1.find(40)->second == "fourty");
+        assert(c1.find(40)->second == "forty");
         assert(c1.find(50)->second == "fifty");
         assert(c1.find(60)->second == "sixty");
         assert(c1.find(70)->second == "seventy");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/erase_key.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/erase_key.pass.cpp
index 646d356..7c24397 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/erase_key.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/erase_key.pass.cpp
@@ -21,6 +21,22 @@
 
 #include "min_allocator.h"
 
+#if __cplusplus >= 201103L
+template <typename Unordered>
+bool only_deletions ( const Unordered &whole, const Unordered &part ) {
+    typename Unordered::const_iterator w = whole.begin();
+    typename Unordered::const_iterator p = part.begin();
+    
+    while ( w != whole.end () && p != part.end()) {
+        if ( *w == *p )
+            p++;
+        w++;
+        }
+
+    return p == part.end();
+}
+#endif
+
 int main()
 {
     {
@@ -137,5 +153,24 @@
         assert(c.erase(3) == 0);
         assert(c.size() == 0);
     }
+    {
+    typedef std::unordered_multiset<int> C;
+    C m, m2;
+    for ( int i = 0; i < 10; ++i ) {
+        m.insert(i);  m.insert(i);
+        m2.insert(i); m2.insert(i);
+        }
+    
+    C::iterator i = m2.begin();
+    int ctr = 0;
+    while (i != m2.end()) {
+        if (ctr++ % 2 == 0)
+            m2.erase(i++);
+        else
+            ++i;
+        }
+
+    assert (only_deletions (m, m2));
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/iterators.pass.cpp
index fd7077b..be95b44 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/iterators.pass.cpp
@@ -115,10 +115,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
index 6726bc1..737ae2d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
@@ -61,5 +61,14 @@
         assert(c.load_factor() == 0);
         assert(c.max_load_factor() == 1);
     }
+    {
+        std::unordered_multiset<int> c = {};
+        assert(c.bucket_count() == 0);
+        assert(c.size() == 0);
+        assert(c.empty());
+        assert(std::distance(c.begin(), c.end()) == 0);
+        assert(c.load_factor() == 0);
+        assert(c.max_load_factor() == 1);
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/erase_key.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/erase_key.pass.cpp
index d97374a..ca16508 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/erase_key.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/erase_key.pass.cpp
@@ -21,6 +21,22 @@
 
 #include "min_allocator.h"
 
+#if __cplusplus >= 201103L
+template <typename Unordered>
+bool only_deletions ( const Unordered &whole, const Unordered &part ) {
+    typename Unordered::const_iterator w = whole.begin();
+    typename Unordered::const_iterator p = part.begin();
+    
+    while ( w != whole.end () && p != part.end()) {
+        if ( *w == *p )
+            p++;
+        w++;
+        }
+
+    return p == part.end();
+}
+#endif
+
 int main()
 {
     {
@@ -136,5 +152,24 @@
         assert(c.erase(3) == 0);
         assert(c.size() == 0);
     }
+    {
+    typedef std::unordered_set<int> C;
+    C m, m2;
+    for ( int i = 0; i < 10; ++i ) {
+        m.insert(i);
+        m2.insert(i);
+        }
+    
+    C::iterator i = m2.begin();
+    int ctr = 0;
+    while (i != m2.end()) {
+        if (ctr++ % 2 == 0)
+            m2.erase(i++);
+        else
+            ++i;
+        }
+
+    assert (only_deletions (m, m2));
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/iterators.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/iterators.pass.cpp
index d88310e..d3a4580 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/iterators.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/iterators.pass.cpp
@@ -115,10 +115,13 @@
         C::const_iterator cii{};
         assert ( ii1 == ii2 );
         assert ( ii1 == ii4 );
-        assert ( ii1 == cii );
 
-        assert ( !(ii1 != ii2 ));
-        assert ( !(ii1 != cii ));
+        assert (!(ii1 != ii2 ));
+
+        assert ( (ii1 == cii ));
+        assert ( (cii == ii1 ));
+        assert (!(ii1 != cii ));
+        assert (!(cii != ii1 ));
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
index ee901fb..6efa9ed 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
@@ -61,5 +61,14 @@
         assert(c.load_factor() == 0);
         assert(c.max_load_factor() == 1);
     }
+    {
+        std::unordered_set<int> c = {};
+        assert(c.bucket_count() == 0);
+        assert(c.size() == 0);
+        assert(c.empty());
+        assert(std::distance(c.begin(), c.end()) == 0);
+        assert(c.load_factor() == 0);
+        assert(c.max_load_factor() == 1);
+    }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/math_h.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/math_h.pass.cpp
index cd07710..a789707 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/math_h.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/math_h.pass.cpp
@@ -82,9 +82,9 @@
 void test_fabs()
 {
     static_assert((std::is_same<decltype(fabs((double)0)), double>::value), "");
-    static_assert((std::is_same<decltype(fabsf(0)), float>::value), "");
-    static_assert((std::is_same<decltype(fabsl(0)), long double>::value), "");
-    assert(fabs(-1) == 1);
+    static_assert((std::is_same<decltype(fabsf(0.f)), float>::value), "");
+    static_assert((std::is_same<decltype(fabsl(0.L)), long double>::value), "");
+    assert(fabs(-1.f) == 1);
 }
 
 void test_floor()
@@ -221,7 +221,10 @@
 void test_isinf()
 {
     static_assert((std::is_same<decltype(isinf((float)0)), bool>::value), "");
+#if !(defined(__ANDROID__) && (__LP64__ || __ANDROID_API__ >= 21))
+ // 64-bit bionic isinf(double) returns int.  
     static_assert((std::is_same<decltype(isinf((double)0)), bool>::value), "");
+#endif
     static_assert((std::is_same<decltype(isinf((long double)0)), bool>::value), "");
     assert(isinf(-1.0) == false);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
index ddcb725..b5cb18a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -23,7 +23,7 @@
     std::error_condition e_cond = e_cat1.default_error_condition(5);
     assert(e_cond.value() == 5);
     assert(e_cond.category() == std::generic_category());
-    e_cond = e_cat1.default_error_condition(500);
-    assert(e_cond.value() == 500);
+    e_cond = e_cat1.default_error_condition(5000);
+    assert(e_cond.value() == 5000);
     assert(e_cond.category() == std::system_category());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.fail.cpp
similarity index 71%
copy from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
copy to sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.fail.cpp
index 060fb92..8eeffb5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.fail.cpp
@@ -7,17 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-// <shared_mutex>
-
-// class shared_mutex;
-
-// shared_mutex();
-
-#include <shared_mutex>
+#include <assert.h>
+#include <ext/hash_map>
+#include <string>
 
 int main()
 {
-#if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
-#endif
+    assert(__gnu_cxx::hash<std::string>()(std::string()) == 0);  // error
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.pass.cpp
new file mode 100644
index 0000000..884614e
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash/specializations.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <assert.h>
+#include <ext/hash_map>
+#include <string>
+
+int main()
+{
+    char str[] = "test";
+    assert(__gnu_cxx::hash<const char *>()("test") ==
+           std::hash<std::string>()("test"));
+    assert(__gnu_cxx::hash<char *>()(str) == std::hash<std::string>()("test"));
+    assert(__gnu_cxx::hash<char>()(42) == 42);
+    assert(__gnu_cxx::hash<signed char>()(42) == 42);
+    assert(__gnu_cxx::hash<unsigned char>()(42) == 42);
+    assert(__gnu_cxx::hash<short>()(42) == 42);
+    assert(__gnu_cxx::hash<unsigned short>()(42) == 42);
+    assert(__gnu_cxx::hash<int>()(42) == 42);
+    assert(__gnu_cxx::hash<unsigned int>()(42) == 42);
+    assert(__gnu_cxx::hash<long>()(42) == 42);
+    assert(__gnu_cxx::hash<unsigned long>()(42) == 42);
+}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash_map/const_iterator.fail.cpp
similarity index 69%
copy from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
copy to sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash_map/const_iterator.fail.cpp
index 060fb92..e4c536e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/hash_map/const_iterator.fail.cpp
@@ -7,17 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-// <shared_mutex>
-
-// class shared_mutex;
-
-// shared_mutex();
-
-#include <shared_mutex>
+#include <ext/hash_map>
 
 int main()
 {
-#if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
-#endif
+    __gnu_cxx::hash_map<int, int> m;
+    m[1] = 1;
+    const __gnu_cxx::hash_map<int, int> &cm = m;
+    cm.find(1)->second = 2;  // error
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/extensions/nothing_to_do.pass.cpp
similarity index 100%
copy from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do.pass.cpp
copy to sources/cxx-stl/llvm-libc++/libcxx/test/extensions/nothing_to_do.pass.cpp
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
index 01a5656..eb15fac 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
@@ -19,23 +19,6 @@
 #include <fstream>
 #include <cassert>
 
-template <class CharT>
-struct test_buf
-    : public std::basic_filebuf<CharT>
-{
-    typedef std::basic_filebuf<CharT> base;
-    typedef typename base::char_type  char_type;
-    typedef typename base::int_type   int_type;
-    typedef typename base::pos_type   pos_type;
-
-    char_type* eback() const {return base::eback();}
-    char_type* gptr()  const {return base::gptr();}
-    char_type* egptr() const {return base::egptr();}
-    void gbump(int n) {base::gbump(n);}
-
-    virtual int_type underflow() {return base::underflow();}
-};
-
 int main()
 {
     {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
index 5eda96f..52b3566 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp
@@ -76,4 +76,22 @@
         assert(!is.eof());
         assert(!is.fail());
     }
+    {
+        testbuf<char> sb("12345678");
+        std::istream is(&sb);
+        void* n = 0;
+        is >> n;
+        assert(n == (void*)0x12345678);
+        assert( is.eof());
+        assert(!is.fail());
+    }
+    {
+        testbuf<wchar_t> sb(L"12345678");
+        std::wistream is(&sb);
+        void* n = 0;
+        is >> n;
+        assert(n == (void*)0x12345678);
+        assert( is.eof());
+        assert(!is.fail());
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
index d1fd89b..3c8159a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.manip/ws.pass.cpp
@@ -56,4 +56,24 @@
         assert(is.good());
         assert(is.peek() == L'1');
     }
+    {
+        testbuf<char> sb("  ");
+        std::istream is(&sb);
+        ws(is);
+        assert(!is.fail());
+        assert(is.eof());
+        ws(is);
+        assert(is.eof());
+        assert(is.fail());
+    }
+    {
+        testbuf<wchar_t> sb(L"  ");
+        std::wistream is(&sb);
+        ws(is);
+        assert(!is.fail());
+        assert(is.eof());
+        ws(is);
+        assert(is.eof());
+        assert(is.fail());
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
index 3d4df9c..41a721d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
index d060ccc..cf06e34 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
index 545f94d..ccc3545 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
index 636cf07..20e70cf 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
index 60f816d..01eecb5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <istream>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp
index 1f6b126..d09b3ca 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp
@@ -28,13 +28,13 @@
     }
 
 void both_ways ( const char *p ) {
-	std::string str(p);
-	auto q = std::quoted(str);
+    std::string str(p);
+    auto q = std::quoted(str);
 
     std::stringstream ss;
     bool skippingws = is_skipws ( &ss );
-	ss << q;
-	ss >> q;
+    ss << q;
+    ss >> q;
     }
 
 void round_trip ( const char *p ) {
@@ -92,6 +92,20 @@
     return s;
 }
 
+void test_padding () {
+    {
+    std::stringstream ss;
+    ss << std::left << std::setw(10) << std::setfill('!') << std::quoted("abc", '`');
+    assert ( ss.str() == "`abc`!!!!!" );
+    }
+    
+    {
+    std::stringstream ss;
+    ss << std::right << std::setw(10) << std::setfill('!') << std::quoted("abc", '`');
+    assert ( ss.str() == "!!!!!`abc`" );
+    }
+}
+
 
 void round_trip ( const wchar_t *p ) {
     std::wstringstream ss;
@@ -197,6 +211,7 @@
 
     assert ( unquote (  "" ) ==  "" ); // nothing there
     assert ( unquote ( L"" ) == L"" ); // nothing there
+    test_padding ();
     }
 
 #else
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/iterator.range/begin-end.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/iterator.range/begin-end.pass.cpp
index 65d1a7b..abb6433 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/iterator.range/begin-end.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/iterator.range/begin-end.pass.cpp
@@ -52,7 +52,7 @@
     assert ( std::end(c)     == c.end());
 #if _LIBCPP_STD_VER > 11
 //  initializer_list doesn't have cbegin/cend/rbegin/rend
-//	but std::cbegin(),etc work (b/c they're general fn templates)
+//  but std::cbegin(),etc work (b/c they're general fn templates)
 //     assert ( std::cbegin(c)  == c.cbegin());
 //     assert ( std::cbegin(c)  != c.cend());
 //     assert ( std::cend(c)    == c.cend());
@@ -104,6 +104,20 @@
 #endif
     }
 
+template<typename T, size_t Sz>
+void test_const_array( const T (&array)[Sz] ) {
+    assert ( std::begin(array)  == array );
+    assert (*std::begin(array)  ==  array[0] );
+    assert ( std::begin(array)  != std::end(array));
+    assert ( std::end(array)    == array + Sz);
+#if _LIBCPP_STD_VER > 11
+    assert ( std::cbegin(array) == array );
+    assert (*std::cbegin(array) == array[0] );
+    assert ( std::cbegin(array) != std::cend(array));
+    assert ( std::cend(array)   == array + Sz);
+#endif
+    }
+
 int main(){
     std::vector<int> v; v.push_back(1);
     std::list<int> l;   l.push_back(2);
@@ -119,6 +133,14 @@
     test_const_container ( l, 2 );
     test_const_container ( a, 3 );
     test_const_container ( il, 4 );
+    
+    static constexpr int arrA [] { 1, 2, 3 };
+    test_const_array ( arrA );
+#if _LIBCPP_STD_VER > 11
+    constexpr const int *b = std::cbegin(arrA);
+    constexpr const int *e = std::cend(arrA);
+    static_assert(e - b == 3, "");
+#endif
 }
 
 #else
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp
index e9238f6..f280adb 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.cons/container.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <iterator>
 #include <vector>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -26,4 +27,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp
index e73fa32..c6ff047 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/post.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -31,4 +32,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp
index 7fa229b..2b9f245 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op++/pre.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp
index d764017..f50f309 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op_astrk/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp
index 35ba237..30e4140 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.inserter/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -30,4 +31,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp
index dad1af8..1a148e6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.cons/container.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <iterator>
 #include <list>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -26,4 +27,5 @@
 int main()
 {
     test(std::list<int>());
+    test(nasty_list<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp
index dc77533..7489227 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/post.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <list>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -31,4 +32,5 @@
 int main()
 {
     test(std::list<int>());
+    test(nasty_list<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp
index ac54304..e6d6c07 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op++/pre.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <list>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::list<int>());
+    test(nasty_list<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp
index c7ec844..cdca9bf 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp
@@ -17,6 +17,7 @@
 #include <iterator>
 #include <list>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -42,4 +43,5 @@
 int main()
 {
     test(std::list<Copyable>());
+    test(nasty_list<Copyable>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp
index b24a8f4..1ff49dd 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op_astrk/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <list>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::list<int>());
+    test(nasty_list<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp
index 4f3742f..c18f84b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.inserter/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <list>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -30,4 +31,5 @@
 int main()
 {
     test(std::list<int>());
+    test(nasty_list<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp
index cd2c8a3..9f17240 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.cons/test.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <iterator>
 #include <vector>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -26,4 +27,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp
index 94d97be..7d81a7b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/post.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -31,4 +32,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp
index 373a0b8..08e6ced 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op++/pre.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp
index db838e5..01eb35e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/lv_value.pass.cpp
@@ -18,6 +18,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -45,6 +46,7 @@
 
 int main()
 {
+    {
     typedef std::vector<int> C;
     C c1;
     for (int i = 0; i < 3; ++i)
@@ -61,4 +63,23 @@
     c2 = c1;
     insert3at(c2, c2.begin()+3, 'a', 'b', 'c');
     test(c1, 3, 'a', 'b', 'c', c2);
+    }
+    {
+    typedef nasty_vector<int> C;
+    C c1;
+    for (int i = 0; i < 3; ++i)
+        c1.push_back(i);
+    C c2 = c1;
+    insert3at(c2, c2.begin(), 'a', 'b', 'c');
+    test(c1, 0, 'a', 'b', 'c', c2);
+    c2 = c1;
+    insert3at(c2, c2.begin()+1, 'a', 'b', 'c');
+    test(c1, 1, 'a', 'b', 'c', c2);
+    c2 = c1;
+    insert3at(c2, c2.begin()+2, 'a', 'b', 'c');
+    test(c1, 2, 'a', 'b', 'c', c2);
+    c2 = c1;
+    insert3at(c2, c2.begin()+3, 'a', 'b', 'c');
+    test(c1, 3, 'a', 'b', 'c', c2);
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
index 36d85b0..2033683 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op=/rv_value.pass.cpp
@@ -56,6 +56,7 @@
 int main()
 {
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    {
     typedef std::unique_ptr<int, do_nothing> Ptr;
     typedef std::vector<Ptr> C;
     C c1;
@@ -91,5 +92,6 @@
         c2.push_back(Ptr(x+i));
     insert3at(c2, c2.begin()+3, Ptr(x+3), Ptr(x+4), Ptr(x+5));
     test(std::move(c1), 3, Ptr(x+3), Ptr(x+4), Ptr(x+5), c2);
+    }
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp
index 29b908e..1a926b5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.op_astrk/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -29,4 +30,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp
index 5707f9d..43f28d0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/inserter/test.pass.cpp
@@ -16,6 +16,7 @@
 #include <iterator>
 #include <vector>
 #include <cassert>
+#include "nasty_containers.hpp"
 
 template <class C>
 void
@@ -30,4 +31,5 @@
 int main()
 {
     test(std::vector<int>());
+    test(nasty_vector<int>());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp
new file mode 100644
index 0000000..98b7331
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <iterator>
+
+// reverse_iterator
+
+// template <class Iterator> reverse_iterator<Iterator>
+//     make_reverse_iterator(Iterator i);
+
+#include <iterator>
+#include <cassert>
+
+#include "test_iterators.h"
+
+#if _LIBCPP_STD_VER > 11
+
+template <class It>
+void
+test(It i)
+{
+    const std::reverse_iterator<It> r = std::make_reverse_iterator(i);
+    assert(r.base() == i);
+}
+
+int main()
+{
+    const char* s = "1234567890";
+    random_access_iterator<const char*>b(s);
+    random_access_iterator<const char*>e(s+10);
+    while ( b != e )
+        test ( b++ );
+}
+#else
+int main () {}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp
index 7055e27..7a77598 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp
@@ -15,6 +15,8 @@
 
 // Be sure to respect LWG 198:
 //    http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198
+// LWG 198 was superseded by LWG 2360
+//    http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2360
 
 #include <iterator>
 #include <cassert>
@@ -31,26 +33,6 @@
 };
 
 template <class It>
-class weird_iterator
-{
-    It it_;
-public:
-    typedef It                              value_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    typedef std::ptrdiff_t                  difference_type;
-    typedef It*                             pointer;
-    typedef It&                             reference;
-
-    weird_iterator() {}
-    explicit weird_iterator(It it) : it_(it) {}
-    ~weird_iterator() {it_ = It();}
-
-    reference operator*() {return it_;}
-
-    weird_iterator& operator--() {return *this;}
-};
-
-template <class It>
 void
 test(It i, typename std::iterator_traits<It>::value_type x)
 {
@@ -60,7 +42,6 @@
 
 int main()
 {
-    test(weird_iterator<A>(A()), A());
     A a;
     test(&a+1, A());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp
index 1aa77fd..efbdf14 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opref/op_arrow.pass.cpp
@@ -15,8 +15,12 @@
 
 // Be sure to respect LWG 198:
 //    http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198
+// LWG 198 was superseded by LWG 2360
+//    http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2360
+
 
 #include <iterator>
+#include <list>
 #include <cassert>
 
 class A
@@ -33,27 +37,6 @@
 };
 
 template <class It>
-class weird_iterator
-{
-    It it_;
-public:
-    typedef It                              value_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    typedef std::ptrdiff_t                  difference_type;
-    typedef It*                             pointer;
-    typedef It&                             reference;
-
-    weird_iterator() {}
-    explicit weird_iterator(It it) : it_(it) {}
-    ~weird_iterator() {it_ = It();}
-
-    reference operator*() {return it_;}
-    pointer operator->() {return &it_;}
-
-    weird_iterator& operator--() {return *this;}
-};
-
-template <class It>
 void
 test(It i, typename std::iterator_traits<It>::value_type x)
 {
@@ -61,9 +44,46 @@
     assert(r->get() == x.get());
 }
 
+class B
+{
+    int data_;
+public:
+    B(int d=1) : data_(d) {}
+    ~B() {data_ = -1;}
+
+    int get() const {return data_;}
+
+    friend bool operator==(const B& x, const B& y)
+        {return x.data_ == y.data_;}
+    const B *operator&() const { return nullptr; }
+    B       *operator&()       { return nullptr; }
+};
+
 int main()
 {
-    test(weird_iterator<A>(A()), A());
     A a;
     test(&a+1, A());
+    
+    {
+    std::list<B> l;
+    l.push_back(B(0));
+    l.push_back(B(1));
+    l.push_back(B(2));
+    
+    {
+    std::list<B>::const_iterator i = l.begin();
+    assert ( i->get() == 0 );  ++i;
+    assert ( i->get() == 1 );  ++i;
+    assert ( i->get() == 2 );  ++i;
+    assert ( i == l.end ());
+    }
+    
+    {
+    std::list<B>::const_reverse_iterator ri = l.rbegin();
+    assert ( ri->get() == 2 );  ++ri;
+    assert ( ri->get() == 1 );  ++ri;
+    assert ( ri->get() == 0 );  ++ri;
+    assert ( ri == l.rend ());
+    }
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/is_specialized.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/is_specialized.pass.cpp
index 1e323b8..ff5c1a2 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/is_specialized.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/is_specialized.pass.cpp
@@ -59,6 +59,10 @@
     test<unsigned long>();
     test<signed long long>();
     test<unsigned long long>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>();
+    test<__uint128_t>();
+#endif
     test<float>();
     test<double>();
     test<long double>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
old mode 100755
new mode 100644
index d6ae228..bbead15
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
@@ -129,6 +129,13 @@
     TEST_NUMERIC_LIMITS(volatile long)
     TEST_NUMERIC_LIMITS(const volatile long)
 
+#ifndef _LIBCPP_HAS_NO_INT128
+    TEST_NUMERIC_LIMITS(__int128_t)
+    TEST_NUMERIC_LIMITS(const __int128_t)
+    TEST_NUMERIC_LIMITS(volatile __int128_t)
+    TEST_NUMERIC_LIMITS(const volatile __int128_t)
+#endif
+
     // long long
     TEST_NUMERIC_LIMITS(long long)
     TEST_NUMERIC_LIMITS(const long long)
@@ -159,6 +166,13 @@
     TEST_NUMERIC_LIMITS(volatile unsigned long long)
     TEST_NUMERIC_LIMITS(const volatile unsigned long long)
 
+#ifndef _LIBCPP_HAS_NO_INT128
+    TEST_NUMERIC_LIMITS(__uint128_t)
+    TEST_NUMERIC_LIMITS(const __uint128_t)
+    TEST_NUMERIC_LIMITS(volatile __uint128_t)
+    TEST_NUMERIC_LIMITS(const volatile __uint128_t)
+#endif
+
     // float
     TEST_NUMERIC_LIMITS(float)
     TEST_NUMERIC_LIMITS(const float)
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
index d17d4a9..a452d4e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long>(0);
     test<long long>(0);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(0);
+    test<__uint128_t>(0);
+#endif
     test<float>(__FLT_DENORM_MIN__);
     test<double>(__DBL_DENORM_MIN__);
     test<long double>(__LDBL_DENORM_MIN__);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
index ee6aafe..2dfea08 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, sizeof(long) == 4 ? 32 : 64>();
     test<long long, 63>();
     test<unsigned long long, 64>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 127>();
+    test<__uint128_t, 128>();
+#endif
     test<float, FLT_MANT_DIG>();
     test<double, DBL_MANT_DIG>();
     test<long double, LDBL_MANT_DIG>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
index 73e87fc..2c5302c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
@@ -47,6 +47,10 @@
     test<unsigned long, sizeof(long) == 4 ? 9 : 19>();
     test<long long, 18>();
     test<unsigned long long, 19>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 38>();
+    test<__uint128_t, 38>();
+#endif
     test<float, FLT_DIG>();
     test<double, DBL_DIG>();
     test<long double, LDBL_DIG>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
index e14de8e..0cce484 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
@@ -44,6 +44,10 @@
     test<unsigned long>(0);
     test<long long>(0);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(0);
+    test<__uint128_t>(0);
+#endif
     test<float>(FLT_EPSILON);
     test<double>(DBL_EPSILON);
     test<long double>(LDBL_EPSILON);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
index 4dcd4d4..e618020 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, std::denorm_absent>();
     test<long long, std::denorm_absent>();
     test<unsigned long long, std::denorm_absent>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, std::denorm_absent>();
+    test<__uint128_t, std::denorm_absent>();
+#endif
     test<float, std::denorm_present>();
     test<double, std::denorm_present>();
     test<long double, std::denorm_present>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
index 2982747..660ecf5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
index 506cd92..f8ca205 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, true>();
     test<double, true>();
     test<long double, true>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
index 3c4b5d2..7592171 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, true>();
     test<double, true>();
     test<long double, true>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
index 2edc4cc..d68cd5d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, true>();
     test<double, true>();
     test<long double, true>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
index d68aa47..a2ccca3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
@@ -46,6 +46,10 @@
     test<unsigned long>(0);
     test<long long>(0);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(0);
+    test<__uint128_t>(0);
+#endif
     test<float>(1./zero);
     test<double>(1./zero);
     test<long double>(1./zero);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
index eb96564..fa714d5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, true>();
     test<long long, true>();
     test<unsigned long long, true>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, true>();
+    test<__uint128_t, true>();
+#endif
     test<float, true>();
     test<double, true>();
     test<long double, true>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
index 6fa300b..b96a0e7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, true>();
     test<long long, true>();
     test<unsigned long long, true>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, true>();
+    test<__uint128_t, true>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
index 1b73bda..4408714 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, true>();
     test<double, true>();
 #if (defined(__ppc__) || defined(__ppc64__))
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
index a687465..79bc586 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, true>();
     test<long long, true>();
     test<unsigned long long, true>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, true>();
+    test<__uint128_t, true>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
index 3c44996..fadc015 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, true>();
     test<long long, true>();
     test<unsigned long long, true>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, true>();
+    test<__uint128_t, true>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
index 504107c..28570fd 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, true>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, true>();
+    test<__uint128_t, false>();
+#endif
     test<float, true>();
     test<double, true>();
     test<long double, true>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
index eb4b030..21090aa 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
@@ -50,6 +50,10 @@
     test<unsigned long>(0);
     test<long long>(LLONG_MIN);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(-__int128_t(__uint128_t(-1)/2) - 1);
+    test<__uint128_t>(0);
+#endif
     test<float>(-FLT_MAX);
     test<double>(-DBL_MAX);
     test<long double>(-LDBL_MAX);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
index 29dbfb3..7517aaa 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
@@ -50,6 +50,10 @@
     test<unsigned long>(ULONG_MAX);
     test<long long>(LLONG_MAX);
     test<unsigned long long>(ULLONG_MAX);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(__int128_t(__uint128_t(-1)/2));
+    test<__uint128_t>(__uint128_t(-1));
+#endif
     test<float>(FLT_MAX);
     test<double>(DBL_MAX);
     test<long double>(LDBL_MAX);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
index 3a3c76e..de771eb 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 0>();
     test<long long, 0>();
     test<unsigned long long, 0>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 0>();
+    test<__uint128_t, 0>();
+#endif
     test<float, 2+(FLT_MANT_DIG * 30103)/100000>();
     test<double, 2+(DBL_MANT_DIG * 30103)/100000>();
     test<long double, 2+(LDBL_MANT_DIG * 30103)/100000>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
index dea5043..6b61f7b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 0>();
     test<long long, 0>();
     test<unsigned long long, 0>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 0>();
+    test<__uint128_t, 0>();
+#endif
     test<float, FLT_MAX_EXP>();
     test<double, DBL_MAX_EXP>();
     test<long double, LDBL_MAX_EXP>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
index 807b773..927585e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 0>();
     test<long long, 0>();
     test<unsigned long long, 0>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 0>();
+    test<__uint128_t, 0>();
+#endif
     test<float, FLT_MAX_10_EXP>();
     test<double, DBL_MAX_10_EXP>();
     test<long double, LDBL_MAX_10_EXP>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
index 52108ee..e72fbba 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
@@ -50,6 +50,10 @@
     test<unsigned long>(0);
     test<long long>(LLONG_MIN);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(-__int128_t(__uint128_t(-1)/2) - 1);
+    test<__uint128_t>(0);
+#endif
     test<float>(FLT_MIN);
     test<double>(DBL_MIN);
     test<long double>(LDBL_MIN);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
index 8cf5302..245e844 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 0>();
     test<long long, 0>();
     test<unsigned long long, 0>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 0>();
+    test<__uint128_t, 0>();
+#endif
     test<float, FLT_MIN_EXP>();
     test<double, DBL_MIN_EXP>();
     test<long double, LDBL_MIN_EXP>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
index 7434e65..b54d46f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 0>();
     test<long long, 0>();
     test<unsigned long long, 0>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 0>();
+    test<__uint128_t, 0>();
+#endif
     test<float, FLT_MIN_10_EXP>();
     test<double, DBL_MIN_10_EXP>();
     test<long double, LDBL_MIN_10_EXP>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
index 95464e4..97166f0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
@@ -63,6 +63,10 @@
     test<unsigned long>();
     test<long long>();
     test<unsigned long long>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>();
+    test<__uint128_t>();
+#endif
     test<float>();
     test<double>();
     test<long double>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
index 37ad48a..98a2a53 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
@@ -43,6 +43,10 @@
     test<unsigned long, 2>();
     test<long long, 2>();
     test<unsigned long long, 2>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, 2>();
+    test<__uint128_t, 2>();
+#endif
     test<float, FLT_RADIX>();
     test<double, FLT_RADIX>();
     test<long double, FLT_RADIX>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
index f4051cf..5da5c95 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
@@ -44,6 +44,10 @@
     test<unsigned long>(0);
     test<long long>(0);
     test<unsigned long long>(0);
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>(0);
+    test<__uint128_t>(0);
+#endif
     test<float>(0.5);
     test<double>(0.5);
     test<long double>(0.5);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
index 1b7e2e0..645f6f7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, std::round_toward_zero>();
     test<long long, std::round_toward_zero>();
     test<unsigned long long, std::round_toward_zero>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, std::round_toward_zero>();
+    test<__uint128_t, std::round_toward_zero>();
+#endif
     test<float, std::round_to_nearest>();
     test<double, std::round_to_nearest>();
     test<long double, std::round_to_nearest>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
index 1c72d4c..d9df999 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
@@ -63,6 +63,10 @@
     test<unsigned long>();
     test<long long>();
     test<unsigned long long>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t>();
+    test<__uint128_t>();
+#endif
     test<float>();
     test<double>();
     test<long double>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
index e9dd956..9e2a843 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
@@ -42,6 +42,10 @@
     test<unsigned long, false>();
     test<long long, false>();
     test<unsigned long long, false>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, false>();
+    test<__uint128_t, false>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
index a409740..0345363 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
@@ -48,6 +48,10 @@
     test<unsigned long, integral_types_trap>();
     test<long long, integral_types_trap>();
     test<unsigned long long, integral_types_trap>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test<__int128_t, integral_types_trap>();
+    test<__uint128_t, integral_types_trap>();
+#endif
     test<float, false>();
     test<double, false>();
     test<long double, false>();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/__scan_keyword.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/__scan_keyword.pass.cpp
index 6f75fbb..b33aab9 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/__scan_keyword.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/__scan_keyword.pass.cpp
@@ -22,7 +22,7 @@
 //  no keyword match is found.  If no keyword match is found, __ke is returned.
 //  Else an iterator pointing to the matching keyword is found.  If more than
 //  one keyword matches, an iterator to the first matching keyword is returned.
-//  If on exit __b == __e, eofbit is set in __err.  If __case_senstive is false,
+//  If on exit __b == __e, eofbit is set in __err.  If __case_sensitive is false,
 //  __ct is used to force to lower case before comparing characters.
 //  Examples:
 //  Keywords:  "a", "abb"
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index 270af25..b6a4ed3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -54,19 +54,19 @@
     std::ios ios(0);
     {
         const my_facet f(LOCALE_en_US_UTF_8, 1);
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert(ex == "Today is Saturday which is abreviated Sat.");
+        assert(ex == "Today is Saturday which is abbreviated Sat.");
     }
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert((ex == "Today is Samedi which is abreviated Sam.")||
-               (ex == "Today is samedi which is abreviated sam." ));
+        assert((ex == "Today is Samedi which is abbreviated Sam.")||
+               (ex == "Today is samedi which is abbreviated sam." ));
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
index 408141d..93d5952 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
@@ -45,11 +45,11 @@
     t.tm_isdst = 1;
     std::ios ios(0);
     {
-        std::string pat("Today is %A which is abreviated %a.");
+        std::string pat("Today is %A which is abbreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
         std::string ex(str, iter.base());
-        assert(ex == "Today is Saturday which is abreviated Sat.");
+        assert(ex == "Today is Saturday which is abbreviated Sat.");
     }
     {
         std::string pat("The number of the month is %Om.");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/cmath.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/cmath.pass.cpp
index e2705f7..24f281b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/cmath.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/cmath.pass.cpp
@@ -190,8 +190,8 @@
     static_assert((std::is_same<decltype(std::fabs((unsigned long long)0)), double>::value), "");
     static_assert((std::is_same<decltype(std::fabs((double)0)), double>::value), "");
     static_assert((std::is_same<decltype(std::fabs((long double)0)), long double>::value), "");
-    static_assert((std::is_same<decltype(std::fabsf(0)), float>::value), "");
-    static_assert((std::is_same<decltype(std::fabsl(0)), long double>::value), "");
+    static_assert((std::is_same<decltype(std::fabsf(0.0f)), float>::value), "");
+    static_assert((std::is_same<decltype(std::fabsl(0.0L)), long double>::value), "");
     assert(std::fabs(-1) == 1);
 }
 
@@ -481,7 +481,10 @@
 #error isinf defined
 #endif
     static_assert((std::is_same<decltype(std::isinf((float)0)), bool>::value), "");
+#if !(defined(__ANDROID__) && (__LP64__ || __ANDROID_API__ >= 21))
+ // bionic isnan(double) returns int.
     static_assert((std::is_same<decltype(std::isinf((double)0)), bool>::value), "");
+#endif
     static_assert((std::is_same<decltype(std::isinf(0)), bool>::value), "");
     static_assert((std::is_same<decltype(std::isinf((long double)0)), bool>::value), "");
     assert(std::isinf(-1.0) == false);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.ops/stream_input.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
index 107eefc..24644e3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.ops/stream_input.pass.cpp
@@ -6,9 +6,6 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-// XFAIL: with_system_lib=x86_64-apple-darwin11
-// XFAIL: with_system_lib=x86_64-apple-darwin12
 
 // <complex>
 
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
index 451fc16..b821109 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
@@ -51,7 +51,7 @@
             assert(std::signbit(x[i].real()) == std::signbit(r.real()));
             assert(std::isnan(r.imag()));
         }
-        else if (abs(x[i].real()) == 1 && x[i].imag() == 0)
+        else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0)
         {
             assert(std::isinf(r.real()));
             assert(std::signbit(x[i].real()) == std::signbit(r.real()));
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/ctor.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/ctor.pass.cpp
index a7c38d4..dfa546b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/ctor.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/ctor.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <random>
 #include <cassert>
+#include <unistd.h>
 
 int main()
 {
@@ -30,6 +31,16 @@
         std::random_device r;
     }
     {
+        int ec;
+        ec = close(STDIN_FILENO);
+        assert(!ec);
+        ec = close(STDOUT_FILENO);
+        assert(!ec);
+        ec = close(STDERR_FILENO);
+        assert(!ec);
+        std::random_device r;
+    }
+    {
         std::random_device r("/dev/urandom");;
     }
     {
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/eval.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/eval.pass.cpp
index 2422635..72aff07 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/eval.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.device/eval.pass.cpp
@@ -18,6 +18,18 @@
 
 int main()
 {
-    std::random_device r;
-    std::random_device::result_type e = r();
+    {
+        std::random_device r;
+        std::random_device::result_type e = r();
+    }
+
+    try
+    {
+        std::random_device r("/dev/null");
+        r();
+        assert(false);
+    }
+    catch (const std::system_error& e)
+    {
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.fail.cpp
new file mode 100644
index 0000000..d3b922c
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.fail.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+//   template <class ST, class SA, class Allocator, class charT, class traits> 
+//   bool regex_match(const basic_string<charT, ST, SA>&&, 
+//                    match_results<
+//                      typename basic_string<charT, ST, SA>::const_iterator, 
+//                      Allocator>&, 
+//                    const basic_regex<charT, traits>&, 
+//                    regex_constants::match_flag_type = 
+//                      regex_constants::match_default) = delete;
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+        std::smatch m;
+        std::regex re{"*"};
+        std::regex_match(std::string("abcde"), m, re);
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
index 55c7361..9d3f39d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
@@ -614,6 +614,12 @@
                                                  std::regex_constants::basic)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -648,6 +654,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1282,6 +1289,12 @@
                                                  std::regex_constants::basic)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1316,6 +1329,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
index 50c5cc6..bb36831 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -576,6 +576,12 @@
         assert(!std::regex_match(s, m, std::regex("[a[.hyphen.]z]")));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -608,7 +614,20 @@
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
     }
+    {
+        std::cmatch m;
+        const char s[] = "foobar";
+        assert(std::regex_match(s, m, std::regex("[^\\0]*")));
+        assert(m.size() == 1);
+    }
+    {
+        std::cmatch m;
+        const char s[] = "foo\0bar";
+        assert(std::regex_match(s, s+7, m, std::regex("[abfor\\0]*")));
+        assert(m.size() == 1);
+    }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1229,6 +1248,12 @@
         assert(!std::regex_match(s, m, std::wregex(L"[a[.hyphen.]z]")));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1262,6 +1287,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
index 683f65b..5ef8695 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
@@ -612,6 +612,12 @@
                                                  std::regex_constants::extended)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -646,6 +652,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1278,6 +1285,12 @@
                                                  std::regex_constants::extended)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1312,6 +1325,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
index 57606c1..b03dd7b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
@@ -684,6 +684,12 @@
                                                  std::regex_constants::awk)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -718,6 +724,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1455,6 +1462,12 @@
                                                  std::regex_constants::awk)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1489,6 +1502,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.fail.cpp
new file mode 100644
index 0000000..692ee94
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.fail.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+//   template <class ST, class SA, class Allocator, class charT, class traits> 
+//   bool regex_search(const basic_string<charT, ST, SA>&&, 
+//                     match_results<
+//                       typename basic_string<charT, ST, SA>::const_iterator, 
+//                       Allocator>&, 
+//                     const basic_regex<charT, traits>&, 
+//                     regex_constants::match_flag_type = 
+//                       regex_constants::match_default) = delete;
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+        std::smatch m;
+        std::regex re{"*"};
+        std::regex_search(std::string("abcde"), m, re);
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
index 56396f3..809f870 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
@@ -686,6 +686,12 @@
                                                  std::regex_constants::basic)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -720,6 +726,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1444,6 +1451,12 @@
                                                  std::regex_constants::basic)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1478,6 +1491,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
index 8149157..21e3efe 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
@@ -666,6 +666,12 @@
         assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]")));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -699,6 +705,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1445,6 +1452,12 @@
         assert(!std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]")));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1478,6 +1491,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
index 8240872..9cac3b2 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
@@ -684,6 +684,12 @@
                                                  std::regex_constants::extended)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::cmatch m;
@@ -718,6 +724,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::cmatch m;
         const char s[] = "m";
@@ -1440,6 +1447,12 @@
                                                  std::regex_constants::extended)));
         assert(m.size() == 0);
     }
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
     {
         std::wcmatch m;
@@ -1474,6 +1487,7 @@
         assert(m.str(0) == s);
     }
     std::locale::global(std::locale("C"));
+#endif
     {
         std::wcmatch m;
         const wchar_t s[] = L"m";
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp
new file mode 100644
index 0000000..9c17287
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// class regex_iterator<BidirectionalIterator, charT, traits>
+
+// regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+//                      const regex_type&& re,
+//                      int submatch = 0,
+//                      regex_constants::match_flag_type m =
+//                        regex_constants::match_default) = delete;
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+        const char phone_book[] = "555-1234, 555-2345, 555-3456";
+        std::cregex_iterator i(
+            std::begin(phone_book), std::end(phone_book), 
+            std::regex("\\d{3}-\\d{4}"));
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp
new file mode 100644
index 0000000..ed3c9fe
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// class regex_iterator<BidirectionalIterator, charT, traits>
+
+// template <size_t N>
+// regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+//                      const regex_type&& re,
+//                      const int (&submatches)[N],
+//                      regex_constants::match_flag_type m =
+//                                              regex_constants::match_default);
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <vector>
+#include <cassert>
+
+int main()
+{
+    {
+        std::regex phone_numbers("\\d{3}-(\\d{4})");
+        const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end";
+        const int indices[] = {-1, 0, 1};
+        std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1,
+                                     std::regex("\\d{3}-\\d{4}"), indices);
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp
new file mode 100644
index 0000000..13120f3
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// class regex_iterator<BidirectionalIterator, charT, traits>
+
+// regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+//                      const regex_type&& re,
+//                      initializer_list<int> submatches,
+//                      regex_constants::match_flag_type m =
+//                                              regex_constants::match_default);
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+        std::regex phone_numbers("\\d{3}-(\\d{4})");
+        const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end";
+        std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1,
+                                      std::regex("\\d{3}-\\d{4}"), {-1, 0, 1});
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp
new file mode 100644
index 0000000..dba11c2
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// class regex_iterator<BidirectionalIterator, charT, traits>
+
+// regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+//                      const regex_type&& re, int submatch = 0,
+//                      regex_constants::match_flag_type m =
+//                                              regex_constants::match_default);
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+        std::regex phone_numbers("\\d{3}-\\d{4}");
+        const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end";
+        std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1,
+                                     std::regex("\\d{3}-\\d{4}"), -1);
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp
new file mode 100644
index 0000000..fd75a8b
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// class regex_iterator<BidirectionalIterator, charT, traits>
+
+// template <std::size_t N>
+// regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+//                      const regex_type&& re,
+//                      const std::vector<int>& submatches,
+//                      regex_constants::match_flag_type m =
+//                                              regex_constants::match_default);
+
+#include <__config>
+
+#if _LIBCPP_STD_VER <= 11
+#error
+#else
+
+#include <regex>
+#include <cassert>
+
+int main()
+{
+    {
+         std::regex phone_numbers("\\d{3}-(\\d{4})");
+        const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end";
+        std::vector<int> v;
+        v.push_back(-1);
+        v.push_back(-1);
+        std::cregex_token_iterator i(std::begin(phone_book), std::end(phone_book)-1,
+                                     std::regex("\\d{3}-\\d{4}"), v);
+    }
+}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.results/types.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.results/types.pass.cpp
index 374815a..4d55383 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.results/types.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.results/types.pass.cpp
@@ -35,7 +35,7 @@
     typedef std::match_results<CharT*> MR;
     static_assert((std::is_same<typename MR::value_type, std::sub_match<CharT*> >::value), "");
     static_assert((std::is_same<typename MR::const_reference, const std::sub_match<CharT*>& >::value), "");
-    static_assert((std::is_same<typename MR::reference, const std::sub_match<CharT*>& >::value), "");
+    static_assert((std::is_same<typename MR::reference, std::sub_match<CharT*>& >::value), "");
     static_assert((!std::is_same<typename MR::const_iterator, void>::value), "");
     static_assert((std::is_same<typename MR::difference_type, std::ptrdiff_t>::value), "");
     static_assert((std::is_same<typename MR::size_type, std::size_t>::value), "");
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_classname.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_classname.pass.cpp
index 6819fb4..75c0888 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_classname.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_classname.pass.cpp
@@ -115,9 +115,9 @@
     test("xdigit", std::ctype_base::xdigit, true);
     test("Xdigit", std::ctype_base::xdigit, true);
 
-    test("dig", 0);
-    test("", 0);
-    test("digits", 0);
+    test("dig", std::ctype_base::mask());
+    test("", std::ctype_base::mask());
+    test("digits", std::ctype_base::mask());
 
     test(L"d", std::ctype_base::digit);
     test(L"D", std::ctype_base::digit);
@@ -203,7 +203,7 @@
     test(L"xdigit", std::ctype_base::xdigit, true);
     test(L"Xdigit", std::ctype_base::xdigit, true);
 
-    test(L"dig", 0);
-    test(L"", 0);
-    test(L"digits", 0);
+    test(L"dig", std::ctype_base::mask());
+    test(L"", std::ctype_base::mask());
+    test(L"digits", std::ctype_base::mask());
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
index 055b554..9c6f108 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
@@ -103,9 +103,6 @@
 
     test("tild", std::string(""));
     test("ch", std::string(""));
-    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
-    test("ch", std::string("ch"));
-    std::locale::global(std::locale("C"));
 
     test(L"NUL", std::wstring(L"\x00", 1));
     test(L"alert", std::wstring(L"\x07"));
@@ -179,7 +176,4 @@
 
     test(L"tild", std::wstring(L""));
     test(L"ch", std::wstring(L""));
-    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
-    test(L"ch", std::wstring(L"ch"));
-    std::locale::global(std::locale("C"));
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.xlocale.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.xlocale.pass.cpp
new file mode 100644
index 0000000..b6e563c
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/lookup_collatename.xlocale.pass.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <regex>
+
+// template <class charT> struct regex_traits;
+
+// template <class ForwardIterator>
+//   string_type
+//   lookup_collatename(ForwardIterator first, ForwardIterator last) const;
+
+#include <regex>
+#include <iterator>
+#include <cassert>
+#include "test_iterators.h"
+
+template <class char_type>
+void
+test(const char_type* A, const std::basic_string<char_type>& expected)
+{
+    std::regex_traits<char_type> t;
+    typedef forward_iterator<const char_type*> F;
+    assert(t.lookup_collatename(F(A), F(A + t.length(A))) == expected);
+}
+
+int main()
+{
+#if !defined(__ANDROID__)
+    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+    test("ch", std::string("ch"));
+
+    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+    test(L"ch", std::wstring(L"ch"));
+#endif
+}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform.pass.cpp
index 9b9feb1..73d6593 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform.pass.cpp
@@ -27,8 +27,15 @@
         const char B[] = "B";
         typedef forward_iterator<const char*> F;
         assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1)));
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale("cs_CZ.ISO8859-2"));
         assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1)));
+#endif
     }
     {
         std::regex_traits<wchar_t> t;
@@ -36,7 +43,14 @@
         const wchar_t B[] = L"B";
         typedef forward_iterator<const wchar_t*> F;
         assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1)));
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale("cs_CZ.ISO8859-2"));
         assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1)));
+#endif
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform_primary.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform_primary.pass.cpp
index 1e2aca6..a22d86d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform_primary.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/transform_primary.pass.cpp
@@ -29,9 +29,16 @@
         typedef forward_iterator<const char*> F;
         assert(t.transform_primary(F(A), F(A+1)) !=
                t.transform_primary(F(Aacute), F(Aacute+1)));
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale("cs_CZ.ISO8859-2"));
         assert(t.transform_primary(F(A), F(A+1)) ==
                t.transform_primary(F(Aacute), F(Aacute+1)));
+#endif
     }
     {
         std::regex_traits<wchar_t> t;
@@ -40,8 +47,15 @@
         typedef forward_iterator<const wchar_t*> F;
         assert(t.transform_primary(F(A), F(A+1)) !=
                t.transform_primary(F(Aacute), F(Aacute+1)));
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale("cs_CZ.ISO8859-2"));
         assert(t.transform_primary(F(A), F(A+1)) ==
                t.transform_primary(F(Aacute), F(Aacute+1)));
+#endif
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/translate_nocase.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/translate_nocase.pass.cpp
index 5e042ae..bd8a7f4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/translate_nocase.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/re/re.traits/translate_nocase.pass.cpp
@@ -34,6 +34,12 @@
         assert(t.translate_nocase('1') == '1');
         assert(t.translate_nocase('\xDA') == '\xDA');
         assert(t.translate_nocase('\xFA') == '\xFA');
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(t.translate_nocase(' ') == ' ');
         assert(t.translate_nocase('A') == 'a');
@@ -43,6 +49,7 @@
         assert(t.translate_nocase('1') == '1');
         assert(t.translate_nocase('\xDA') == '\xFA');
         assert(t.translate_nocase('\xFA') == '\xFA');
+#endif
     }
     {
         std::regex_traits<wchar_t> t;
@@ -54,6 +61,12 @@
         assert(t.translate_nocase(L'1') == L'1');
         assert(t.translate_nocase(L'\xDA') == L'\xDA');
         assert(t.translate_nocase(L'\xFA') == L'\xFA');
+/* Disable locale specific tests on Android because Android's NDK does not
+ * support locales other than "C" and "POSIX".
+ *
+ * https://code.google.com/p/android/issues/detail?id=57313
+ */
+#if !defined(__ANDROID__)
         t.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(t.translate_nocase(L' ') == L' ');
         assert(t.translate_nocase(L'A') == L'a');
@@ -63,5 +76,6 @@
         assert(t.translate_nocase(L'1') == L'1');
         assert(t.translate_nocase(L'\xDA') == L'\xFA');
         assert(t.translate_nocase(L'\xFA') == L'\xFA');
+#endif
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
index ac74f20..e8f54f4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
@@ -10,7 +10,8 @@
 // <string>
 
 // basic_string<charT,traits,Allocator>&
-//   append(const basic_string<charT,traits>& str, size_type pos, size_type n);
+//   append(const basic_string<charT,traits>& str, size_type pos, size_type n = npos);
+//  the "= npos" was added for C++14
 
 #include <string>
 #include <stdexcept>
@@ -35,6 +36,23 @@
     }
 }
 
+template <class S>
+void
+test_npos(S s, S str, typename S::size_type pos, S expected)
+{
+    try
+    {
+        s.append(str, pos);
+        assert(s.__invariants());
+        assert(pos <= str.size());
+        assert(s == expected);
+    }
+    catch (std::out_of_range&)
+    {
+        assert(pos > str.size());
+    }
+}
+
 int main()
 {
     {
@@ -87,4 +105,14 @@
          S("123456789012345678906789012345"));
     }
 #endif
+    {
+    typedef std::string S;
+    test_npos(S(), S(), 0, S());
+    test_npos(S(), S(), 1, S());
+    test_npos(S(), S("12345"), 0, S("12345"));
+    test_npos(S(), S("12345"), 1, S("2345"));
+    test_npos(S(), S("12345"), 3, S("45"));
+    test_npos(S(), S("12345"), 5, S(""));
+    test_npos(S(), S("12345"), 6, S("not happening"));
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
index 116673c..5f5983e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
@@ -10,7 +10,8 @@
 // <string>
 
 // basic_string<charT,traits,Allocator>&
-//   assign(const basic_string<charT,traits>& str, size_type pos, size_type n);
+//   assign(const basic_string<charT,traits>& str, size_type pos, size_type n=npos);
+// the =npos was added for C++14
 
 #include <string>
 #include <stdexcept>
@@ -35,6 +36,23 @@
     }
 }
 
+template <class S>
+void
+test_npos(S s, S str, typename S::size_type pos, S expected)
+{
+    try
+    {
+        s.assign(str, pos);
+        assert(s.__invariants());
+        assert(pos <= str.size());
+        assert(s == expected);
+    }
+    catch (std::out_of_range&)
+    {
+        assert(pos > str.size());
+    }
+}
+
 int main()
 {
     {
@@ -87,4 +105,14 @@
          S("6789012345"));
     }
 #endif
+    {
+    typedef std::string S;
+    test_npos(S(), S(), 0, S());
+    test_npos(S(), S(), 1, S());
+    test_npos(S(), S("12345"), 0, S("12345"));
+    test_npos(S(), S("12345"), 1, S("2345"));
+    test_npos(S(), S("12345"), 3, S("45"));
+    test_npos(S(), S("12345"), 5, S(""));
+    test_npos(S(), S("12345"), 6, S("not happening"));
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
index b7317a3..51c9e72 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
@@ -11,7 +11,8 @@
 
 // basic_string<charT,traits,Allocator>&
 //   insert(size_type pos1, const basic_string<charT,traits,Allocator>& str,
-//          size_type pos2, size_type n);
+//          size_type pos2, size_type n=npos);
+// the "=npos" was added in C++14
 
 #include <string>
 #include <stdexcept>
@@ -41,6 +42,27 @@
 }
 
 template <class S>
+void
+test_npos(S s, typename S::size_type pos1, S str, typename S::size_type pos2, S expected)
+{
+    typename S::size_type old_size = s.size();
+    S s0 = s;
+    try
+    {
+        s.insert(pos1, str, pos2);
+        assert(s.__invariants());
+        assert(pos1 <= old_size && pos2 <= str.size());
+        assert(s == expected);
+    }
+    catch (std::out_of_range&)
+    {
+        assert(pos1 > old_size || pos2 > str.size());
+        assert(s == s0);
+    }
+}
+
+
+template <class S>
 void test0()
 {
     test(S(""), 0, S(""), 0, 0, S(""));
@@ -1670,6 +1692,23 @@
     test(S("abcdefghijklmnopqrst"), 21, S("12345678901234567890"), 21, 0, S("can't happen"));
 }
 
+template <class S>
+void test30()
+{
+    test_npos(S(""), 0, S("12345678901234567890"),  0, S("12345678901234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"),  1, S( "2345678901234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"),  2, S(  "345678901234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"),  3, S(   "45678901234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"),  5, S(     "678901234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"), 10, S(          "1234567890"));
+    test_npos(S(""), 0, S("12345678901234567890"), 21, S("can't happen"));
+    test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 0, S("abcdefghij12345klmnopqrst"));
+    test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 1, S("abcdefghij2345klmnopqrst"));
+    test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 3, S("abcdefghij45klmnopqrst"));
+    test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 5, S("abcdefghijklmnopqrst"));
+    test_npos(S("abcdefghijklmnopqrst"), 10, S("12345"), 6, S("can't happen"));
+}
+
 int main()
 {
     {
@@ -1704,6 +1743,7 @@
     test27<S>();
     test28<S>();
     test29<S>();
+    test30<S>();
     }
 #if __cplusplus >= 201103L
     {
@@ -1738,6 +1778,7 @@
     test27<S>();
     test28<S>();
     test29<S>();
+    test30<S>();
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
index 25e5c44..ef0de89 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
@@ -11,7 +11,8 @@
 
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos1, size_type n1, const basic_string<charT,traits,Allocator>& str,
-//           size_type pos2, size_type n2);
+//           size_type pos2, size_type n2=npos);
+//  the "=npos" was added in C++14
 
 #include <string>
 #include <stdexcept>
@@ -46,6 +47,32 @@
 }
 
 template <class S>
+void
+test_npos(S s, typename S::size_type pos1, typename S::size_type n1,
+     S str, typename S::size_type pos2,
+     S expected)
+{
+    typename S::size_type old_size = s.size();
+    S s0 = s;
+    try
+    {
+        s.replace(pos1, n1, str, pos2);
+        assert(s.__invariants());
+        assert(pos1 <= old_size && pos2 <= str.size());
+        assert(s == expected);
+        typename S::size_type xlen = std::min(n1, old_size - pos1);
+        typename S::size_type rlen = std::min(S::npos, str.size() - pos2);
+        assert(s.size() == old_size - xlen + rlen);
+    }
+    catch (std::out_of_range&)
+    {
+        assert(pos1 > old_size || pos2 > str.size());
+        assert(s == s0);
+    }
+}
+
+
+template <class S>
 void test0()
 {
     test(S(""), 0, 0, S(""), 0, 0, S(""));
@@ -5796,6 +5823,24 @@
     test(S("abcdefghijklmnopqrst"), 21, 0, S("12345678901234567890"), 21, 0, S("can't happen"));
 }
 
+template <class S>
+void test55()
+{
+    test_npos(S("abcdefghij"), 9, 1, S("12345678901234567890"), 10, S("abcdefghi1234567890"));
+    test_npos(S("abcdefghij"), 9, 1, S("12345678901234567890"), 19, S("abcdefghi0"));
+    test_npos(S("abcdefghij"), 9, 1, S("12345678901234567890"), 20, S("abcdefghi"));
+    test_npos(S("abcdefghij"), 9, 1, S("12345678901234567890"), 20, S("abcdefghi"));
+    test_npos(S("abcdefghij"), 9, 1, S("12345678901234567890"), 21, S("can't happen"));
+    test_npos(S("abcdefghij"), 9, 2, S(""), 0, S("abcdefghi"));
+    test_npos(S("abcdefghij"), 9, 2, S(""), 1, S("can't happen"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 0, S("abcdefghi12345"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 1, S("abcdefghi2345"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 2, S("abcdefghi345"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 4, S("abcdefghi5"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 5, S("abcdefghi"));
+    test_npos(S("abcdefghij"), 9, 2, S("12345"), 6, S("can't happen"));
+}
+
 int main()
 {
     {
@@ -5855,6 +5900,7 @@
     test52<S>();
     test53<S>();
     test54<S>();
+    test55<S>();
     }
 #if __cplusplus >= 201103L
     {
@@ -5914,6 +5960,7 @@
     test52<S>();
     test53<S>();
     test54<S>();
+    test55<S>();
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
index 29eba9a..122e6e9 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
@@ -10,7 +10,8 @@
 // <string>
 
 // int compare(size_type pos1, size_type n1, const basic_string& str,
-//             size_type pos2, size_type n2) const;
+//             size_type pos2, size_type n2=npos) const;
+//  the "=npos" was added in C++14
 
 #include <string>
 #include <stdexcept>
@@ -45,6 +46,23 @@
 }
 
 template <class S>
+void
+test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1,
+     const S& str, typename S::size_type pos2, int x)
+{
+    try
+    {
+        assert(sign(s.compare(pos1, n1, str, pos2)) == sign(x));
+        assert(pos1 <= s.size());
+        assert(pos2 <= str.size());
+    }
+    catch (std::out_of_range&)
+    {
+        assert(pos1 > s.size() || pos2 > str.size());
+    }
+}
+
+template <class S>
 void test0()
 {
     test(S(""), 0, 0, S(""), 0, 0, 0);
@@ -5795,6 +5813,16 @@
     test(S("abcdefghijklmnopqrst"), 21, 0, S("abcdefghijklmnopqrst"), 21, 0, 0);
 }
 
+template<class S>
+void test55()
+{
+    test_npos(S(""), 0, 0, S(""), 0, 0);
+    test_npos(S(""), 0, 0, S("abcde"), 0, -5);
+    test_npos(S("abcde"), 0, 0, S("abcdefghij"), 0, -10);
+    test_npos(S("abcde"), 0, 0, S("abcdefghij"), 1, -9);
+    test_npos(S("abcde"), 0, 0, S("abcdefghij"), 5, -5);
+}
+
 int main()
 {
     {
@@ -5854,6 +5882,7 @@
     test52<S>();
     test53<S>();
     test54<S>();
+    test55<S>();
     }
 #if __cplusplus >= 201103L
     {
@@ -5913,6 +5942,7 @@
     test52<S>();
     test53<S>();
     test54<S>();
+    test55<S>();
     }
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/string.conversions/stof.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/string.conversions/stof.pass.cpp
index 65809cb..6d80f1d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/strings/string.conversions/stof.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/strings/string.conversions/stof.pass.cpp
@@ -38,21 +38,27 @@
     idx = 0;
     try
     {
+        // 21.5p4 and p6: "call strtod [...] Throws out_of_range if strtod
+        // [...] sets errno to ERANGE".  1.e60 fits in a double, so while this
+        // does return INFINITY it shouldn't throw according to the standard.
         assert(std::stof("1.e60", &idx) == INFINITY);
-        assert(false);
+        assert(idx == 5);
     }
     catch (const std::out_of_range&)
     {
-        assert(idx == 0);
+        assert(false);
     }
     try
     {
+        // 21.5p11 and p13: "call wcstod [...] Throws out_of_range if wcstod
+        // [...] sets errno to ERANGE".  1.e60 fits in a double, so while this
+        // does return INFINITY it shouldn't throw according to the standard.
         assert(std::stof(L"1.e60", &idx) == INFINITY);
-        assert(false);
+        assert(idx == 5);
     }
     catch (const std::out_of_range&)
     {
-        assert(idx == 0);
+        assert(false);
     }
     idx = 0;
     try
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/support/asan_testing.h b/sources/cxx-stl/llvm-libc++/libcxx/test/support/asan_testing.h
new file mode 100644
index 0000000..c8797bd
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/support/asan_testing.h
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef ASAN_TESTING_H
+#define ASAN_TESTING_H
+
+#include <__config>
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" int __sanitizer_verify_contiguous_container
+     ( const void *beg, const void *mid, const void *end );
+     
+template <typename T, typename Alloc>
+bool is_contiguous_container_asan_correct ( const std::vector<T, Alloc> &c )
+{
+    if ( std::is_same<Alloc, std::allocator<T>>::value && c.data() != NULL)
+        return __sanitizer_verify_contiguous_container (
+            c.data(), c.data() + c.size(), c.data() + c.capacity()) != 0;
+    return true;
+}
+
+#else
+template <typename T, typename Alloc>
+bool is_contiguous_container_asan_correct ( const std::vector<T, Alloc> &c )
+{
+    return true;
+}
+#endif
+ 
+
+#endif  // ASAN_TESTING_H
\ No newline at end of file
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/support/nasty_containers.hpp b/sources/cxx-stl/llvm-libc++/libcxx/test/support/nasty_containers.hpp
new file mode 100644
index 0000000..5a2e195
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/support/nasty_containers.hpp
@@ -0,0 +1,282 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef NASTY_VECTOR_H
+#define NASTY_VECTOR_H
+
+#include <vector>
+#include <list>
+
+template <class T>
+class nasty_vector
+{
+public:
+    typedef typename std::vector<T>                           nested_container;
+    typedef typename nested_container::value_type             value_type;
+    typedef typename nested_container::reference              reference;
+    typedef typename nested_container::const_reference        const_reference;
+    typedef typename nested_container::iterator               iterator;
+    typedef typename nested_container::const_iterator         const_iterator;
+
+    typedef typename nested_container::size_type              size_type;
+    typedef typename nested_container::difference_type        difference_type;
+    typedef typename nested_container::pointer                pointer;
+    typedef typename nested_container::const_pointer          const_pointer;
+
+    typedef typename nested_container::reverse_iterator       reverse_iterator;
+    typedef typename nested_container::const_reverse_iterator const_reverse_iterator;
+
+    nasty_vector() : v_() {}
+    explicit nasty_vector(size_type n) : v_(n) {}
+    nasty_vector(size_type n, const value_type& value) : v_(n, value) {}
+    template <class InputIterator> nasty_vector(InputIterator first, InputIterator last) : v_(first, last) {}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    nasty_vector(std::initializer_list<value_type> il) : v_(il) {}
+#endif
+    ~nasty_vector() {}
+
+    template <class InputIterator>
+        void assign(InputIterator first, InputIterator last) { v_.assign(first, last); }
+    void assign(size_type n, const value_type& u) { v_.assign(n, u); }
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    void assign(std::initializer_list<value_type> il)  { v_.assign(il); }
+#endif
+
+    iterator               begin() _NOEXCEPT         { return v_.begin(); }
+    const_iterator         begin()   const _NOEXCEPT { return v_.begin(); }
+    iterator               end() _NOEXCEPT           { return v_.end(); }
+    const_iterator         end()     const _NOEXCEPT { return v_.end(); }
+
+    reverse_iterator       rbegin() _NOEXCEPT        { return v_.rbegin(); }
+    const_reverse_iterator rbegin()  const _NOEXCEPT { return v_.rbegin(); }
+    reverse_iterator       rend() _NOEXCEPT          { return v_.rend(); }
+    const_reverse_iterator rend()    const _NOEXCEPT { return v_.rend(); }
+
+    const_iterator         cbegin()  const _NOEXCEPT { return v_.cbegin(); }
+    const_iterator         cend()    const _NOEXCEPT { return v_.cend(); }
+    const_reverse_iterator crbegin() const _NOEXCEPT { return v_.crbegin(); }
+    const_reverse_iterator crend()   const _NOEXCEPT { return v_.crend(); }
+
+    size_type size() const _NOEXCEPT      { return v_.size(); }
+    size_type max_size() const _NOEXCEPT  { return v_.max_size(); }
+    size_type capacity() const _NOEXCEPT  { return v_.capacity(); }
+    bool empty() const _NOEXCEPT          { return v_.empty(); }
+    void reserve(size_type n)             { v_.reserve(n); };
+    void shrink_to_fit() _NOEXCEPT        { v_.shrink_to_fit(); }
+
+    reference       operator[](size_type n)       { return v_[n]; }
+    const_reference operator[](size_type n) const { return v_[n]; }
+    reference       at(size_type n)               { return v_.at(n); }
+    const_reference at(size_type n) const         { return v_.at(n); }
+
+    reference       front()       { return v_.front(); }
+    const_reference front() const { return v_.front(); }
+    reference       back()        { return v_.back(); }
+    const_reference back() const  { return v_.back(); }
+
+    value_type*       data() _NOEXCEPT       { return v_.data(); }
+    const value_type* data() const _NOEXCEPT { return v_.data(); }
+
+    void push_back(const value_type& x)     { v_.push_back(x); }
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void push_back(value_type&& x)          { v_.push_back(std::forward<value_type&&>(x)); }
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+    template <class... Args>
+        void emplace_back(Args&&... args)   { v_.emplace_back(std::forward<Args>(args)...); }
+#endif
+#endif
+    void pop_back()                         { v_.pop_back(); }
+
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+    template <class... Args> iterator emplace(const_iterator pos, Args&&... args)
+    { return v_.emplace(pos, std::forward<Args>(args)...); }
+#endif
+#endif
+    
+    iterator insert(const_iterator pos, const value_type& x) { return v_.insert(pos, x); }
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    iterator insert(const_iterator pos, value_type&& x)      { return v_.insert(pos, std::forward<value_type>(x)); }
+#endif
+    iterator insert(const_iterator pos, size_type n, const value_type& x) { return v_.insert(pos, n, x); }
+    template <class InputIterator>
+        iterator insert(const_iterator pos, InputIterator first, InputIterator last)
+    { return v_.insert(pos, first, last); }
+
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    iterator insert(const_iterator pos, std::initializer_list<value_type> il) { return v_.insert(pos, il); }
+#endif
+
+    iterator erase(const_iterator pos)                        { return v_.erase(pos); }
+    iterator erase(const_iterator first, const_iterator last) { return v_.erase(first, last); }
+
+    void clear() _NOEXCEPT { v_.clear(); }
+
+    void resize(size_type sz)                      { v_.resize(sz); }
+    void resize(size_type sz, const value_type& c) { v_.resize(sz, c); }
+
+    void swap(nasty_vector &nv) _NOEXCEPT_(std::__is_nothrow_swappable<nested_container>::value)
+    { v_.swap(nv.v_); }
+    
+    nasty_vector *operator &()             { return nullptr; }  // nasty
+    const nasty_vector *operator &() const { return nullptr; }  // nasty
+    
+    nested_container v_;
+};
+
+template <class T>
+bool operator==(const nasty_vector<T>& x, const nasty_vector<T>& y) { return x.v_ == y.v_; }
+
+template <class T>
+class nasty_list
+{
+public:
+
+    typedef typename std::list<T>                             nested_container;
+    typedef typename nested_container::value_type             value_type;
+    typedef typename nested_container::reference              reference;
+    typedef typename nested_container::const_reference        const_reference;
+    typedef typename nested_container::iterator               iterator;
+    typedef typename nested_container::const_iterator         const_iterator;
+
+    typedef typename nested_container::size_type              size_type;
+    typedef typename nested_container::difference_type        difference_type;
+    typedef typename nested_container::pointer                pointer;
+    typedef typename nested_container::const_pointer          const_pointer;
+
+    typedef typename nested_container::reverse_iterator       reverse_iterator;
+    typedef typename nested_container::const_reverse_iterator const_reverse_iterator;
+
+    nasty_list() : l_() {}
+    explicit nasty_list(size_type n)  : l_(n) {}
+    nasty_list(size_type n, const value_type& value)  : l_(n,value) {}
+    template <class Iter>
+        nasty_list(Iter first, Iter last)  : l_(first, last) {}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    nasty_list(std::initializer_list<value_type> il) : l_(il) {}
+#endif
+
+    ~nasty_list() {}
+
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    nasty_list& operator=(std::initializer_list<value_type> il) { l_ = il; return *this; }
+#endif
+    template <class Iter>
+        void assign(Iter first, Iter last) { l_.assign(first, last); }
+    void assign(size_type n, const value_type& t) { l_.assign(n, t); }
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    void assign(std::initializer_list<value_type> il) { l_.assign(il); }
+#endif
+
+
+    iterator               begin() _NOEXCEPT         { return l_.begin(); }
+    const_iterator         begin()   const _NOEXCEPT { return l_.begin(); }
+    iterator               end() _NOEXCEPT           { return l_.end(); }
+    const_iterator         end()     const _NOEXCEPT { return l_.end(); }
+
+    reverse_iterator       rbegin() _NOEXCEPT        { return l_.rbegin(); }
+    const_reverse_iterator rbegin()  const _NOEXCEPT { return l_.rbegin(); }
+    reverse_iterator       rend() _NOEXCEPT          { return l_.rend(); }
+    const_reverse_iterator rend()    const _NOEXCEPT { return l_.rend(); }
+
+    const_iterator         cbegin()  const _NOEXCEPT { return l_.cbegin(); }
+    const_iterator         cend()    const _NOEXCEPT { return l_.cend(); }
+    const_reverse_iterator crbegin() const _NOEXCEPT { return l_.crbegin(); }
+    const_reverse_iterator crend()   const _NOEXCEPT { return l_.crend(); }
+
+    reference       front()       { return l_.front(); }
+    const_reference front() const { return l_.front(); }
+    reference       back()        { return l_.back(); }
+    const_reference back() const  { return l_.back(); }
+
+    size_type size() const _NOEXCEPT      { return l_.size(); }
+    size_type max_size() const _NOEXCEPT  { return l_.max_size(); }
+    bool empty() const _NOEXCEPT          { return l_.empty(); }
+
+    void push_front(const value_type& x)    { l_.push_front(x); }
+    void push_back(const value_type& x)     { l_.push_back(x); }
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void push_back(value_type&& x)          { l_.push_back(std::forward<value_type&&>(x)); }
+    void push_front(value_type&& x)         { l_.push_back(std::forward<value_type&&>(x)); }
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+    template <class... Args>
+        void emplace_back(Args&&... args)   { l_.emplace_back(std::forward<Args>(args)...); }
+    template <class... Args>
+        void emplace_front(Args&&... args)  { l_.emplace_front(std::forward<Args>(args)...); }
+#endif
+#endif
+    void pop_front()                        { l_.pop_front(); }
+    void pop_back()                         { l_.pop_back(); }
+
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+    template <class... Args> iterator emplace(const_iterator pos, Args&&... args)
+    { return l_.emplace(pos, std::forward<Args>(args)...); }
+#endif
+#endif
+    
+    iterator insert(const_iterator pos, const value_type& x) { return l_.insert(pos, x); }
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    iterator insert(const_iterator pos, value_type&& x)      { return l_.insert(pos, std::forward<value_type>(x)); }
+#endif
+    iterator insert(const_iterator pos, size_type n, const value_type& x) { return l_.insert(pos, n, x); }
+    template <class InputIterator>
+        iterator insert(const_iterator pos, InputIterator first, InputIterator last)
+    { return l_.insert(pos, first, last); }
+
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    iterator insert(const_iterator pos, std::initializer_list<value_type> il) { return l_.insert(pos, il); }
+#endif
+
+    iterator erase(const_iterator pos)                      { return l_.erase(pos); }
+    iterator erase(const_iterator pos, const_iterator last) { return l_.erase(pos, last); }
+
+    void resize(size_type sz)                      { l_.resize(); }
+    void resize(size_type sz, const value_type& c) { l_.resize(c); }
+
+    void swap(nasty_list &nl) _NOEXCEPT_(std::__is_nothrow_swappable<nested_container>::value)
+    { l_.swap(nl.l_); }
+    
+    void clear() _NOEXCEPT { l_.clear(); }
+
+//     void splice(const_iterator position, list& x);
+//     void splice(const_iterator position, list&& x);
+//     void splice(const_iterator position, list& x, const_iterator i);
+//     void splice(const_iterator position, list&& x, const_iterator i);
+//     void splice(const_iterator position, list& x, const_iterator first,
+//                                                   const_iterator last);
+//     void splice(const_iterator position, list&& x, const_iterator first,
+//                                                   const_iterator last);
+// 
+//     void remove(const value_type& value);
+//     template <class Pred> void remove_if(Pred pred);
+//     void unique();
+//     template <class BinaryPredicate>
+//         void unique(BinaryPredicate binary_pred);
+//     void merge(list& x);
+//     void merge(list&& x);
+//     template <class Compare>
+//         void merge(list& x, Compare comp);
+//     template <class Compare>
+//         void merge(list&& x, Compare comp);
+//     void sort();
+//     template <class Compare>
+//         void sort(Compare comp);
+//     void reverse() noexcept;
+
+    nasty_list *operator &()             { return nullptr; }  // nasty
+    const nasty_list *operator &() const { return nullptr; }  // nasty
+
+    nested_container l_;
+};
+
+template <class T>
+bool operator==(const nasty_list<T>& x, const nasty_list<T>& y) { return x.l_ == y.l_; }
+
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/support/test_allocator.h b/sources/cxx-stl/llvm-libc++/libcxx/test/support/test_allocator.h
index 99f72a0..683fac2 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/support/test_allocator.h
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/support/test_allocator.h
@@ -92,6 +92,66 @@
         {return !(x == y);}
 };
 
+template <class T>
+class non_default_test_allocator
+    : public test_alloc_base
+{
+    int data_;
+
+    template <class U> friend class non_default_test_allocator;
+public:
+
+    typedef unsigned                                                   size_type;
+    typedef int                                                        difference_type;
+    typedef T                                                          value_type;
+    typedef value_type*                                                pointer;
+    typedef const value_type*                                          const_pointer;
+    typedef typename std::add_lvalue_reference<value_type>::type       reference;
+    typedef typename std::add_lvalue_reference<const value_type>::type const_reference;
+
+    template <class U> struct rebind {typedef non_default_test_allocator<U> other;};
+
+//    non_default_test_allocator() throw() : data_(0) {++count;}
+    explicit non_default_test_allocator(int i) throw() : data_(i) {++count;}
+    non_default_test_allocator(const non_default_test_allocator& a) throw()
+        : data_(a.data_) {++count;}
+    template <class U> non_default_test_allocator(const non_default_test_allocator<U>& a) throw()
+        : data_(a.data_) {++count;}
+    ~non_default_test_allocator() throw() {assert(data_ >= 0); --count; data_ = -1;}
+    pointer address(reference x) const {return &x;}
+    const_pointer address(const_reference x) const {return &x;}
+    pointer allocate(size_type n, const void* = 0)
+        {
+            assert(data_ >= 0);
+            if (time_to_throw >= throw_after) {
+#ifndef _LIBCPP_NO_EXCEPTIONS
+                throw std::bad_alloc();
+#else
+                std::terminate();
+#endif
+            }
+            ++time_to_throw;
+            ++alloc_count;
+            return (pointer)std::malloc(n * sizeof(T));
+        }
+    void deallocate(pointer p, size_type n)
+        {assert(data_ >= 0); --alloc_count; std::free(p);}
+    size_type max_size() const throw()
+        {return UINT_MAX / sizeof(T);}
+    void construct(pointer p, const T& val)
+        {::new(p) T(val);}
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void construct(pointer p, T&& val)
+        {::new(p) T(std::move(val));}
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    void destroy(pointer p) {p->~T();}
+
+    friend bool operator==(const non_default_test_allocator& x, const non_default_test_allocator& y)
+        {return x.data_ == y.data_;}
+    friend bool operator!=(const non_default_test_allocator& x, const non_default_test_allocator& y)
+        {return !(x == y);}
+};
+
 template <>
 class test_allocator<void>
     : public test_alloc_base
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/testit_android b/sources/cxx-stl/llvm-libc++/libcxx/test/testit_android
index 1591300..462ab20 100755
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/testit_android
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/testit_android
@@ -71,13 +71,25 @@
 # The list of valid target abis supported by this script.
 VALID_ABIS="armeabi armeabi-v7a x86 mips"
 
+HOST_OS=`uname -s`
+if [ "$HOST_OS" = "Darwin" ]; then
+    # darwin doesn't have readelf.  hard-code a known one
+    READELF=../../../../../toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-readelf
+else
+    READELF=readelf
+fi
+
 DO_HELP=
 DO_STATIC=
 TARGET_ABI=
 TARGET_ARCH=
-TARGET_PATH=/data/local/tmp/libcxx
+if [ -z "$TARGET_TEST_SUBDIR" ]; then
+    TARGET_TEST_SUBDIR="libcxx"
+fi
+TARGET_PATH=/data/local/tmp/$TARGET_TEST_SUBDIR
 CXX=
 WITH_COMPILER_RT=
+LIBCXX_NEEDS_COMPILER_RT=
 for OPT; do
   case $OPT in
     --help|-?)
@@ -177,7 +189,12 @@
 done
 
 LIBCOMPILER_RT_LIBS=$(cd "$LIBCXX_ROOT"/../../../android/compiler-rt && pwd)/libs/$TARGET_ABI
-if [ "$WITH_COMPILER_RT" = "yes" ]; then
+$READELF -d "$LIBCXX_LIBS/libc++_shared.so" | grep NEEDED | grep -q compiler_rt
+if [ $? = 0 ]; then
+  LIBCXX_NEEDS_COMPILER_RT=yes
+fi
+
+if [ "$WITH_COMPILER_RT" = "yes" -o "$LIBCXX_NEEDS_COMPILER_RT" = "yes" ]; then
   for LIB in libcompiler_rt_static.a libcompiler_rt_shared.so; do
     if [ ! -f "$LIBCOMPILER_RT_LIBS/$LIB" ]; then
       echo "ERROR: Missing prebuilt library: $LIBCOMPILER_RT_LIBS/$LIB"
@@ -234,16 +251,17 @@
 
 if [ -z "$OPTIONS" ]
 then
-  OPTIONS="-std=c++11 -O2 -g"
+  OPTIONS="--std=c++11 -O2 -g -funwind-tables"
   # Note that some tests use assert() to check condition but -O2 defines assert() to nothing,
   # unless we specify -UNDEBUG to bring assert() back.
   # But currently adding -UNDEBUG crashes both clang3.4 and clang3.3 for test
   # like libcxx/test/atomics/atomics.types.generic/address.pass.cpp.  Define -UNDEBUG
   # only when we are not using clang.  ToDo
-  if [ "$CXX" = "${CXX%%*clang++*}" ] ; then
-    OPTIONS="$OPTIONS -UNDEBUG"
+  if [ "$CXX" != "${CXX%clang++*}" ] ; then
+    OPTIONS="$OPTIONS -UNDEBUG -mllvm -arm-enable-ehabi-descriptors -mllvm -arm-enable-ehabi"
   fi
 fi
+
 OPTIONS="$OPTIONS $TOOLCHAIN_CFLAGS $TOOLCHAIN_LDFLAGS"
 OPTIONS="$OPTIONS -I$LIBCXX_ROOT/test/support"
 # llvm-libc++/libcxx/test/lit.cfg line #278 defineds the following for testing only on Linux
@@ -327,7 +345,7 @@
   # Note that in standalone toolchain libc++_static is renamed to libstdc++, and
   # compiler adds -lstdc++ implicitly
   if [ "$WITH_COMPILER_RT" = "yes" ]; then
-    LIBS="-lcompiler_rt_static -latomic"
+    LIBS="-nodefaultlibs -lstdc++ -latomic -ldl -lm -lc -lcompiler_rt_static"
   else
     LIBS="-latomic"
   fi
@@ -337,14 +355,17 @@
     echo "ERROR: Can't push shared libc++ to target device!"
     exit 1
   fi
-  if [ "$WITH_COMPILER_RT" = "yes" ]; then
+
+  if [ "$WITH_COMPILER_RT" = "yes" -o "$LIBCXX_NEEDS_COMPILER_RT" = "yes" ]; then
     run2 $ADB push $LIBCOMPILER_RT_LIBS/libcompiler_rt_shared.so $TARGET_PATH 2>/dev/null
     if [ $? != 0 ]; then
       echo "ERROR: Can't push shared libcompiler_rt to target device!"
       exit 1
     fi
-    LIBS="-lc++_shared -lcompiler_rt_shared -latomic"
-    #LIBS="-nodefaultlibs -lc++_shared -lcompiler_rt_shared -latomic -ldl -lc -lm"
+  fi
+
+  if [ "$WITH_COMPILER_RT" = "yes" ]; then
+    LIBS="-nodefaultlibs -lc++_shared -latomic -ldl -lm -lc -lcompiler_rt_shared"
   else
     LIBS="-lc++_shared -latomic"
   fi
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/async.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/async.pass.cpp
index 697eb08..f67abe4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/async.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/async.pass.cpp
@@ -55,6 +55,12 @@
     return std::move(p);
 }
 
+void f5(int i)
+{
+    std::this_thread::sleep_for(ms(200));
+    throw i;
+}
+
 int main()
 {
     {
@@ -174,4 +180,17 @@
         Clock::time_point t1 = Clock::now();
         assert(t1-t0 < ms(100));
     }
+
+    {
+        std::future<void> f = std::async(f5, 3);
+        std::this_thread::sleep_for(ms(300));
+        try { f.get(); assert (false); } catch ( int ex ) {}
+    }
+
+    {
+        std::future<void> f = std::async(std::launch::deferred, f5, 3);
+        std::this_thread::sleep_for(ms(300));
+        try { f.get(); assert (false); } catch ( int ex ) {}
+    }
+
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.future_error/what.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
index 1c250a9..5e54350 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
@@ -7,6 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+// LWG 2056 changed the values of future_errc, so if we're using new headers
+// with an old library we'll get incorrect messages.
+//
+// XFAIL: with_system_lib=x86_64-apple-darwin11
+// XFAIL: with_system_lib=x86_64-apple-darwin12
+// XFAIL: with_system_lib=x86_64-apple-darwin13
+
 // <future>
 
 // class future_error
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
index 3401605..cd4fafb 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
@@ -100,7 +100,15 @@
         }
         catch (const std::future_error& e)
         {
-            assert(e.code() == make_error_code(std::future_errc::broken_promise));
+            // LWG 2056 changed the values of future_errc, so if we're using new
+            // headers with an old library the error codes won't line up.
+            //
+            // Note that this particular check only applies to promise<void>
+            // since the other specializations happen to be implemented in the
+            // header rather than the library.
+            assert(
+                e.code() == make_error_code(std::future_errc::broken_promise) ||
+                e.code() == std::error_code(0, std::future_category()));
         }
     }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
index 7009f30..58e9982 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
@@ -35,6 +35,8 @@
 int A::n_moves = 0;
 int A::n_copies = 0;
 
+int func(int i) { return i; }
+
 int main()
 {
     {
@@ -58,4 +60,18 @@
         assert(A::n_copies > 0);
         assert(A::n_moves > 0);
     }
+    {
+        std::packaged_task<int(int)> p(&func);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    {
+        std::packaged_task<int(int)> p(func);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
index 2e0cf5d..e7070c5 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
@@ -37,6 +37,8 @@
 int A::n_moves = 0;
 int A::n_copies = 0;
 
+int func(int i) { return i; }
+
 int main()
 {
     {
@@ -52,7 +54,7 @@
     }
     assert(test_alloc_base::count == 0);
     A::n_copies = 0;
-    A::n_copies = 0;
+    A::n_moves  = 0;
     {
         A a(5);
         std::packaged_task<double(int, char)> p(std::allocator_arg,
@@ -66,4 +68,28 @@
         assert(A::n_moves > 0);
     }
     assert(test_alloc_base::count == 0);
+    A::n_copies = 0;
+    A::n_moves  = 0;
+    {
+        A a(5);
+        std::packaged_task<int(int)> p(std::allocator_arg, test_allocator<A>(), &func);
+        assert(test_alloc_base::count > 0);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    assert(test_alloc_base::count == 0);
+    A::n_copies = 0;
+    A::n_moves  = 0;
+    {
+        A a(5);
+        std::packaged_task<int(int)> p(std::allocator_arg, test_allocator<A>(), func);
+        assert(test_alloc_base::count > 0);
+        assert(p.valid());
+        std::future<int> f = p.get_future();
+        p(4);
+        assert(f.get() == 4);
+    }
+    assert(test_alloc_base::count == 0);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait.exception.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait.exception.pass.cpp
new file mode 100644
index 0000000..dd4879d
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait.exception.pass.cpp
@@ -0,0 +1,52 @@
+#include <thread>
+#include <condition_variable>
+#include <mutex>
+#include <chrono>
+#include <iostream>
+#include <cassert>
+
+void f1()
+{
+    std::exit(0);
+}
+
+struct Mutex
+{
+    unsigned state = 0;
+    Mutex() = default;
+    ~Mutex() = default;
+    Mutex(const Mutex&) = delete;
+    Mutex& operator=(const Mutex&) = delete;
+
+    void lock()
+    {
+    if (++state == 2)
+        throw 1;  // this throw should end up calling terminate()
+    }
+
+    void unlock() {}
+};
+
+Mutex mut;
+std::condition_variable_any cv;
+
+void
+signal_me()
+{
+    std::this_thread::sleep_for(std::chrono::milliseconds(500));
+    cv.notify_one();
+}
+
+int
+main()
+{
+    std::set_terminate(f1);
+    try
+    {
+        std::thread(signal_me).detach();
+        mut.lock();
+        cv.wait(mut);
+    }
+    catch (...) {}
+    assert(false);
+}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait_for.exception.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait_for.exception.pass.cpp
new file mode 100644
index 0000000..7eb4b33
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.condition/thread.condition.condvarany/wait_for.exception.pass.cpp
@@ -0,0 +1,52 @@
+#include <thread>
+#include <condition_variable>
+#include <mutex>
+#include <chrono>
+#include <iostream>
+#include <cassert>
+
+void f1()
+{
+    std::exit(0);
+}
+
+struct Mutex
+{
+    unsigned state = 0;
+    Mutex() = default;
+    ~Mutex() = default;
+    Mutex(const Mutex&) = delete;
+    Mutex& operator=(const Mutex&) = delete;
+
+    void lock()
+    {
+    if (++state == 2)
+        throw 1;  // this throw should end up calling terminate()
+    }
+
+    void unlock() {}
+};
+
+Mutex mut;
+std::condition_variable_any cv;
+
+void
+signal_me()
+{
+    std::this_thread::sleep_for(std::chrono::milliseconds(500));
+    cv.notify_one();
+}
+
+int
+main()
+{
+    std::set_terminate(f1);
+    try
+    {
+        std::thread(signal_me).detach();
+        mut.lock();
+        cv.wait_for(mut, std::chrono::milliseconds(250));
+    }
+    catch (...) {}
+    assert(false);
+}
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp
index 0bd347d..446807f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp
@@ -17,16 +17,16 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m0;
-std::shared_mutex m1;
+std::shared_timed_mutex m0;
+std::shared_timed_mutex m1;
 
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0(m0);
-    std::shared_lock<std::shared_mutex> lk1(m1);
+    std::shared_lock<std::shared_timed_mutex> lk0(m0);
+    std::shared_lock<std::shared_timed_mutex> lk1(m1);
     lk1 = lk0;
 #else
 #   error
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp
index 66cec9e..370c1fa 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp
@@ -16,14 +16,14 @@
 #include <shared_mutex>
 
 #if _LIBCPP_STD_VER > 11
-std::shared_mutex m;
+std::shared_timed_mutex m;
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0(m);
-    std::shared_lock<std::shared_mutex> lk = lk0;
+    std::shared_lock<std::shared_timed_mutex> lk0(m);
+    std::shared_lock<std::shared_timed_mutex> lk = lk0;
 #else
 #   error
 #endif  // _LIBCPP_STD_VER > 11
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp
index 2adef5f..2713680 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/default.pass.cpp
@@ -19,7 +19,7 @@
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> ul;
+    std::shared_lock<std::shared_timed_mutex> ul;
     assert(!ul.owns_lock());
     assert(ul.mutex() == nullptr);
 #endif  // _LIBCPP_STD_VER > 11
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp
index 1fcc98f..73936b7 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp
@@ -18,16 +18,16 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m0;
-std::shared_mutex m1;
+std::shared_timed_mutex m0;
+std::shared_timed_mutex m1;
 
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0(m0);
-    std::shared_lock<std::shared_mutex> lk1(m1);
+    std::shared_lock<std::shared_timed_mutex> lk0(m0);
+    std::shared_lock<std::shared_timed_mutex> lk1(m1);
     lk1 = std::move(lk0);
     assert(lk1.mutex() == &m0);
     assert(lk1.owns_lock() == true);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp
index 7e801da..cf63861 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_ctor.pass.cpp
@@ -17,14 +17,14 @@
 #include <cassert>
 
 #if _LIBCPP_STD_VER > 11
-std::shared_mutex m;
+std::shared_timed_mutex m;
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0(m);
-    std::shared_lock<std::shared_mutex> lk = std::move(lk0);
+    std::shared_lock<std::shared_timed_mutex> lk0(m);
+    std::shared_lock<std::shared_timed_mutex> lk = std::move(lk0);
     assert(lk.mutex() == &m);
     assert(lk.owns_lock() == true);
     assert(lk0.mutex() == nullptr);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
index fd1dad4..01bfbfd 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
@@ -34,7 +34,7 @@
     time_point t0 = Clock::now();
     time_point t1;
     {
-    std::shared_lock<std::shared_mutex> ul(m);
+    std::shared_lock<std::shared_timed_mutex> ul(m);
     t1 = Clock::now();
     }
     ns d = t1 - t0 - ms(250);
@@ -46,7 +46,7 @@
     time_point t0 = Clock::now();
     time_point t1;
     {
-    std::shared_lock<std::shared_mutex> ul(m);
+    std::shared_lock<std::shared_timed_mutex> ul(m);
     t1 = Clock::now();
     }
     ns d = t1 - t0;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
index 9c44005..b4f6025 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
@@ -19,9 +19,9 @@
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
+    std::shared_timed_mutex m;
     m.lock();
-    std::shared_lock<std::shared_mutex> lk(m, std::adopt_lock);
+    std::shared_lock<std::shared_timed_mutex> lk(m, std::adopt_lock);
     assert(lk.mutex() == &m);
     assert(lk.owns_lock() == true);
 #endif  // _LIBCPP_STD_VER > 11
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp
index 2f2247a..3a8b61a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp
@@ -19,8 +19,8 @@
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
-    std::shared_lock<std::shared_mutex> lk(m, std::defer_lock);
+    std::shared_timed_mutex m;
+    std::shared_lock<std::shared_timed_mutex> lk(m, std::defer_lock);
     assert(lk.mutex() == &m);
     assert(lk.owns_lock() == false);
 #endif  // _LIBCPP_STD_VER > 11
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
index f3798af..ffe329c 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
@@ -22,7 +22,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
@@ -33,7 +33,7 @@
 void f1()
 {
     time_point t0 = Clock::now();
-    std::shared_lock<std::shared_mutex> lk(m, ms(300));
+    std::shared_lock<std::shared_timed_mutex> lk(m, ms(300));
     assert(lk.owns_lock() == true);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
@@ -43,7 +43,7 @@
 void f2()
 {
     time_point t0 = Clock::now();
-    std::shared_lock<std::shared_mutex> lk(m, ms(250));
+    std::shared_lock<std::shared_timed_mutex> lk(m, ms(250));
     assert(lk.owns_lock() == false);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp
index 44eaee2..baf08de 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // template <class Clock, class Duration>
 //   shared_lock(mutex_type& m, const chrono::time_point<Clock, Duration>& abs_time);
@@ -22,7 +22,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
@@ -33,7 +33,7 @@
 void f1()
 {
     time_point t0 = Clock::now();
-    std::shared_lock<std::shared_mutex> lk(m, Clock::now() + ms(300));
+    std::shared_lock<std::shared_timed_mutex> lk(m, Clock::now() + ms(300));
     assert(lk.owns_lock() == true);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
@@ -43,7 +43,7 @@
 void f2()
 {
     time_point t0 = Clock::now();
-    std::shared_lock<std::shared_mutex> lk(m, Clock::now() + ms(250));
+    std::shared_lock<std::shared_timed_mutex> lk(m, Clock::now() + ms(250));
     assert(lk.owns_lock() == false);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp
index 9dae3f9..9d06d3f 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
@@ -33,20 +33,20 @@
 {
     time_point t0 = Clock::now();
     {
-        std::shared_lock<std::shared_mutex> lk(m, std::try_to_lock);
+        std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock);
         assert(lk.owns_lock() == false);
     }
     {
-        std::shared_lock<std::shared_mutex> lk(m, std::try_to_lock);
+        std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock);
         assert(lk.owns_lock() == false);
     }
     {
-        std::shared_lock<std::shared_mutex> lk(m, std::try_to_lock);
+        std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock);
         assert(lk.owns_lock() == false);
     }
     while (true)
     {
-        std::shared_lock<std::shared_mutex> lk(m, std::try_to_lock);
+        std::shared_lock<std::shared_timed_mutex> lk(m, std::try_to_lock);
         if (lk.owns_lock())
             break;
     }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp
index c6617a5..ecac479 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
@@ -31,7 +31,7 @@
 
 void f()
 {
-    std::shared_lock<std::shared_mutex> lk(m, std::defer_lock);
+    std::shared_lock<std::shared_timed_mutex> lk(m, std::defer_lock);
     time_point t0 = Clock::now();
     lk.lock();
     time_point t1 = Clock::now();
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp
index 927e9d1..4b4f6c6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/mutex.pass.cpp
@@ -18,16 +18,16 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0;
+    std::shared_lock<std::shared_timed_mutex> lk0;
     assert(lk0.mutex() == nullptr);
-    std::shared_lock<std::shared_mutex> lk1(m);
+    std::shared_lock<std::shared_timed_mutex> lk1(m);
     assert(lk1.mutex() == &m);
     lk1.unlock();
     assert(lk1.mutex() == &m);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp
index 901ccbc..177a69e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp
@@ -18,16 +18,16 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0;
+    std::shared_lock<std::shared_timed_mutex> lk0;
     assert(static_cast<bool>(lk0) == false);
-    std::shared_lock<std::shared_mutex> lk1(m);
+    std::shared_lock<std::shared_timed_mutex> lk1(m);
     assert(static_cast<bool>(lk1) == true);
     lk1.unlock();
     assert(static_cast<bool>(lk1) == false);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp
index ca4715b..a10c588 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/owns_lock.pass.cpp
@@ -18,16 +18,16 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 #endif  // _LIBCPP_STD_VER > 11
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_lock<std::shared_mutex> lk0;
+    std::shared_lock<std::shared_timed_mutex> lk0;
     assert(lk0.owns_lock() == false);
-    std::shared_lock<std::shared_mutex> lk1(m);
+    std::shared_lock<std::shared_timed_mutex> lk1(m);
     assert(lk1.owns_lock() == true);
     lk1.unlock();
     assert(lk1.owns_lock() == false);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp
similarity index 100%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do.pass.cpp
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/assign.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp
similarity index 74%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/assign.fail.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp
index 1405a22..528aaca 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/assign.fail.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp
@@ -9,17 +9,17 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
-// shared_mutex& operator=(const shared_mutex&) = delete;
+// shared_timed_mutex& operator=(const shared_timed_mutex&) = delete;
 
 #include <shared_mutex>
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_mutex m0;
-    std::shared_mutex m1;
+    std::shared_timed_mutex m0;
+    std::shared_timed_mutex m1;
     m1 = m0;
 #else
 #   error
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/copy.fail.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp
similarity index 74%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/copy.fail.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp
index 7e69923..dbf0100 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/copy.fail.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp
@@ -9,17 +9,17 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
-// shared_mutex(const shared_mutex&) = delete;
+// shared_timed_mutex(const shared_timed_mutex&) = delete;
 
 #include <shared_mutex>
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_mutex m0;
-    std::shared_mutex m1(m0);
+    std::shared_timed_mutex m0;
+    std::shared_timed_mutex m1(m0);
 #else
 #   error
 #endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp
similarity index 83%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp
index 060fb92..f45382d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp
@@ -9,15 +9,15 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
-// shared_mutex();
+// shared_timed_mutex();
 
 #include <shared_mutex>
 
 int main()
 {
 #if _LIBCPP_STD_VER > 11
-    std::shared_mutex m;
+    std::shared_timed_mutex m;
 #endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp
similarity index 94%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp
index 2fd7800..153ce62 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // void lock();
 
@@ -20,7 +20,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock_shared.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp
similarity index 96%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock_shared.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp
index 6fe1b44..724a7b0 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock_shared.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // void lock_shared();
 
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp
similarity index 95%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp
index 86aa0c4..aa6f5fb 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // bool try_lock();
 
@@ -20,7 +20,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_for.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp
similarity index 96%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_for.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp
index 1560359..e97b313 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_for.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // template <class Rep, class Period>
 //     bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp
similarity index 95%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp
index da859ab..a34633e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // bool try_lock_shared();
 
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::system_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_for.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp
similarity index 96%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_for.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp
index b1d6e4c..528c69a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_for.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // template <class Rep, class Period>
 //     bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time);
@@ -22,7 +22,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_until.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp
similarity index 96%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_until.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp
index 3dbf0c7..a6238e3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_until.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // template <class Clock, class Duration>
 //     bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time);
@@ -22,7 +22,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_until.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp
similarity index 96%
rename from sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_until.pass.cpp
rename to sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp
index 44f91f0..8670fbf 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_until.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp
@@ -9,7 +9,7 @@
 
 // <shared_mutex>
 
-// class shared_mutex;
+// class shared_timed_mutex;
 
 // template <class Clock, class Duration>
 //     bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
@@ -21,7 +21,7 @@
 
 #if _LIBCPP_STD_VER > 11
 
-std::shared_mutex m;
+std::shared_timed_mutex m;
 
 typedef std::chrono::steady_clock Clock;
 typedef Clock::time_point time_point;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
new file mode 100644
index 0000000..537fb90
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
@@ -0,0 +1,116 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <scoped_allocator>
+#include <cassert>
+
+#if __cplusplus >= 201103L
+// #include <memory>
+//
+// template <class Alloc>
+// struct allocator_traits
+// {
+//     typedef Alloc                        allocator_type;
+//     typedef typename allocator_type::value_type
+//                                          value_type;
+// 
+//     typedef Alloc::pointer | value_type* pointer;
+//     typedef Alloc::const_pointer
+//           | pointer_traits<pointer>::rebind<const value_type>
+//                                          const_pointer;
+//     typedef Alloc::void_pointer
+//           | pointer_traits<pointer>::rebind<void>
+//                                          void_pointer;
+//     typedef Alloc::const_void_pointer
+//           | pointer_traits<pointer>::rebind<const void>
+//                                          const_void_pointer;
+
+template <typename Alloc>
+void test_pointer()
+{
+     typename std::allocator_traits<Alloc>::pointer        vp;
+     typename std::allocator_traits<Alloc>::const_pointer cvp;
+     
+     static_assert(std::is_same<bool, decltype( vp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype( vp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype(cvp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <= cvp)>::value, "");
+}
+
+template <typename Alloc>
+void test_void_pointer()
+{
+     typename std::allocator_traits<Alloc>::void_pointer        vp;
+     typename std::allocator_traits<Alloc>::const_void_pointer cvp;
+     
+     static_assert(std::is_same<bool, decltype( vp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype( vp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype(cvp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <= cvp)>::value, "");
+}
+
+struct Foo { int x; };
+
+int main()
+{
+	test_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
+	test_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
+	test_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();
+
+	test_void_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
+	test_void_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
+	test_void_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();	
+}
+#else
+int main() {}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
index 79fc151..f758a4d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
@@ -92,6 +92,15 @@
     }
     assert(new_called == 0);
     {
+    assert(new_called == 0);
+    non_default_test_allocator<std::function<int(int)>> al(1);
+    std::function<int(int)> f2(std::allocator_arg, al, g);
+    assert(new_called == 0);
+    assert(f2.target<int(*)(int)>());
+    assert(f2.target<A>() == 0);
+    }
+    assert(new_called == 0);
+    {
     std::function<int(int)> f;
     assert(new_called == 0);
     assert(f.target<int(*)(int)>() == 0);
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp
new file mode 100644
index 0000000..b894e45
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp
@@ -0,0 +1,116 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <memory>
+#include <cassert>
+
+#if __cplusplus >= 201103L
+// #include <memory>
+//
+// template <class Alloc>
+// struct allocator_traits
+// {
+//     typedef Alloc                        allocator_type;
+//     typedef typename allocator_type::value_type
+//                                          value_type;
+// 
+//     typedef Alloc::pointer | value_type* pointer;
+//     typedef Alloc::const_pointer
+//           | pointer_traits<pointer>::rebind<const value_type>
+//                                          const_pointer;
+//     typedef Alloc::void_pointer
+//           | pointer_traits<pointer>::rebind<void>
+//                                          void_pointer;
+//     typedef Alloc::const_void_pointer
+//           | pointer_traits<pointer>::rebind<const void>
+//                                          const_void_pointer;
+
+template <typename Alloc>
+void test_pointer()
+{
+     typename std::allocator_traits<Alloc>::pointer        vp;
+     typename std::allocator_traits<Alloc>::const_pointer cvp;
+     
+     static_assert(std::is_same<bool, decltype( vp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype( vp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype(cvp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <= cvp)>::value, "");
+}
+
+template <typename Alloc>
+void test_void_pointer()
+{
+     typename std::allocator_traits<Alloc>::void_pointer        vp;
+     typename std::allocator_traits<Alloc>::const_void_pointer cvp;
+     
+     static_assert(std::is_same<bool, decltype( vp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype( vp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp ==  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp !=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >=  vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <   vp)>::value, "");
+     static_assert(std::is_same<bool, decltype( vp <= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <=  vp)>::value, "");
+
+     static_assert(std::is_same<bool, decltype(cvp == cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp != cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp >= cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <  cvp)>::value, "");
+     static_assert(std::is_same<bool, decltype(cvp <= cvp)>::value, "");
+}
+
+struct Foo { int x; };
+
+int main()
+{
+	test_pointer<std::allocator<char>> ();
+	test_pointer<std::allocator<int>> ();
+	test_pointer<std::allocator<Foo>> ();	
+
+	test_void_pointer<std::allocator<char>> ();
+	test_void_pointer<std::allocator<int>> ();
+	test_void_pointer<std::allocator<Foo>> ();	
+}
+#else
+int main() {}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
index 706d19c..e5713f3 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr.pass.cpp
@@ -59,4 +59,20 @@
     }
     assert(B::count == 0);
     assert(A::count == 0);
+
+    {
+        const std::shared_ptr<A> ps(new A);
+        std::weak_ptr<A> pA(ps);
+        {
+            std::weak_ptr<A> pB;
+            pB = std::move(pA);
+            assert(B::count == 1);
+            assert(A::count == 1);
+            assert(pB.use_count() == 1);
+        }
+        assert(B::count == 1);
+        assert(A::count == 1);
+    }
+    assert(B::count == 0);
+    assert(A::count == 0);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
index 76e701f..5a03d92 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.assign/weak_ptr_Y.pass.cpp
@@ -59,4 +59,20 @@
     }
     assert(B::count == 0);
     assert(A::count == 0);
+
+    {
+        const std::shared_ptr<A> ps(new A);
+        std::weak_ptr<A> pA(ps);
+        {
+            std::weak_ptr<B> pB;
+            pB = std::move(pA);
+            assert(B::count == 1);
+            assert(A::count == 1);
+            assert(pB.use_count() == 1);
+        }
+        assert(B::count == 1);
+        assert(A::count == 1);
+    }
+    assert(B::count == 0);
+    assert(A::count == 0);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
index f0e6c99..1fdf883 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr.pass.cpp
@@ -12,6 +12,7 @@
 // weak_ptr
 
 // weak_ptr(const weak_ptr& r);
+// weak_ptr(weak_ptr &&r)
 
 #include <memory>
 #include <type_traits>
@@ -51,6 +52,12 @@
 
 int C::count = 0;
 
+template <class T>
+std::weak_ptr<T> source (std::shared_ptr<T> p) { return std::weak_ptr<T>(p); }
+
+template <class T>
+void sink (std::weak_ptr<T> &&) {}
+
 int main()
 {
     {
@@ -90,4 +97,14 @@
     }
     assert(B::count == 0);
     assert(A::count == 0);
+
+    {
+        std::shared_ptr<A> ps(new A);
+        std::weak_ptr<A> pA = source(ps);
+        assert(pA.use_count() == 1);
+        assert(A::count == 1);
+        sink(std::move(pA)); // kill off the weak pointer
+    }
+    assert(B::count == 0);
+    assert(A::count == 0);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
index 6af4691..70ad11b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/weak_ptr_Y.pass.cpp
@@ -12,6 +12,7 @@
 // weak_ptr
 
 // template<class Y> weak_ptr(const weak_ptr<Y>& r);
+// template<class Y> weak_ptr(weak_ptr<Y> &&r);
 
 #include <memory>
 #include <type_traits>
@@ -51,6 +52,12 @@
 
 int C::count = 0;
 
+template <class T>
+std::weak_ptr<T> source (std::shared_ptr<T> p) { return std::weak_ptr<T>(p); }
+
+template <class T>
+void sink (std::weak_ptr<T> &&) {}
+
 int main()
 {
     static_assert(( std::is_convertible<std::weak_ptr<A>, std::weak_ptr<B> >::value), "");
@@ -92,4 +99,13 @@
     }
     assert(B::count == 0);
     assert(A::count == 0);
+
+    {
+        std::shared_ptr<A> ps(new A);
+        std::weak_ptr<A> pA = source(ps);
+        std::weak_ptr<B> pB(std::move(pA));
+        assert(pB.use_count() == 1);
+    }
+    assert(B::count == 0);
+    assert(A::count == 0);
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.rel/is_convertible.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.rel/is_convertible.pass.cpp
index 718e0ff..9d3589b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.rel/is_convertible.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.rel/is_convertible.pass.cpp
@@ -38,6 +38,13 @@
   NonCopyable(NonCopyable&);
 };
 
+class MoveOnly {
+  MoveOnly(const MoveOnly &);
+  MoveOnly& operator =(const MoveOnly&);
+public:
+    MoveOnly(MoveOnly&& x);
+};
+
 int main()
 {
     // void
@@ -177,13 +184,17 @@
     static_assert(( std::is_convertible<const char*, const char*>::value), "");
 
     // NonCopyable
-    static_assert((std::is_convertible<NonCopyable&, NonCopyable&>::value), "");
-    static_assert((std::is_convertible<NonCopyable&, const NonCopyable&>::value), "");
-    static_assert((std::is_convertible<NonCopyable&, const volatile NonCopyable&>::value), "");
-    static_assert((std::is_convertible<NonCopyable&, volatile NonCopyable&>::value), "");
-    static_assert((std::is_convertible<const NonCopyable&, const NonCopyable&>::value), "");
-    static_assert((std::is_convertible<const NonCopyable&, const volatile NonCopyable&>::value), "");
-    static_assert((std::is_convertible<volatile NonCopyable&, const volatile NonCopyable&>::value), "");
-    static_assert((std::is_convertible<const volatile NonCopyable&, const volatile NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<NonCopyable&, NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<NonCopyable&, const NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<NonCopyable&, const volatile NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<NonCopyable&, volatile NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<const NonCopyable&, const NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<const NonCopyable&, const volatile NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<volatile NonCopyable&, const volatile NonCopyable&>::value), "");
+    static_assert(( std::is_convertible<const volatile NonCopyable&, const volatile NonCopyable&>::value), "");
     static_assert((!std::is_convertible<const NonCopyable&, NonCopyable&>::value), "");
+
+    // MoveOnly
+    static_assert(( std::is_convertible<MoveOnly, MoveOnly>::value), "");
+    static_assert((!std::is_convertible<const MoveOnly, MoveOnly>::value), "");
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
index d1b7700..67ee23d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
@@ -159,12 +159,16 @@
     static_assert(std::alignment_of<T1>::value == 8, "");
     static_assert(sizeof(T1) == 16, "");
     }
+    // The expected values for the tests below (modulo the last one) are
+    // platform-specific which alignof deals with. In particular, the maximum
+    // alignment value on ARM is 8 bytes as opposed to 16 bytes on some other
+    // architectures that support 128 bit memory accesses.
     {
     typedef std::aligned_storage<16>::type T1;
 #if _LIBCPP_STD_VER > 11
     static_assert(std::is_same<std::aligned_storage_t<16>, T1>::value, "" );
 #endif
-    static_assert(std::alignment_of<T1>::value == 16, "");
+    static_assert(std::alignment_of<T1>::value == alignof(T1), "");
     static_assert(sizeof(T1) == 16, "");
     }
     {
@@ -172,8 +176,8 @@
 #if _LIBCPP_STD_VER > 11
     static_assert(std::is_same<std::aligned_storage_t<17>, T1>::value, "" );
 #endif
-    static_assert(std::alignment_of<T1>::value == 16, "");
-    static_assert(sizeof(T1) == 32, "");
+    static_assert(std::alignment_of<T1>::value == alignof(T1), "");
+    static_assert(sizeof(T1) == 16 + alignof(T1), "");
     }
     {
     typedef std::aligned_storage<10>::type T1;
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
index 2dd4d9a..7de3b0d 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
@@ -21,6 +21,13 @@
     big = 0xFFFFFFFFFFFFFFFFULL
 };
 
+#if !defined(_LIBCPP_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS)
+enum HugeEnum : __uint128_t
+{
+    hugezero
+};
+#endif
+
 template <class T, class U>
 void test_make_signed()
 {
@@ -47,4 +54,11 @@
     test_make_signed< const wchar_t, std::conditional<sizeof(wchar_t) == 4, const int, const short>::type >();
     test_make_signed< const Enum, const int >();
     test_make_signed< BigEnum, std::conditional<sizeof(long) == 4, long long, long>::type >();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_make_signed< __int128_t, __int128_t >();
+    test_make_signed< __uint128_t, __int128_t >();
+# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS
+    test_make_signed< HugeEnum, __int128_t >();
+# endif
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
index 6700b6c..a13485a 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
@@ -21,6 +21,13 @@
     big = 0xFFFFFFFFFFFFFFFFULL
 };
 
+#if !defined(_LIBCPP_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS)
+enum HugeEnum : __int128_t
+{
+    hugezero
+};
+#endif
+
 template <class T, class U>
 void test_make_unsigned()
 {
@@ -48,4 +55,11 @@
     test_make_unsigned<const Enum, const unsigned int> ();
     test_make_unsigned<BigEnum,
                    std::conditional<sizeof(long) == 4, unsigned long long, unsigned long>::type> ();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_make_unsigned<__int128_t, __uint128_t>();
+    test_make_unsigned<__uint128_t, __uint128_t>();
+# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS
+    test_make_unsigned<HugeEnum, __uint128_t>();
+# endif
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp
index 7d3b0f8..f68ed3e 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp
@@ -58,4 +58,8 @@
     test_integral<unsigned long>();
     test_integral<long long>();
     test_integral<unsigned long long>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_integral<__int128_t>();
+    test_integral<__uint128_t>();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
index dc317c5..c563870 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp
@@ -52,4 +52,27 @@
     test_member_function_pointer<void (Class::*)()>();
     test_member_function_pointer<void (Class::*)(int)>();
     test_member_function_pointer<void (Class::*)(int, char)>();
+
+    test_member_function_pointer<void (Class::*)() const>();
+    test_member_function_pointer<void (Class::*)(int) const>();
+    test_member_function_pointer<void (Class::*)(int, char) const>();
+
+    test_member_function_pointer<void (Class::*)() volatile>();
+    test_member_function_pointer<void (Class::*)(int) volatile>();
+    test_member_function_pointer<void (Class::*)(int, char) volatile>();
+
+#if __cplusplus >= 201103L
+// reference qualifiers on functions are a C++11 extension
+    test_member_function_pointer<void (Class::*)() &&>();
+    test_member_function_pointer<void (Class::*)(int) &&>();
+    test_member_function_pointer<void (Class::*)(int, char) &&>();
+
+    test_member_function_pointer<void (Class::*)() &>();
+    test_member_function_pointer<void (Class::*)(int) &>();
+    test_member_function_pointer<void (Class::*)(int, char) &>();
+
+    test_member_function_pointer<void (Class::*)() volatile &&>();
+    test_member_function_pointer<void (Class::*)(int) volatile &&>();
+    test_member_function_pointer<void (Class::*)(int, char) volatile &&>();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp
index f5da85c..0bc9458 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp
@@ -49,4 +49,8 @@
     test_integral<unsigned long>();
     test_integral<long long>();
     test_integral<unsigned long long>();
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_integral<__int128_t>();
+    test_integral<__uint128_t>();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
index e4af6de..b46a4d6 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
@@ -36,6 +36,7 @@
 
 struct D;
 
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 struct C
 {
     template <class U>
@@ -46,6 +47,7 @@
 {
     C operator=(int);
 };
+#endif
 
 int main()
 {
@@ -54,9 +56,10 @@
     test_is_assignable<int&, double> ();
     test_is_assignable<B, A> ();
     test_is_assignable<void*&, void*> ();
-    test_is_assignable<E, int> ();
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    test_is_assignable<E, int> ();
+
     test_is_not_assignable<int, int&> ();
     test_is_not_assignable<int, int> ();
 #endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp
new file mode 100644
index 0000000..cf32196
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_final.pass.cpp
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// type_traits
+
+// is_final
+
+#include <type_traits>
+
+#if _LIBCPP_STD_VER > 11
+
+struct P final { };
+union U1 { };
+union U2 final { };
+
+template <class T>
+void test_is_final()
+{
+    static_assert( std::is_final<T>::value, "");
+    static_assert( std::is_final<const T>::value, "");
+    static_assert( std::is_final<volatile T>::value, "");
+    static_assert( std::is_final<const volatile T>::value, "");
+}
+
+template <class T>
+void test_is_not_final()
+{
+    static_assert(!std::is_final<T>::value, "");
+    static_assert(!std::is_final<const T>::value, "");
+    static_assert(!std::is_final<volatile T>::value, "");
+    static_assert(!std::is_final<const volatile T>::value, "");
+}
+
+int main ()
+{
+    test_is_not_final<int>();
+    test_is_not_final<int*>();
+    test_is_final    <P>(); 
+    test_is_not_final<P*>();    
+    test_is_not_final<U1>();
+    test_is_not_final<U1*>();
+    test_is_final    <U2>();    
+    test_is_not_final<U2*>();   
+}
+#else
+int main () {}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
index 9737e15..7de6566 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
@@ -51,4 +51,9 @@
 
     test_is_signed<int>();
     test_is_signed<double>();
+
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_is_signed<__int128_t>();
+    test_is_not_signed<__uint128_t>();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
index d3372ad..2cd4945 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
@@ -51,4 +51,9 @@
 
     test_is_unsigned<bool>();
     test_is_unsigned<unsigned>();
+
+#ifndef _LIBCPP_HAS_NO_INT128
+    test_is_unsigned<__uint128_t>();
+    test_is_not_unsigned<__int128_t>();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
new file mode 100644
index 0000000..2862762
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+//  Tuples of smart pointers; based on bug #18350
+//  auto_ptr doesn't have a copy constructor that takes a const &, but tuple does.
+
+#include <tuple>
+#include <memory>
+
+int main () {
+    {
+    std::tuple<std::unique_ptr<char>> up;
+    std::tuple<std::shared_ptr<char>> sp;
+    std::tuple<std::weak_ptr  <char>> wp;
+//     std::tuple<std::auto_ptr  <char>> ap;
+    }
+    {
+    std::tuple<std::unique_ptr<char[]>> up;
+    std::tuple<std::shared_ptr<char[]>> sp;
+    std::tuple<std::weak_ptr  <char[]>> wp;
+//     std::tuple<std::auto_ptr  <char[]>> ap;
+    }
+    {
+    std::tuple<std::unique_ptr<char[5]>> up;
+    std::tuple<std::shared_ptr<char[5]>> sp;
+    std::tuple<std::weak_ptr  <char[5]>> wp;
+//     std::tuple<std::auto_ptr  <char[5]>> ap;
+    }
+}
\ No newline at end of file
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
new file mode 100644
index 0000000..df5fdff
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// This is for bugs 18853 and 19118
+
+#if __cplusplus >= 201103L
+
+#include <tuple>
+#include <functional>
+
+struct X
+{
+    X() {}
+
+    template <class T>
+    X(T);
+
+    void operator()() {}
+};
+
+int
+main()
+{
+    X x;
+    std::function<void()> f(x);
+}
+#else
+int main () {}
+#endif
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
index 112ee39..e6ebf95 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
@@ -27,4 +27,13 @@
         assert(i == 42);
         assert(s == "C++");
     }
+#if _LIBCPP_STD_VER > 11
+    {
+        static constexpr int i = 42;
+        static constexpr double f = 1.1;
+        constexpr std::tuple<const int &, const double &> t = std::tie(i, f);
+        static_assert ( std::get<0>(t) == 42, "" );
+        static_assert ( std::get<1>(t) == 1.1, "" );
+    }
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp
index 7b1ff8b..f3f8f2b 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp
+++ b/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp
@@ -28,7 +28,14 @@
     static_assert((std::is_same<typename std::tuple_element<N, const T>::type, const U>::value), "");
     static_assert((std::is_same<typename std::tuple_element<N, volatile T>::type, volatile U>::value), "");
     static_assert((std::is_same<typename std::tuple_element<N, const volatile T>::type, const volatile U>::value), "");
+#if _LIBCPP_STD_VER > 11
+    static_assert((std::is_same<typename std::tuple_element_t<N, T>, U>::value), "");
+    static_assert((std::is_same<typename std::tuple_element_t<N, const T>, const U>::value), "");
+    static_assert((std::is_same<typename std::tuple_element_t<N, volatile T>, volatile U>::value), "");
+    static_assert((std::is_same<typename std::tuple_element_t<N, const volatile T>, const volatile U>::value), "");
+#endif
 }
+
 int main()
 {
     test<std::tuple<int>, 0, int>();
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0001-android-Add-locale-support.patch b/sources/cxx-stl/llvm-libc++/patches.android/0001-android-Add-locale-support.patch
index 5b63e82..39d5d1b 100644
--- a/sources/cxx-stl/llvm-libc++/patches.android/0001-android-Add-locale-support.patch
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0001-android-Add-locale-support.patch
@@ -1,7 +1,7 @@
-From fbb68e1b52988199871392b4e16d611158a79995 Mon Sep 17 00:00:00 2001
+From 4cc54e7dcd19f78a3ebaaa3c6f05885029c53b01 Mon Sep 17 00:00:00 2001
 From: David 'Digit' Turner <digit@google.com>
 Date: Wed, 12 Feb 2014 20:04:18 +0800
-Subject: [PATCH 1/6] android: Add locale support.
+Subject: [PATCH 01/12] android: Add locale support.
 
 This is based on the Bionic <ctype.h> declarations. Note that
 unfortunately, the _ctype_ table exposed by this header has a bug
@@ -16,7 +16,7 @@
  create mode 100644 src/support/android/locale_android.cpp
 
 diff --git a/include/__locale b/include/__locale
-index 6d75162..d50fd31 100644
+index fb5b196..c793cfe 100644
 --- a/include/__locale
 +++ b/include/__locale
 @@ -375,7 +375,20 @@ public:
@@ -264,5 +264,5 @@
 +
 +const unsigned short* const _ctype_android = ctype_android_tab + 128;
 -- 
-1.9.0.rc1.175.g0b1dcb5
+1.9.1.423.g4596e3a
 
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0002-Fix-GLibc-specific-check.patch b/sources/cxx-stl/llvm-libc++/patches.android/0002-Fix-GLibc-specific-check.patch
index 6046b24..a48f847 100644
--- a/sources/cxx-stl/llvm-libc++/patches.android/0002-Fix-GLibc-specific-check.patch
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0002-Fix-GLibc-specific-check.patch
@@ -1,17 +1,17 @@
-From b8acf6ff623ad7ef404ba0c91f67b621558b678d Mon Sep 17 00:00:00 2001
+From 22849101b7d9413cc204af8427e7ebecc3da569c Mon Sep 17 00:00:00 2001
 From: David 'Digit' Turner <digit@google.com>
 Date: Wed, 12 Feb 2014 20:06:02 +0800
-Subject: [PATCH 2/6] Fix GLibc-specific check.
+Subject: [PATCH 02/12] Fix GLibc-specific check.
 
 ---
  include/__config | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/__config b/include/__config
-index f33e25b..c479fee 100644
+index ce39243..64519b7 100644
 --- a/include/__config
 +++ b/include/__config
-@@ -312,7 +312,7 @@ typedef __char32_t char32_t;
+@@ -317,7 +317,7 @@ typedef __char32_t char32_t;
  #if defined(__FreeBSD__)
  #define _LIBCPP_HAS_QUICK_EXIT
  #define _LIBCPP_HAS_C11_FEATURES
@@ -21,5 +21,5 @@
  #if __GLIBC_PREREQ(2, 15)
  #define _LIBCPP_HAS_QUICK_EXIT
 -- 
-1.9.0.rc1.175.g0b1dcb5
+1.9.1.423.g4596e3a
 
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0003-Fallback-to-locale-C.patch b/sources/cxx-stl/llvm-libc++/patches.android/0003-Fallback-to-locale-C.patch
index 5163536..1e50ee9 100644
--- a/sources/cxx-stl/llvm-libc++/patches.android/0003-Fallback-to-locale-C.patch
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0003-Fallback-to-locale-C.patch
@@ -1,7 +1,7 @@
-From 9f55486c7210bc98d0ca782e75ea9b037e2a2932 Mon Sep 17 00:00:00 2001
+From c6092cc576174fcbd433f3b34288255ef30f6510 Mon Sep 17 00:00:00 2001
 From: Andrew Hsieh <andrewhsieh@google.com>
 Date: Wed, 12 Feb 2014 20:07:01 +0800
-Subject: [PATCH 3/6] Fallback to locale("C")
+Subject: [PATCH 03/12] Fallback to locale("C")
 
 Android's newlocale() return null for anything other than "", "C",
 and "POSIX", fallback to "C" to allow more tests to run and uncover
@@ -305,5 +305,5 @@
      if (loc == nullptr)
          throw runtime_error("moneypunct_byname"
 -- 
-1.9.0.rc1.175.g0b1dcb5
+1.9.1.423.g4596e3a
 
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0004-libc-std-terminate-should-not-specify-throw-in-C-98.patch b/sources/cxx-stl/llvm-libc++/patches.android/0004-std-terminate-should-not-specify-throw-in-C-98.patch
similarity index 81%
rename from sources/cxx-stl/llvm-libc++/patches.android/0004-libc-std-terminate-should-not-specify-throw-in-C-98.patch
rename to sources/cxx-stl/llvm-libc++/patches.android/0004-std-terminate-should-not-specify-throw-in-C-98.patch
index 0476e3a..bff6317 100644
--- a/sources/cxx-stl/llvm-libc++/patches.android/0004-libc-std-terminate-should-not-specify-throw-in-C-98.patch
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0004-std-terminate-should-not-specify-throw-in-C-98.patch
@@ -1,8 +1,8 @@
-From 226c6c6d989445ddc55fa3bab50234f5f5b827e0 Mon Sep 17 00:00:00 2001
+From 8baffbc46d740e997c5c7b2958091d74beb7fa99 Mon Sep 17 00:00:00 2001
 From: Logan Chien <logan.chien@mediatek.com>
 Date: Wed, 12 Feb 2014 20:09:43 +0800
-Subject: [PATCH 4/6] [libc++] std::terminate() should not specify "throw ()"
- in C++ 98.
+Subject: [PATCH 04/12] std::terminate() should not specify "throw ()" in C++
+ 98.
 
 ---
  include/exception | 4 ++++
@@ -25,5 +25,5 @@
  _LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
  
 -- 
-1.9.0.rc1.175.g0b1dcb5
+1.9.1.423.g4596e3a
 
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0005-Fix-gabi-stlport-llvm-libc-build.patch b/sources/cxx-stl/llvm-libc++/patches.android/0005-Fix-gabi-stlport-llvm-libc-build.patch
index 7bc7c27..f300484 100644
--- a/sources/cxx-stl/llvm-libc++/patches.android/0005-Fix-gabi-stlport-llvm-libc-build.patch
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0005-Fix-gabi-stlport-llvm-libc-build.patch
@@ -1,7 +1,7 @@
-From 7fc79b53cba838b604f45bef6a4471915bef26e7 Mon Sep 17 00:00:00 2001
+From 939e32d87dff0fd949e54599d376bfae8381001a Mon Sep 17 00:00:00 2001
 From: Andrew Hsieh <andrewhsieh@google.com>
 Date: Wed, 12 Feb 2014 20:11:53 +0800
-Subject: [PATCH 5/6] Fix gabi++/stlport/llvm-libc++ build
+Subject: [PATCH 05/12] Fix gabi++/stlport/llvm-libc++ build
 
 ---
  src/exception.cpp | 2 +-
@@ -37,15 +37,15 @@
      #endif  // __has_include(<cxxabi.h>)
      #if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
 diff --git a/src/stdexcept.cpp b/src/stdexcept.cpp
-index ec7f666..6a46f34 100644
+index aff4b18..26de25f 100644
 --- a/src/stdexcept.cpp
 +++ b/src/stdexcept.cpp
-@@ -22,7 +22,7 @@
+@@ -18,7 +18,7 @@
+ #endif
  
- #ifdef __APPLE__
- #include <cxxabi.h>
--#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
-+#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>) || defined(__ANDROID__)
+ /* For _LIBCPPABI_VERSION */
+-#if __has_include(<cxxabi.h>) || defined(__APPLE_) || defined(LIBCXXRT)
++#if __has_include(<cxxabi.h>) || defined(__APPLE_) || defined(LIBCXXRT) || defined(__ANDROID__)
  #include <cxxabi.h>
  #endif
  
@@ -63,5 +63,5 @@
  #endif
  
 -- 
-1.9.0.rc1.175.g0b1dcb5
+1.9.1.423.g4596e3a
 
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0006-Emulate-__has_feature-for-GCC.patch b/sources/cxx-stl/llvm-libc++/patches.android/0006-Emulate-__has_feature-for-GCC.patch
new file mode 100644
index 0000000..8c8ef74
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0006-Emulate-__has_feature-for-GCC.patch
@@ -0,0 +1,88 @@
+From 32d07c1ed42529efeb0664d4232bc5c94eedb6a9 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Sun, 27 Apr 2014 22:19:17 -0700
+Subject: [PATCH 06/12] Emulate __has_feature() for GCC
+
+__config defines dozens of _LIBCPP_* flags based on the compiler support of
+language features: for clang it uses __has_feature() to discover; for gcc most
+flags are hard-coded based on gcc version.  Unfortunately some code in libc++
+still use __has_features() directly instead of _LIBCPP_* flags. This CL emulates
+__has_feature() for GCC (from the default "0")
+---
+ include/__config | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 60 insertions(+)
+
+diff --git a/include/__config b/include/__config
+index 64519b7..df84ac6 100644
+--- a/include/__config
++++ b/include/__config
+@@ -434,6 +434,66 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
+ #define _LIBCPP_HAS_NO_ASAN
+ #endif
+ 
++// Emulation of clang's __has_feature() for GCC on known cases
++#ifndef __has_feature
++
++#define __gxx__cxx_access_control_sfinae          !defined(_LIBCPP_HAS_NO_TRAILING_RETURN) || !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) // Also see usage in 7 tests
++#define __gxx__cxx_alias_templates                !defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
++#define __gxx__cxx_address_sanitizer              !defined(_LIBCPP_HAS_NO_ASAN)
++#define __gxx__cxx_alignas                        0  // Not sure, doesn't matter.
++#define __gxx__cxx_atomic                         0  // (_GNUC_VER >= 409) seems to support _Atomic in -std=c11 not -std=c++11 !
++#define __gxx__cxx_attributes                     0  // Not sure. Also see usage in libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp
++#define __gxx__cxx_auto_type                      !defined(_LIBCPP_HAS_NO_AUTO_TYPE)
++#define __gxx__cxx_constexpr                      !defined(_LIBCPP_HAS_NO_CONSTEXPR)
++#define __gxx__cxx_decltype                       !defined(_LIBCPP_HAS_NO_DECLTYPE)
++#define __gxx__cxx_defaulted_functions            !defined(_LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS)  // libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp
++#define __gxx__cxx_deleted_functions              !defined(_LIBCPP_HAS_NO_DELETED_FUNCTIONS)
++#define __gxx__cxx_exceptions                     !defined(_LIBCPP_NO_EXCEPTIONS)
++#define __gxx__cxx_explicit_conversions           (_GNUC_VER >= 405)
++#define __gxx__cxx_generalized_initializers       !defined(_LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS)
++#define __gxx__cxx_lambdas                        !defined(_LIBCPP_HAS_NO_LAMBDAS)
++#define __gxx__cxx_noexcept                       0  // Not sure, doesn't matter.
++#define __gxx__cxx_nullptr                        !defined(_LIBCPP_HAS_NO_NULLPTR)
++#define __gxx__cxx_reference_qualified_functions  (_GNUC_VER >= 408)  // Not if 4.7 work. 4.6 certainly not.  Also see usage in libcxx/include/type_traits
++#ifdef _LIBCPP_NO_RTTI
++#define __gxx__cxx_rtti                           0
++#else
++#define __gxx__cxx_rtti                           __GXX_RTTI
++#endif
++#define __gxx__cxx_rvalue_references              !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
++#define __gxx__cxx_static_assert                  !defined(_LIBCPP_HAS_NO_STATIC_ASSERT)
++#define __gxx__cxx_strong_enums                   !defined(_LIBCPP_HAS_NO_STRONG_ENUMS)  // See usage in libcxx/test/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
++#define __gxx__cxx_trailing_return                !defined(_LIBCPP_HAS_NO_TRAILING_RETURN)
++#define __gxx__cxx_unrestricted_unions            1  // Not sure.  Also See usage in libcxx/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp
++#define __gxx__cxx_variadic_templates             !defined(_LIBCPP_HAS_NO_VARIADICS)
++#define __gxx__has_nothrow_assign                 (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__has_nothrow_constructor            (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__has_nothrow_copy                   (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__has_trivial_constructor            (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__has_trivial_destructor             (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__has_virtual_destructor             (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__is_base_of                         !defined(_LIBCPP_HAS_IS_BASE_OF)  // See usage in libcxx/include/type_traits
++#define __gxx__is_class                           (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__is_convertible_to                  0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_empty                           1  // Not sure.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_enum                            (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__is_final                           (_GNUC_VER >= 408)  // Not if 4.7 work. 4.6 certainly not.  Also see usage in libcxx/include/unordered_map,tuple,ext/hash_map,map,memory
++#define __gxx__is_literal                         0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_pod                             (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__is_polymorphic                     1  // Not sure.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_standard_layout                 1  // Not sure.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_trivial                         0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_trivially_constructible         0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_trivially_copyable              0  // Not supported in GCC 4.8.  Also see usage in libcxx/include/type_traits
++#define __gxx__is_union                           (_GNUC_VER >= 403)  // See usage in libcxx/include/type_traits
++#define __gxx__objc_arc                           defined(_LIBCPP_HAS_OBJC_ARC)
++#define __gxx__objc_arc_weak                      defined(_LIBCPP_HAS_OBJC_ARC_WEAK)
++#define __gxx__underlying_type                    1  // Not sure.  Also see usage in libcxx/include/type_traits
++
++#define __has_feature(__x) __gxx__ ## __x
++
++#endif // __has_feature
++
+ #elif defined(_LIBCPP_MSVC)
+ 
+ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0006-temp-fix-disable-part-of-some-tests-for-Android.patch b/sources/cxx-stl/llvm-libc++/patches.android/0006-temp-fix-disable-part-of-some-tests-for-Android.patch
deleted file mode 100644
index 421342f..0000000
--- a/sources/cxx-stl/llvm-libc++/patches.android/0006-temp-fix-disable-part-of-some-tests-for-Android.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-From 3b92917541fa4ece24aeeacbb6863c8a20dfda96 Mon Sep 17 00:00:00 2001
-From: Andrew Hsieh <andrewhsieh@google.com>
-Date: Wed, 12 Feb 2014 20:12:26 +0800
-Subject: [PATCH 6/6] temp fix: disable part of some tests for Android
-
-Parts of sub tests will certainly fail Android and fixing them
-take significantly longer time.  Disabling them to allow rest
-parts to run and create less noise in test log so other issues
-can be uncovered
----
- test/depr/depr.c.headers/math_h.pass.cpp                            | 4 ++++
- test/depr/depr.c.headers/stdio_h.pass.cpp                           | 6 ++++++
- .../exception.unexpected/set.unexpected/get_unexpected.pass.cpp     | 4 ++++
- .../exception.unexpected/set.unexpected/set_unexpected.pass.cpp     | 4 ++++
- test/input.output/file.streams/c.files/cstdio.pass.cpp              | 6 ++++++
- .../file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp        | 4 ++++
- .../file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp       | 4 ++++
- test/input.output/iostream.format/ext.manip/get_money.pass.cpp      | 4 ++++
- test/input.output/iostream.format/ext.manip/get_time.pass.cpp       | 4 ++++
- test/input.output/iostream.format/ext.manip/put_money.pass.cpp      | 4 ++++
- test/numerics/c.math/cmath.pass.cpp                                 | 5 +++++
- 11 files changed, 49 insertions(+)
-
-diff --git a/test/depr/depr.c.headers/math_h.pass.cpp b/test/depr/depr.c.headers/math_h.pass.cpp
-index 9e93966..cd07710 100644
---- a/test/depr/depr.c.headers/math_h.pass.cpp
-+++ b/test/depr/depr.c.headers/math_h.pass.cpp
-@@ -229,7 +229,11 @@ void test_isinf()
- void test_isnan()
- {
-     static_assert((std::is_same<decltype(isnan((float)0)), bool>::value), "");
-+#if !defined(__ANDROID__)
-+ // bionic isnan(double) returns int.  Not sure how isnan(float) and isnan(long double) pass.
-+ // Mask this check to reveal/fix more seirous one: eg. lack of log2 and nettoward, etc
-     static_assert((std::is_same<decltype(isnan((double)0)), bool>::value), "");
-+#endif
-     static_assert((std::is_same<decltype(isnan((long double)0)), bool>::value), "");
-     assert(isnan(-1.0) == false);
- }
-diff --git a/test/depr/depr.c.headers/stdio_h.pass.cpp b/test/depr/depr.c.headers/stdio_h.pass.cpp
-index 8e236e3..058b300 100644
---- a/test/depr/depr.c.headers/stdio_h.pass.cpp
-+++ b/test/depr/depr.c.headers/stdio_h.pass.cpp
-@@ -130,7 +130,13 @@ int main()
-     static_assert((std::is_same<decltype(ftell(fp)), long>::value), "");
-     static_assert((std::is_same<decltype(rewind(fp)), void>::value), "");
-     static_assert((std::is_same<decltype(clearerr(fp)), void>::value), "");
-+#if !defined(feof)
-+    //check return type of feof only if it's not an macro which may be a compound expression
-     static_assert((std::is_same<decltype(feof(fp)), int>::value), "");
-+#endif
-+#if !defined(ferror)
-+    //check return type of ferror only if it's not an macro which may be a compound expression
-     static_assert((std::is_same<decltype(ferror(fp)), int>::value), "");
-+#endif
-     static_assert((std::is_same<decltype(perror("")), void>::value), "");
- }
-diff --git a/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp b/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
-index 8b0a0b9..c2d7d75 100644
---- a/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
-+++ b/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
-@@ -34,6 +34,10 @@ int main()
-     assert(std::get_unexpected() == f2);
-     // verify calling original unexpected handler calls terminate
-     std::set_terminate(f3);
-+#if !defined(__ANDROID__)
-+    // Disable the following for Android whoes __gabixx::__default_terminate()
-+    // causes segfault on purpose to get stack dump
-     (*old)();
-     assert(0);
-+#endif
- }
-diff --git a/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp b/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
-index ed02fa6..425b606 100644
---- a/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
-+++ b/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
-@@ -30,6 +30,10 @@ int main()
-     assert(std::set_unexpected(f2) == f1);
-     // verify calling original unexpected handler calls terminate
-     std::set_terminate(f3);
-+#if !defined(__ANDROID__)
-+    // Disable the following for Android whoes __gabixx::__default_terminate()
-+    // causes segfault on purpose to get stack dump
-     (*old)();
-     assert(0);
-+#endif
- }
-diff --git a/test/input.output/file.streams/c.files/cstdio.pass.cpp b/test/input.output/file.streams/c.files/cstdio.pass.cpp
-index 1a60dd6..e28d0cf 100644
---- a/test/input.output/file.streams/c.files/cstdio.pass.cpp
-+++ b/test/input.output/file.streams/c.files/cstdio.pass.cpp
-@@ -133,7 +133,13 @@ int main()
-     static_assert((std::is_same<decltype(std::ftell(fp)), long>::value), "");
-     static_assert((std::is_same<decltype(std::rewind(fp)), void>::value), "");
-     static_assert((std::is_same<decltype(std::clearerr(fp)), void>::value), "");
-+#if !defined(feof)
-+    //check return type of feof only if it's not an macro which may be a compound expression
-     static_assert((std::is_same<decltype(std::feof(fp)), int>::value), "");
-+#endif
-+#if !defined(ferror)
-+    //check return type of ferror only if it's not an macro which may be a compound expression
-     static_assert((std::is_same<decltype(std::ferror(fp)), int>::value), "");
-+#endif
-     static_assert((std::is_same<decltype(std::perror("")), void>::value), "");
- }
-diff --git a/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
-index 1da3856..f6dc14e 100644
---- a/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
-+++ b/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
-@@ -115,6 +115,9 @@ int main()
-         assert(f.sgetc() == L'a');
-     }
-     std::remove("overflow.dat");
-+#if !defined(__ANDROID__)
-+    // Remove tests setlocale() to other than "", "C", and "POSIX"
-+    // for Android
-     {
-         test_buf<wchar_t> f;
-         f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
-@@ -139,4 +142,5 @@ int main()
-         assert(f.sbumpc() == -1);
-     }
-     std::remove("overflow.dat");
-+#endif // __ANDROID__
- }
-diff --git a/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
-index e34bc84..a66d9d3 100644
---- a/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
-+++ b/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
-@@ -108,6 +108,9 @@ int main()
-         assert(*f.gptr() == L'9');
-         assert(f.egptr() - f.gptr() == 1);
-     }
-+#if !defined(__ANDROID__)
-+    // Remove tests setlocale() to other than "", "C", and "POSIX"
-+    // for Android
-     {
-         test_buf<wchar_t> f;
-         f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
-@@ -118,4 +121,5 @@ int main()
-         assert(f.sbumpc() == 0x4E53);
-         assert(f.sbumpc() == -1);
-     }
-+#endif // __ANDROID__
- }
-diff --git a/test/input.output/iostream.format/ext.manip/get_money.pass.cpp b/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
-index cdd762a..5b7c69d 100644
---- a/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
-+++ b/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
-@@ -38,6 +38,9 @@ public:
- 
- int main()
- {
-+#if !defined(__ANDROID__)
-+    // Remove tests setlocale() to other than "", "C", and "POSIX"
-+    // for Android
-     {
-         testbuf<char> sb("  -$1,234,567.89");
-         std::istream is(&sb);
-@@ -70,4 +73,5 @@ int main()
-         is >> std::get_money(x, true);
-         assert(x == -123456789);
-     }
-+#endif
- }
-diff --git a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
-index 6866552..7a11319 100644
---- a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
-+++ b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
-@@ -54,6 +54,9 @@ int main()
-         assert(is.eof());
-         assert(!is.fail());
-     }
-+#if !defined(__ANDROID__)
-+    // Remove tests setlocale() to other than "", "C", and "POSIX"
-+    // for Android
-     {
-         testbuf<wchar_t> sb(L"  Sat Dec 31 23:55:59 2061");
-         std::wistream is(&sb);
-@@ -70,4 +73,5 @@ int main()
-         assert(is.eof());
-         assert(!is.fail());
-     }
-+#endif
- }
-diff --git a/test/input.output/iostream.format/ext.manip/put_money.pass.cpp b/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
-index 8d15dd9..aca45cd 100644
---- a/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
-+++ b/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
-@@ -50,6 +50,9 @@ protected:
- 
- int main()
- {
-+#if !defined(__ANDROID__)
-+    // Remove tests setlocale() to other than "", "C", and "POSIX"
-+    // for Android
-     {
-         testbuf<char> sb;
-         std::ostream os(&sb);
-@@ -86,4 +89,5 @@ int main()
-         os << std::put_money(x, true);
-         assert(sb.str() == L"-USD 1,234,567.89");
-     }
-+#endif // __ANDROID__
- }
-diff --git a/test/numerics/c.math/cmath.pass.cpp b/test/numerics/c.math/cmath.pass.cpp
-index 5db9fd1..e2705f7 100644
---- a/test/numerics/c.math/cmath.pass.cpp
-+++ b/test/numerics/c.math/cmath.pass.cpp
-@@ -493,8 +493,13 @@ void test_isnan()
- #error isnan defined
- #endif
-     static_assert((std::is_same<decltype(std::isnan((float)0)), bool>::value), "");
-+#if !defined(__ANDROID__)
-+ // bionic isnan(double) returns int.  Not sure how isnan(float) and isnan(long double) pass.
-+ // Mask this check to reveal/fix more seirous one: eg. lack of log2 and nettoward, etc
-+
-     static_assert((std::is_same<decltype(std::isnan((double)0)), bool>::value), "");
-     static_assert((std::is_same<decltype(std::isnan(0)), bool>::value), "");
-+#endif
-     static_assert((std::is_same<decltype(std::isnan((long double)0)), bool>::value), "");
-     assert(std::isnan(-1.0) == false);
- }
--- 
-1.9.0.rc1.175.g0b1dcb5
-
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0007-Fix-libc-compiler-error-when-calling-std-feof.patch b/sources/cxx-stl/llvm-libc++/patches.android/0007-Fix-libc-compiler-error-when-calling-std-feof.patch
new file mode 100644
index 0000000..8da9199
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0007-Fix-libc-compiler-error-when-calling-std-feof.patch
@@ -0,0 +1,66 @@
+From 3754d92809b7067a98e38a19ea4e10b36ad52bc7 Mon Sep 17 00:00:00 2001
+From: Carl Norum <carl@norum.ca>
+Date: Sun, 27 Apr 2014 22:21:24 -0700
+Subject: [PATCH 07/12] Fix libc++ compiler error when calling std::feof()
+
+The following functions are "macro" in bionic's stdio.h and also
+defined in cstdio's std::  getchar, putchar, clearerr, feof, ferror
+
+Undef them and re-define as inlined functions otherwise use of
+std::feof, for example, break compilation.
+
+See b.android.com/66668 and b.android.com/36496
+---
+ include/cstdio | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/include/cstdio b/include/cstdio
+index ce3af4d..7787fad 100644
+--- a/include/cstdio
++++ b/include/cstdio
+@@ -114,12 +114,42 @@ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_getc(FILE* __stream) {return getc(
+ inline _LIBCPP_INLINE_VISIBILITY int getc(FILE* __stream) {return __libcpp_getc(__stream);}
+ #endif  // getc
+ 
++#ifdef getchar
++inline _LIBCPP_INLINE_VISIBILITY int __libcpp_getchar(void) {return getchar();}
++#undef getchar
++inline _LIBCPP_INLINE_VISIBILITY int getchar(void) {return __libcpp_getchar();}
++#endif  // getchar
++
+ #ifdef putc
+ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putc(int __c, FILE* __stream) {return putc(__c, __stream);}
+ #undef putc
+ inline _LIBCPP_INLINE_VISIBILITY int putc(int __c, FILE* __stream) {return __libcpp_putc(__c, __stream);}
+ #endif  // putc
+ 
++#ifdef putchar
++inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putchar(int __c) {return putchar(__c);}
++#undef putchar
++inline _LIBCPP_INLINE_VISIBILITY int putchar(int __c) {return __libcpp_putchar(__c);}
++#endif  // putchar
++
++#ifdef clearerr
++inline _LIBCPP_INLINE_VISIBILITY void __libcpp_clearerr(FILE* __stream) {return clearerr(__stream);}
++#undef clearerr
++inline _LIBCPP_INLINE_VISIBILITY void clearerr(FILE* __stream) {return __libcpp_clearerr(__stream);}
++#endif  // clearerr
++
++#ifdef feof
++inline _LIBCPP_INLINE_VISIBILITY int __libcpp_feof(FILE* __stream) {return feof(__stream);}
++#undef feof
++inline _LIBCPP_INLINE_VISIBILITY int feof(FILE* __stream) {return __libcpp_feof(__stream);}
++#endif  // feof
++
++#ifdef ferror
++inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ferror(FILE* __stream) {return ferror(__stream);}
++#undef ferror
++inline _LIBCPP_INLINE_VISIBILITY int ferror(FILE* __stream) {return __libcpp_ferror(__stream);}
++#endif  // ferror
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ using ::FILE;
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0008-Remove-gcc-warning-about-redefinition-of-putchar-wit.patch b/sources/cxx-stl/llvm-libc++/patches.android/0008-Remove-gcc-warning-about-redefinition-of-putchar-wit.patch
new file mode 100644
index 0000000..6d77a0b
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0008-Remove-gcc-warning-about-redefinition-of-putchar-wit.patch
@@ -0,0 +1,45 @@
+From 848c37e08f93ea14fbc430d5e85517da8a6589ac Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Sun, 27 Apr 2014 22:22:32 -0700
+Subject: [PATCH 08/12] Remove gcc warning about redefinition of putchar with
+ different visibility
+
+In NDK bionic's stdio.h, putchar appears as both a function prototype and a macro
+(later in the same header).  Because it's defined as a macro, libc++ replaces
+it with a function but with *different* visibility.  GCC 4.x complains [-Wattributes]
+
+   include/stdio.h:236:5: warning: conflicts with previous declaration here [-Wattributes]
+   int  putchar(int);
+
+Undefine putchar to avoid redefinition, and putchar does exist in libc.so
+---
+ include/cstdio | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/include/cstdio b/include/cstdio
+index 7787fad..8f2a7b0 100644
+--- a/include/cstdio
++++ b/include/cstdio
+@@ -126,6 +126,19 @@ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putc(int __c, FILE* __stream) {ret
+ inline _LIBCPP_INLINE_VISIBILITY int putc(int __c, FILE* __stream) {return __libcpp_putc(__c, __stream);}
+ #endif  // putc
+ 
++#ifdef __ANDROID__
++// In bionic's stdio.h, putchar appears as both a function prototype and a macro (later
++// in the same header).  Because it's defined as a macro, the following code snippet replaces
++// it with a function but with *different* visibility.  GCC 4.x complains [-Wattributes]
++//
++//   include/stdio.h:236:5: warning: conflicts with previous declaration here [-Wattributes]
++//     int  putchar(int);
++//
++// Undefine putchar to avoid redefinition, and putchar does exist in libc.so
++//
++#undef putchar
++#endif
++
+ #ifdef putchar
+ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putchar(int __c) {return putchar(__c);}
+ #undef putchar
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0009-Fix-locale-stuff-for-LP64.patch b/sources/cxx-stl/llvm-libc++/patches.android/0009-Fix-locale-stuff-for-LP64.patch
new file mode 100644
index 0000000..141efc8
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0009-Fix-locale-stuff-for-LP64.patch
@@ -0,0 +1,62 @@
+From cee395a0340092c61a4024a2021842e9d43bc544 Mon Sep 17 00:00:00 2001
+From: Pavel Chupin <pavel.v.chupin@intel.com>
+Date: Sun, 27 Apr 2014 22:23:39 -0700
+Subject: [PATCH 09/12] Fix locale stuff for LP64
+
+---
+ include/__locale                       | 13 +++++++++++++
+ src/support/android/locale_android.cpp | 14 ++++++++++++++
+ 2 files changed, 27 insertions(+)
+
+diff --git a/include/__locale b/include/__locale
+index c793cfe..d078810 100644
+--- a/include/__locale
++++ b/include/__locale
+@@ -376,6 +376,19 @@ public:
+     static const mask xdigit = _ISXDIGIT;
+     static const mask blank  = _ISBLANK;
+ #elif defined(__ANDROID__)
++# if !defined(_U)
++#   if !defined(_CTYPE_U)
++#    error Bionic header ctype.h does not define either _U nor _CTYPE_U
++#   endif
++#   define _U _CTYPE_U
++#   define _L _CTYPE_L
++#   define _N _CTYPE_N
++#   define _S _CTYPE_S
++#   define _P _CTYPE_P
++#   define _C _CTYPE_C
++#   define _X _CTYPE_X
++#   define _B _CTYPE_B
++# endif
+     typedef unsigned short mask;
+     static const mask space  = _S;
+     static const mask print  = _P | _U | _L | _N | _B;
+diff --git a/src/support/android/locale_android.cpp b/src/support/android/locale_android.cpp
+index 7193028..9716458 100644
+--- a/src/support/android/locale_android.cpp
++++ b/src/support/android/locale_android.cpp
+@@ -43,6 +43,20 @@
+ //
+ extern "C" const unsigned short* const _ctype_android;
+ 
++#if !defined(_U)
++#  if !defined(_CTYPE_U)
++#   error Bionic header ctype.h does not define either _U nor _CTYPE_U
++#  endif
++#  define _U _CTYPE_U
++#  define _L _CTYPE_L
++#  define _N _CTYPE_N
++#  define _S _CTYPE_S
++#  define _P _CTYPE_P
++#  define _C _CTYPE_C
++#  define _X _CTYPE_X
++#  define _B _CTYPE_B
++#endif
++
+ static const unsigned short ctype_android_tab[256+128] = {
+        /* -128..-1 */
+         _C,     _C,           _C,     _C,     _C,     _C,     _C,     _C, /* 80 */
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0010-Add-enough-symlink-to-rename-file-path-with-replace-.patch b/sources/cxx-stl/llvm-libc++/patches.android/0010-Add-enough-symlink-to-rename-file-path-with-replace-.patch
new file mode 100644
index 0000000..baed0e3
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0010-Add-enough-symlink-to-rename-file-path-with-replace-.patch
@@ -0,0 +1,293 @@
+From febadb8541ea84d2d054a04733ec20b48619ccb4 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Sun, 27 Apr 2014 22:28:18 -0700
+Subject: [PATCH 10/12] Add enough symlink to rename file/path with '='
+ (replace it with 'EQ')
+
+ndk-build dislikes file path with '='
+---
+ .../insert.iterators/back.insert.iter.ops/back.insert.iter.opEQ          | 1 +
+ .../insert.iterators/front.insert.iter.ops/front.insert.iter.opEQ        | 1 +
+ .../predef.iterators/insert.iterators/insert.iter.ops/insert.iter.opEQ   | 1 +
+ .../predef.iterators/move.iterators/move.iter.ops/move.iter.op.+EQ       | 1 +
+ .../predef.iterators/move.iterators/move.iter.ops/move.iter.op.-EQ       | 1 +
+ .../predef.iterators/move.iterators/move.iter.ops/move.iter.opEQ         | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.op!EQ                | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.op+EQ                | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.op-EQ                | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.opEQ                 | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.opEQEQ               | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.opgtEQ               | 1 +
+ .../reverse.iterators/reverse.iter.ops/reverse.iter.opltEQ               | 1 +
+ .../stream.iterators/istreambuf.iterator/istreambuf.iterator_op!EQ       | 1 +
+ .../stream.iterators/istreambuf.iterator/istreambuf.iterator_opEQEQ      | 1 +
+ test/strings/basic.string/string.nonmembers/string_op!EQ                 | 1 +
+ test/strings/basic.string/string.nonmembers/string_operatorEQEQ          | 1 +
+ test/strings/basic.string/string.nonmembers/string_opgtEQ                | 1 +
+ test/strings/basic.string/string.nonmembers/string_opltEQ                | 1 +
+ .../func.wrap.func/func.wrap.func.nullptr/operator_EQEQ.pass.cpp         | 1 +
+ .../time/time.duration/time.duration.arithmetic/op_+EQ.pass.cpp          | 1 +
+ .../time/time.duration/time.duration.arithmetic/op_-EQ.pass.cpp          | 1 +
+ .../time/time.duration/time.duration.arithmetic/op_divideEQ.pass.cpp     | 1 +
+ .../time.duration/time.duration.arithmetic/op_modEQduration.pass.cpp     | 1 +
+ .../time/time.duration/time.duration.arithmetic/op_modEQrep.pass.cpp     | 1 +
+ .../time/time.duration/time.duration.arithmetic/op_timesEQ.pass.cpp      | 1 +
+ test/utilities/time/time.point/time.point.arithmetic/op_+EQ.pass.cpp     | 1 +
+ test/utilities/time/time.point/time.point.arithmetic/op_-EQ.pass.cpp     | 1 +
+ 28 files changed, 28 insertions(+)
+ create mode 120000 test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.opEQ
+ create mode 120000 test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.opEQ
+ create mode 120000 test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.opEQ
+ create mode 120000 test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+EQ
+ create mode 120000 test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-EQ
+ create mode 120000 test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.opEQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!EQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+EQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-EQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQEQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgtEQ
+ create mode 120000 test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opltEQ
+ create mode 120000 test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!EQ
+ create mode 120000 test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_opEQEQ
+ create mode 120000 test/strings/basic.string/string.nonmembers/string_op!EQ
+ create mode 120000 test/strings/basic.string/string.nonmembers/string_operatorEQEQ
+ create mode 120000 test/strings/basic.string/string.nonmembers/string_opgtEQ
+ create mode 120000 test/strings/basic.string/string.nonmembers/string_opltEQ
+ create mode 120000 test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_EQEQ.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_+EQ.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_-EQ.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_divideEQ.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_modEQduration.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_modEQrep.pass.cpp
+ create mode 120000 test/utilities/time/time.duration/time.duration.arithmetic/op_timesEQ.pass.cpp
+ create mode 120000 test/utilities/time/time.point/time.point.arithmetic/op_+EQ.pass.cpp
+ create mode 120000 test/utilities/time/time.point/time.point.arithmetic/op_-EQ.pass.cpp
+
+diff --git a/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.opEQ b/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.opEQ
+new file mode 120000
+index 0000000..98ce721
+--- /dev/null
++++ b/test/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.opEQ
+@@ -0,0 +1 @@
++back.insert.iter.op=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.opEQ b/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.opEQ
+new file mode 120000
+index 0000000..03b53c7
+--- /dev/null
++++ b/test/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.opEQ
+@@ -0,0 +1 @@
++front.insert.iter.op=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.opEQ b/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.opEQ
+new file mode 120000
+index 0000000..40c327e
+--- /dev/null
++++ b/test/iterators/predef.iterators/insert.iterators/insert.iter.ops/insert.iter.opEQ
+@@ -0,0 +1 @@
++insert.iter.op=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+EQ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+EQ
+new file mode 120000
+index 0000000..1dfb35c
+--- /dev/null
++++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.+EQ
+@@ -0,0 +1 @@
++move.iter.op.+=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-EQ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-EQ
+new file mode 120000
+index 0000000..92e9198
+--- /dev/null
++++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.-EQ
+@@ -0,0 +1 @@
++move.iter.op.-=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.opEQ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.opEQ
+new file mode 120000
+index 0000000..0781f06
+--- /dev/null
++++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.opEQ
+@@ -0,0 +1 @@
++move.iter.op=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!EQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!EQ
+new file mode 120000
+index 0000000..2f7a580
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!EQ
+@@ -0,0 +1 @@
++reverse.iter.op!=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+EQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+EQ
+new file mode 120000
+index 0000000..711980c
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+EQ
+@@ -0,0 +1 @@
++reverse.iter.op+=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-EQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-EQ
+new file mode 120000
+index 0000000..18ebdc9
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-EQ
+@@ -0,0 +1 @@
++reverse.iter.op-=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQ
+new file mode 120000
+index 0000000..0ecaeb2
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQ
+@@ -0,0 +1 @@
++reverse.iter.op=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQEQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQEQ
+new file mode 120000
+index 0000000..db5b027
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opEQEQ
+@@ -0,0 +1 @@
++reverse.iter.op==
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgtEQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgtEQ
+new file mode 120000
+index 0000000..3692943
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgtEQ
+@@ -0,0 +1 @@
++reverse.iter.opgt=
+\ No newline at end of file
+diff --git a/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opltEQ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opltEQ
+new file mode 120000
+index 0000000..3d11e24
+--- /dev/null
++++ b/test/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opltEQ
+@@ -0,0 +1 @@
++reverse.iter.oplt=
+\ No newline at end of file
+diff --git a/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!EQ b/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!EQ
+new file mode 120000
+index 0000000..44f46b8
+--- /dev/null
++++ b/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_op!EQ
+@@ -0,0 +1 @@
++istreambuf.iterator_op!=
+\ No newline at end of file
+diff --git a/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_opEQEQ b/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_opEQEQ
+new file mode 120000
+index 0000000..98e7342
+--- /dev/null
++++ b/test/iterators/stream.iterators/istreambuf.iterator/istreambuf.iterator_opEQEQ
+@@ -0,0 +1 @@
++istreambuf.iterator_op==
+\ No newline at end of file
+diff --git a/test/strings/basic.string/string.nonmembers/string_op!EQ b/test/strings/basic.string/string.nonmembers/string_op!EQ
+new file mode 120000
+index 0000000..01bb35a
+--- /dev/null
++++ b/test/strings/basic.string/string.nonmembers/string_op!EQ
+@@ -0,0 +1 @@
++string_op!=
+\ No newline at end of file
+diff --git a/test/strings/basic.string/string.nonmembers/string_operatorEQEQ b/test/strings/basic.string/string.nonmembers/string_operatorEQEQ
+new file mode 120000
+index 0000000..4d58d63
+--- /dev/null
++++ b/test/strings/basic.string/string.nonmembers/string_operatorEQEQ
+@@ -0,0 +1 @@
++string_operator==
+\ No newline at end of file
+diff --git a/test/strings/basic.string/string.nonmembers/string_opgtEQ b/test/strings/basic.string/string.nonmembers/string_opgtEQ
+new file mode 120000
+index 0000000..f7145c1
+--- /dev/null
++++ b/test/strings/basic.string/string.nonmembers/string_opgtEQ
+@@ -0,0 +1 @@
++string_opgt=
+\ No newline at end of file
+diff --git a/test/strings/basic.string/string.nonmembers/string_opltEQ b/test/strings/basic.string/string.nonmembers/string_opltEQ
+new file mode 120000
+index 0000000..5d0419e
+--- /dev/null
++++ b/test/strings/basic.string/string.nonmembers/string_opltEQ
+@@ -0,0 +1 @@
++string_oplt=
+\ No newline at end of file
+diff --git a/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_EQEQ.pass.cpp b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_EQEQ.pass.cpp
+new file mode 120000
+index 0000000..1d7eafb
+--- /dev/null
++++ b/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_EQEQ.pass.cpp
+@@ -0,0 +1 @@
++operator_==.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_+EQ.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_+EQ.pass.cpp
+new file mode 120000
+index 0000000..bdc2b67
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_+EQ.pass.cpp
+@@ -0,0 +1 @@
++op_+=.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_-EQ.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_-EQ.pass.cpp
+new file mode 120000
+index 0000000..805c6d3
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_-EQ.pass.cpp
+@@ -0,0 +1 @@
++op_-=.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_divideEQ.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_divideEQ.pass.cpp
+new file mode 120000
+index 0000000..c11a105
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_divideEQ.pass.cpp
+@@ -0,0 +1 @@
++op_divide=.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQduration.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQduration.pass.cpp
+new file mode 120000
+index 0000000..479f97c
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQduration.pass.cpp
+@@ -0,0 +1 @@
++op_mod=duration.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQrep.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQrep.pass.cpp
+new file mode 120000
+index 0000000..f0a32e7
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_modEQrep.pass.cpp
+@@ -0,0 +1 @@
++op_mod=rep.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.duration/time.duration.arithmetic/op_timesEQ.pass.cpp b/test/utilities/time/time.duration/time.duration.arithmetic/op_timesEQ.pass.cpp
+new file mode 120000
+index 0000000..a4a9beb
+--- /dev/null
++++ b/test/utilities/time/time.duration/time.duration.arithmetic/op_timesEQ.pass.cpp
+@@ -0,0 +1 @@
++op_times=.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.point/time.point.arithmetic/op_+EQ.pass.cpp b/test/utilities/time/time.point/time.point.arithmetic/op_+EQ.pass.cpp
+new file mode 120000
+index 0000000..bdc2b67
+--- /dev/null
++++ b/test/utilities/time/time.point/time.point.arithmetic/op_+EQ.pass.cpp
+@@ -0,0 +1 @@
++op_+=.pass.cpp
+\ No newline at end of file
+diff --git a/test/utilities/time/time.point/time.point.arithmetic/op_-EQ.pass.cpp b/test/utilities/time/time.point/time.point.arithmetic/op_-EQ.pass.cpp
+new file mode 120000
+index 0000000..805c6d3
+--- /dev/null
++++ b/test/utilities/time/time.point/time.point.arithmetic/op_-EQ.pass.cpp
+@@ -0,0 +1 @@
++op_-=.pass.cpp
+\ No newline at end of file
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0011-Fix-tests-for-Android.patch b/sources/cxx-stl/llvm-libc++/patches.android/0011-Fix-tests-for-Android.patch
new file mode 100644
index 0000000..c0cbda3
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0011-Fix-tests-for-Android.patch
@@ -0,0 +1,393 @@
+From 71979479fd219fefa56ac8d260d756e6f9af915f Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Sun, 27 Apr 2014 22:29:20 -0700
+Subject: [PATCH 11/12] Fix tests for Android
+
+---
+ test/containers/Emplaceable.h                                     | 7 +++++++
+ test/containers/MoveOnly.h                                        | 7 +++++++
+ test/depr/depr.c.headers/float_h.pass.cpp                         | 8 ++++++++
+ test/depr/depr.c.headers/math_h.pass.cpp                          | 7 +++++++
+ test/depr/depr.c.headers/stdbool_h.pass.cpp                       | 6 ++++++
+ test/depr/depr.c.headers/stdio_h.pass.cpp                         | 6 ++++++
+ .../exception.unexpected/set.unexpected/get_unexpected.pass.cpp   | 4 ++++
+ .../exception.unexpected/set.unexpected/set_unexpected.pass.cpp   | 4 ++++
+ test/input.output/file.streams/c.files/cstdio.pass.cpp            | 6 ++++++
+ .../file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp      | 4 ++++
+ .../file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp     | 4 ++++
+ test/input.output/iostream.format/ext.manip/get_money.pass.cpp    | 4 ++++
+ test/input.output/iostream.format/ext.manip/get_time.pass.cpp     | 4 ++++
+ test/input.output/iostream.format/ext.manip/put_money.pass.cpp    | 4 ++++
+ .../ostream.inserters.arithmetic/pointer.pass.cpp                 | 4 ++++
+ test/language.support/support.start.term/quick_exit.pass.cpp      | 2 ++
+ test/numerics/c.math/cmath.pass.cpp                               | 8 ++++++++
+ .../thread.once/thread.once.callonce/call_once.pass.cpp           | 8 ++++++++
+ 18 files changed, 97 insertions(+)
+
+diff --git a/test/containers/Emplaceable.h b/test/containers/Emplaceable.h
+index 34dd326..b5e7971 100644
+--- a/test/containers/Emplaceable.h
++++ b/test/containers/Emplaceable.h
+@@ -14,7 +14,14 @@
+ 
+ class Emplaceable
+ {
++#if !defined(__clang__)
++// GCC 4.8 when compile ccontainers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp, etc,
++// complains about the following being private
++public:
++    Emplaceable(const Emplaceable&) {}
++#else
+     Emplaceable(const Emplaceable&);
++#endif
+     Emplaceable& operator=(const Emplaceable&);
+ 
+     int int_;
+diff --git a/test/containers/MoveOnly.h b/test/containers/MoveOnly.h
+index e4d9f64..cf988cf 100644
+--- a/test/containers/MoveOnly.h
++++ b/test/containers/MoveOnly.h
+@@ -17,7 +17,14 @@
+ 
+ class MoveOnly
+ {
++#if !defined(__clang__)
++// GCC 4.8 when compile containers/associative/map/map.cons/move_alloc.pass.cpp, etc,
++// complains about the following being private
++public:
++    MoveOnly(const MoveOnly&) {}
++#else
+     MoveOnly(const MoveOnly&);
++#endif
+     MoveOnly& operator=(const MoveOnly&);
+ 
+     int data_;
+diff --git a/test/depr/depr.c.headers/float_h.pass.cpp b/test/depr/depr.c.headers/float_h.pass.cpp
+index 5b2e451..8df0937 100644
+--- a/test/depr/depr.c.headers/float_h.pass.cpp
++++ b/test/depr/depr.c.headers/float_h.pass.cpp
+@@ -16,8 +16,12 @@
+ #endif
+ 
+ #ifndef FLT_EVAL_METHOD
++#if !defined(__clang__) && !defined(__FLT_EVAL_METHOD__)
++// GCC defines __FLT_EVAL_METHOD__ in lib/gcc/arm-linux-androideabi/4.8/include/float.h.
++// In libc++ include/cfloat define FLT_EVAL_METHOD to __FLT_EVAL_METHOD__
+ #error FLT_EVAL_METHOD not defined
+ #endif
++#endif
+ 
+ #ifndef FLT_RADIX
+ #error FLT_RADIX not defined
+@@ -36,8 +40,12 @@
+ #endif
+ 
+ #ifndef DECIMAL_DIG
++#if !defined(__clang__) && !defined(__DECIMAL_DIG__)
++// GCC defines __DECIMAL_DIG__ in lib/gcc/arm-linux-androideabi/4.8/include/float.h.
++// In libc++ include/cfloat define DECIMAL_DIG to __DECIMAL_DIG__
+ #error DECIMAL_DIG not defined
+ #endif
++#endif
+ 
+ #ifndef FLT_DIG
+ #error FLT_DIG not defined
+diff --git a/test/depr/depr.c.headers/math_h.pass.cpp b/test/depr/depr.c.headers/math_h.pass.cpp
+index 858e190..f26f10d 100644
+--- a/test/depr/depr.c.headers/math_h.pass.cpp
++++ b/test/depr/depr.c.headers/math_h.pass.cpp
+@@ -221,7 +221,10 @@ void test_isfinite()
+ void test_isinf()
+ {
+     static_assert((std::is_same<decltype(isinf((float)0)), bool>::value), "");
++#if !(defined(__ANDROID__) && (__LP64__ || __ANDROID_API__ >= 20))
++ // 64-bit bionic isinf(double) returns int.  
+     static_assert((std::is_same<decltype(isinf((double)0)), bool>::value), "");
++#endif
+     static_assert((std::is_same<decltype(isinf((long double)0)), bool>::value), "");
+     assert(isinf(-1.0) == false);
+ }
+@@ -229,7 +232,11 @@ void test_isinf()
+ void test_isnan()
+ {
+     static_assert((std::is_same<decltype(isnan((float)0)), bool>::value), "");
++#if !defined(__ANDROID__)
++ // bionic isnan(double) returns int.  Not sure how isnan(float) and isnan(long double) pass.
++ // Mask this check to reveal/fix more seirous one: eg. lack of log2 and nettoward, etc
+     static_assert((std::is_same<decltype(isnan((double)0)), bool>::value), "");
++#endif
+     static_assert((std::is_same<decltype(isnan((long double)0)), bool>::value), "");
+     assert(isnan(-1.0) == false);
+ }
+diff --git a/test/depr/depr.c.headers/stdbool_h.pass.cpp b/test/depr/depr.c.headers/stdbool_h.pass.cpp
+index cd4d4c4..41aa3e3 100644
+--- a/test/depr/depr.c.headers/stdbool_h.pass.cpp
++++ b/test/depr/depr.c.headers/stdbool_h.pass.cpp
+@@ -15,6 +15,10 @@
+ #error __bool_true_false_are_defined not defined
+ #endif
+ 
++#if !defined(__clang__)
++// GCC defines bool, true, and false in lib/gcc/arm-linux-androideabi/4.8/include/stdbool.h
++#else
++
+ #ifdef bool
+ #error bool should not be defined
+ #endif
+@@ -27,6 +31,8 @@
+ #error false should not be defined
+ #endif
+ 
++#endif
++
+ int main()
+ {
+ }
+diff --git a/test/depr/depr.c.headers/stdio_h.pass.cpp b/test/depr/depr.c.headers/stdio_h.pass.cpp
+index 8e236e3..058b300 100644
+--- a/test/depr/depr.c.headers/stdio_h.pass.cpp
++++ b/test/depr/depr.c.headers/stdio_h.pass.cpp
+@@ -130,7 +130,13 @@ int main()
+     static_assert((std::is_same<decltype(ftell(fp)), long>::value), "");
+     static_assert((std::is_same<decltype(rewind(fp)), void>::value), "");
+     static_assert((std::is_same<decltype(clearerr(fp)), void>::value), "");
++#if !defined(feof)
++    //check return type of feof only if it's not an macro which may be a compound expression
+     static_assert((std::is_same<decltype(feof(fp)), int>::value), "");
++#endif
++#if !defined(ferror)
++    //check return type of ferror only if it's not an macro which may be a compound expression
+     static_assert((std::is_same<decltype(ferror(fp)), int>::value), "");
++#endif
+     static_assert((std::is_same<decltype(perror("")), void>::value), "");
+ }
+diff --git a/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp b/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
+index 8b0a0b9..c2d7d75 100644
+--- a/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
++++ b/test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp
+@@ -34,6 +34,10 @@ int main()
+     assert(std::get_unexpected() == f2);
+     // verify calling original unexpected handler calls terminate
+     std::set_terminate(f3);
++#if !defined(__ANDROID__)
++    // Disable the following for Android whoes __gabixx::__default_terminate()
++    // causes segfault on purpose to get stack dump
+     (*old)();
+     assert(0);
++#endif
+ }
+diff --git a/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp b/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
+index ed02fa6..425b606 100644
+--- a/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
++++ b/test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
+@@ -30,6 +30,10 @@ int main()
+     assert(std::set_unexpected(f2) == f1);
+     // verify calling original unexpected handler calls terminate
+     std::set_terminate(f3);
++#if !defined(__ANDROID__)
++    // Disable the following for Android whoes __gabixx::__default_terminate()
++    // causes segfault on purpose to get stack dump
+     (*old)();
+     assert(0);
++#endif
+ }
+diff --git a/test/input.output/file.streams/c.files/cstdio.pass.cpp b/test/input.output/file.streams/c.files/cstdio.pass.cpp
+index 1a60dd6..e28d0cf 100644
+--- a/test/input.output/file.streams/c.files/cstdio.pass.cpp
++++ b/test/input.output/file.streams/c.files/cstdio.pass.cpp
+@@ -133,7 +133,13 @@ int main()
+     static_assert((std::is_same<decltype(std::ftell(fp)), long>::value), "");
+     static_assert((std::is_same<decltype(std::rewind(fp)), void>::value), "");
+     static_assert((std::is_same<decltype(std::clearerr(fp)), void>::value), "");
++#if !defined(feof)
++    //check return type of feof only if it's not an macro which may be a compound expression
+     static_assert((std::is_same<decltype(std::feof(fp)), int>::value), "");
++#endif
++#if !defined(ferror)
++    //check return type of ferror only if it's not an macro which may be a compound expression
+     static_assert((std::is_same<decltype(std::ferror(fp)), int>::value), "");
++#endif
+     static_assert((std::is_same<decltype(std::perror("")), void>::value), "");
+ }
+diff --git a/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
+index 1da3856..f6dc14e 100644
+--- a/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
++++ b/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
+@@ -115,6 +115,9 @@ int main()
+         assert(f.sgetc() == L'a');
+     }
+     std::remove("overflow.dat");
++#if !defined(__ANDROID__)
++    // Remove tests setlocale() to other than "", "C", and "POSIX"
++    // for Android
+     {
+         test_buf<wchar_t> f;
+         f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
+@@ -139,4 +142,5 @@ int main()
+         assert(f.sbumpc() == -1);
+     }
+     std::remove("overflow.dat");
++#endif // __ANDROID__
+ }
+diff --git a/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp b/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
+index e34bc84..a66d9d3 100644
+--- a/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
++++ b/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
+@@ -108,6 +108,9 @@ int main()
+         assert(*f.gptr() == L'9');
+         assert(f.egptr() - f.gptr() == 1);
+     }
++#if !defined(__ANDROID__)
++    // Remove tests setlocale() to other than "", "C", and "POSIX"
++    // for Android
+     {
+         test_buf<wchar_t> f;
+         f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
+@@ -118,4 +121,5 @@ int main()
+         assert(f.sbumpc() == 0x4E53);
+         assert(f.sbumpc() == -1);
+     }
++#endif // __ANDROID__
+ }
+diff --git a/test/input.output/iostream.format/ext.manip/get_money.pass.cpp b/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
+index cdd762a..5b7c69d 100644
+--- a/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
++++ b/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
+@@ -38,6 +38,9 @@ public:
+ 
+ int main()
+ {
++#if !defined(__ANDROID__)
++    // Remove tests setlocale() to other than "", "C", and "POSIX"
++    // for Android
+     {
+         testbuf<char> sb("  -$1,234,567.89");
+         std::istream is(&sb);
+@@ -70,4 +73,5 @@ int main()
+         is >> std::get_money(x, true);
+         assert(x == -123456789);
+     }
++#endif
+ }
+diff --git a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
+index 6866552..7a11319 100644
+--- a/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
++++ b/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
+@@ -54,6 +54,9 @@ int main()
+         assert(is.eof());
+         assert(!is.fail());
+     }
++#if !defined(__ANDROID__)
++    // Remove tests setlocale() to other than "", "C", and "POSIX"
++    // for Android
+     {
+         testbuf<wchar_t> sb(L"  Sat Dec 31 23:55:59 2061");
+         std::wistream is(&sb);
+@@ -70,4 +73,5 @@ int main()
+         assert(is.eof());
+         assert(!is.fail());
+     }
++#endif
+ }
+diff --git a/test/input.output/iostream.format/ext.manip/put_money.pass.cpp b/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
+index 8d15dd9..aca45cd 100644
+--- a/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
++++ b/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
+@@ -50,6 +50,9 @@ protected:
+ 
+ int main()
+ {
++#if !defined(__ANDROID__)
++    // Remove tests setlocale() to other than "", "C", and "POSIX"
++    // for Android
+     {
+         testbuf<char> sb;
+         std::ostream os(&sb);
+@@ -86,4 +89,5 @@ int main()
+         os << std::put_money(x, true);
+         assert(sb.str() == L"-USD 1,234,567.89");
+     }
++#endif // __ANDROID__
+ }
+diff --git a/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp b/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp
+index 114bba9..d9b23b9 100644
+--- a/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp
++++ b/test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp
+@@ -69,8 +69,12 @@ int main()
+         // any leading 0x like prefix.
+         // In that format, we assume a null pointer will yield 2 '0' hex digits
+         // for each 8 bits of address space.
++#if !defined(__ANDROID__)
+         assert(sb.str() == "0x0" || sb.str() == "(nil)" ||
+                                   sb.str() == std::string(sizeof(void*)*2,'0'));
++#else
++        assert(sb.str() == "0");
++#endif
+     }
+     {
+         testbuf<char> sb;
+diff --git a/test/language.support/support.start.term/quick_exit.pass.cpp b/test/language.support/support.start.term/quick_exit.pass.cpp
+index 1945a1b..f001812 100644
+--- a/test/language.support/support.start.term/quick_exit.pass.cpp
++++ b/test/language.support/support.start.term/quick_exit.pass.cpp
+@@ -18,6 +18,8 @@ void f() {}
+ 
+ int main()
+ {
++#ifdef _LIBCPP_HAS_QUICK_EXIT
+     std::at_quick_exit(f);
+     quick_exit(0);
++#endif
+ }
+diff --git a/test/numerics/c.math/cmath.pass.cpp b/test/numerics/c.math/cmath.pass.cpp
+index 7c74d5b..b526cac 100644
+--- a/test/numerics/c.math/cmath.pass.cpp
++++ b/test/numerics/c.math/cmath.pass.cpp
+@@ -481,7 +481,10 @@ void test_isinf()
+ #error isinf defined
+ #endif
+     static_assert((std::is_same<decltype(std::isinf((float)0)), bool>::value), "");
++#if !(defined(__ANDROID__) && (__LP64__ || __ANDROID_API__ >= 20))
++ // bionic isnan(double) returns int.
+     static_assert((std::is_same<decltype(std::isinf((double)0)), bool>::value), "");
++#endif
+     static_assert((std::is_same<decltype(std::isinf(0)), bool>::value), "");
+     static_assert((std::is_same<decltype(std::isinf((long double)0)), bool>::value), "");
+     assert(std::isinf(-1.0) == false);
+@@ -493,8 +496,13 @@ void test_isnan()
+ #error isnan defined
+ #endif
+     static_assert((std::is_same<decltype(std::isnan((float)0)), bool>::value), "");
++#if !defined(__ANDROID__)
++ // bionic isnan(double) returns int.  Not sure how isnan(float) and isnan(long double) pass.
++ // Mask this check to reveal/fix more seirous one: eg. lack of log2 and nettoward, etc
++
+     static_assert((std::is_same<decltype(std::isnan((double)0)), bool>::value), "");
+     static_assert((std::is_same<decltype(std::isnan(0)), bool>::value), "");
++#endif
+     static_assert((std::is_same<decltype(std::isnan((long double)0)), bool>::value), "");
+     assert(std::isnan(-1.0) == false);
+ }
+diff --git a/test/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/test/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
+index b4f76b4..a60e17f 100644
+--- a/test/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
++++ b/test/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
+@@ -133,7 +133,15 @@ void f42()
+ 
+ class MoveOnly
+ {
++#if !defined(__clang__)
++   // GCC 4.8 complains about the following being private
++public:
++    MoveOnly(const MoveOnly&)
++    {
++    }
++#else
+     MoveOnly(const MoveOnly&);
++#endif
+ public:
+     MoveOnly() {}
+     MoveOnly(MoveOnly&&) {}
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0012-Relax-some-__always_inline__-for-GCC-4.9.patch b/sources/cxx-stl/llvm-libc++/patches.android/0012-Relax-some-__always_inline__-for-GCC-4.9.patch
new file mode 100644
index 0000000..c9ddce0
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0012-Relax-some-__always_inline__-for-GCC-4.9.patch
@@ -0,0 +1,153 @@
+From eef1d2c332be60e4455cbb6e7710ee3c0f8d6f31 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Mon, 2 Jun 2014 18:01:55 +0800
+Subject: [PATCH 12/12] Relax some __always_inline__ for GCC 4.9
+
+To workaround GCC 4.9 which fails to __always_inline__ some functions
+---
+ include/__config | 12 +++++++++++-
+ include/locale   |  2 +-
+ include/string   | 20 ++++++++++----------
+ 3 files changed, 22 insertions(+), 12 deletions(-)
+
+diff --git a/include/__config b/include/__config
+index df84ac6..0f443a9 100644
+--- a/include/__config
++++ b/include/__config
+@@ -191,6 +191,7 @@
+ 
+ #ifndef _LIBCPP_INLINE_VISIBILITY
+ #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
++#define _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 _LIBCPP_INLINE_VISIBILITY
+ #endif
+ 
+ #ifndef _LIBCPP_EXCEPTION_ABI
+@@ -199,6 +200,7 @@
+ 
+ #ifndef _LIBCPP_ALWAYS_INLINE
+ #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__visibility__("hidden"), __always_inline__))
++#define _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49 _LIBCPP_ALWAYS_INLINE
+ #endif
+ 
+ #if defined(__clang__)
+@@ -358,6 +360,14 @@ namespace std {
+ 
+ #elif defined(__GNUC__)
+ 
++// FixME: GCC4.9 fails some always_inline cases
++# if (_GNUC_VER == 409)
++#undef _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49
++#define _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49 inline
++#undef _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
++#define _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
++#endif
++
+ #define _ALIGNAS(x) __attribute__((__aligned__(x)))
+ #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
+ 
+@@ -454,7 +464,7 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
+ #define __gxx__cxx_lambdas                        !defined(_LIBCPP_HAS_NO_LAMBDAS)
+ #define __gxx__cxx_noexcept                       0  // Not sure, doesn't matter.
+ #define __gxx__cxx_nullptr                        !defined(_LIBCPP_HAS_NO_NULLPTR)
+-#define __gxx__cxx_reference_qualified_functions  (_GNUC_VER >= 408)  // Not if 4.7 work. 4.6 certainly not.  Also see usage in libcxx/include/type_traits
++#define __gxx__cxx_reference_qualified_functions  (_GNUC_VER >= 408)  // Since 4.8.1
+ #ifdef _LIBCPP_NO_RTTI
+ #define __gxx__cxx_rtti                           0
+ #else
+diff --git a/include/locale b/include/locale
+index 7191290..60c6182 100644
+--- a/include/locale
++++ b/include/locale
+@@ -2799,7 +2799,7 @@ public:
+     explicit moneypunct_byname(const char* __nm, size_t __refs = 0)
+         : moneypunct<_CharT, _International>(__refs) {init(__nm);}
+ 
+-    _LIBCPP_ALWAYS_INLINE
++    _LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49
+     explicit moneypunct_byname(const string& __nm, size_t __refs = 0)
+         : moneypunct<_CharT, _International>(__refs) {init(__nm.c_str());}
+ 
+diff --git a/include/string b/include/string
+index bb8f111..ba83e22 100644
+--- a/include/string
++++ b/include/string
+@@ -1368,26 +1368,26 @@ private:
+ public:
+     static const size_type npos = -1;
+ 
+-    _LIBCPP_INLINE_VISIBILITY basic_string()
++    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 basic_string()
+         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
+-    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a);
++    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 explicit basic_string(const allocator_type& __a);
+     basic_string(const basic_string& __str);
+     basic_string(const basic_string& __str, const allocator_type& __a);
+ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+-    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+     basic_string(basic_string&& __str)
+         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+     _LIBCPP_INLINE_VISIBILITY
+     basic_string(basic_string&& __str, const allocator_type& __a);
+ #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+-    _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
++    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49 basic_string(const value_type* __s);
+     _LIBCPP_INLINE_VISIBILITY
+     basic_string(const value_type* __s, const allocator_type& __a);
+     _LIBCPP_INLINE_VISIBILITY
+     basic_string(const value_type* __s, size_type __n);
+     _LIBCPP_INLINE_VISIBILITY
+     basic_string(const value_type* __s, size_type __n, const allocator_type& __a);
+-    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+     basic_string(size_type __n, value_type __c);
+     _LIBCPP_INLINE_VISIBILITY
+     basic_string(size_type __n, value_type __c, const allocator_type& __a);
+@@ -1972,7 +1972,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type
+ }
+ 
+ template <class _CharT, class _Traits, class _Allocator>
+-inline _LIBCPP_INLINE_VISIBILITY
++inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+ basic_string<_CharT, _Traits, _Allocator>::basic_string()
+     _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
+ {
+@@ -1983,7 +1983,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string()
+ }
+ 
+ template <class _CharT, class _Traits, class _Allocator>
+-inline _LIBCPP_INLINE_VISIBILITY
++inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+ basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
+     : __r_(__a)
+ {
+@@ -2042,7 +2042,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
+ }
+ 
+ template <class _CharT, class _Traits, class _Allocator>
+-inline _LIBCPP_INLINE_VISIBILITY
++inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+ basic_string<_CharT, _Traits, _Allocator>::basic_string(const value_type* __s)
+ {
+     _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
+@@ -2116,7 +2116,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
+ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ 
+ template <class _CharT, class _Traits, class _Allocator>
+-inline _LIBCPP_INLINE_VISIBILITY
++inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
+         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+     : __r_(_VSTD::move(__str.__r_))
+@@ -2173,7 +2173,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
+ }
+ 
+ template <class _CharT, class _Traits, class _Allocator>
+-inline _LIBCPP_INLINE_VISIBILITY
++inline _LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49
+ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_type __c)
+ {
+     __init(__n, __c);
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++/patches.android/0013-temp-collective-ndk-hackathon-fixes.patch b/sources/cxx-stl/llvm-libc++/patches.android/0013-temp-collective-ndk-hackathon-fixes.patch
new file mode 100644
index 0000000..128db82
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++/patches.android/0013-temp-collective-ndk-hackathon-fixes.patch
@@ -0,0 +1,1279 @@
+From de2427cee8c21f972a9b4df6a31a7933360b4d01 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Tue, 3 Jun 2014 17:40:43 +0800
+Subject: [PATCH 13/13] [temp] collective ndk-hackathon fixes
+
+See https://github.com/awong-dev/ndk since 0a149253507bd702d042de32c2b6bb9aa58168a3
+for log.  Some are in the process of upstream
+
+---
+ include/__config                                   | 15 ++++++++
+ include/__mutex_base                               |  9 +++++
+ include/bitset                                     |  4 +--
+ include/condition_variable                         |  4 +++
+ include/future                                     |  4 +++
+ include/mutex                                      |  4 +++
+ include/regex                                      |  6 +++-
+ include/shared_mutex                               |  4 +++
+ include/thread                                     |  4 +++
+ src/algorithm.cpp                                  |  8 +++++
+ src/chrono.cpp                                     |  7 ++++
+ src/condition_variable.cpp                         |  5 +++
+ src/debug.cpp                                      | 40 +++++++++++++++++++++
+ src/future.cpp                                     |  6 ++++
+ src/memory.cpp                                     |  4 +--
+ src/mutex.cpp                                      | 19 ++++++++++
+ src/shared_mutex.cpp                               |  6 ++++
+ src/thread.cpp                                     |  9 +++++
+ test/re/re.alg/re.alg.match/basic.pass.cpp         | 14 ++++++++
+ test/re/re.alg/re.alg.match/ecma.pass.cpp          | 14 ++++++++
+ test/re/re.alg/re.alg.match/extended.pass.cpp      | 14 ++++++++
+ test/re/re.alg/re.alg.search/awk.pass.cpp          | 14 ++++++++
+ test/re/re.alg/re.alg.search/basic.pass.cpp        | 14 ++++++++
+ test/re/re.alg/re.alg.search/ecma.pass.cpp         | 14 ++++++++
+ test/re/re.alg/re.alg.search/extended.pass.cpp     | 14 ++++++++
+ test/re/re.traits/lookup_collatename.pass.cpp      |  6 ----
+ .../re.traits/lookup_collatename.xlocale.pass.cpp  | 41 ++++++++++++++++++++++
+ test/re/re.traits/transform.pass.cpp               | 14 ++++++++
+ test/re/re.traits/transform_primary.pass.cpp       | 14 ++++++++
+ test/re/re.traits/translate_nocase.pass.cpp        | 14 ++++++++
+ .../meta.trans.other/aligned_storage.pass.cpp      | 10 ++++--
+ 31 files changed, 341 insertions(+), 14 deletions(-)
+ create mode 100644 test/re/re.traits/lookup_collatename.xlocale.pass.cpp
+
+diff --git a/include/__config b/include/__config
+index 0f443a9..d2ab7ac 100644
+--- a/include/__config
++++ b/include/__config
+@@ -11,6 +11,8 @@
+ #ifndef _LIBCPP_CONFIG
+ #define _LIBCPP_CONFIG
+ 
++#include <unistd.h>
++
+ #if !defined(_MSC_VER) || defined(__clang__)
+ #pragma GCC system_header
+ #endif
+@@ -119,6 +121,12 @@
+ # endif
+ #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
+ 
++#if defined(_POSIX_THREADS) && _POSIX_THREADS > 0
++#  define _LIBCPP_SINGLE_THREADED 0
++#else
++#  define _LIBCPP_SINGLE_THREADED 1
++#endif
++
+ #ifdef _WIN32
+ 
+ // only really useful for a DLL
+@@ -378,7 +386,14 @@ namespace std {
+ #endif
+ 
+ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
++
++// constexpr was added to GCC in 4.6
++#if _GNUC_VER < 406
+ #define _LIBCPP_HAS_NO_CONSTEXPR
++// Can only use constexpr in c++11 mode.
++#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
++#define _LIBCPP_HAS_NO_CONSTEXPR
++#endif
+ 
+ #define _NOEXCEPT throw()
+ #define _NOEXCEPT_(x)
+diff --git a/include/__mutex_base b/include/__mutex_base
+index 293fead..122b0b7 100644
+--- a/include/__mutex_base
++++ b/include/__mutex_base
+@@ -22,12 +22,15 @@
+ 
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ class _LIBCPP_TYPE_VIS mutex
+ {
+     pthread_mutex_t __m_;
+ 
+ public:
+     _LIBCPP_INLINE_VISIBILITY
++
+ #ifndef _LIBCPP_HAS_NO_CONSTEXPR
+      constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {}
+ #else
+@@ -47,6 +50,7 @@ public:
+     typedef pthread_mutex_t* native_handle_type;
+     _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
+ };
++#endif // !_LIBCPP_SINGLE_THREADED
+ 
+ struct _LIBCPP_TYPE_VIS defer_lock_t {};
+ struct _LIBCPP_TYPE_VIS try_to_lock_t {};
+@@ -262,6 +266,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(cv_status)
+ };
+ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
+ 
++#if !_LIBCPP_SINGLE_THREADED
+ class _LIBCPP_TYPE_VIS condition_variable
+ {
+     pthread_cond_t __cv_;
+@@ -315,6 +320,7 @@ private:
+     void __do_timed_wait(unique_lock<mutex>& __lk,
+        chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
+ };
++#endif // !_LIBCPP_SINGLE_THREADED
+ 
+ template <class _To, class _Rep, class _Period>
+ inline _LIBCPP_INLINE_VISIBILITY
+@@ -332,6 +338,7 @@ __ceil(chrono::duration<_Rep, _Period> __d)
+     return __r;
+ }
+ 
++#if !_LIBCPP_SINGLE_THREADED
+ template <class _Predicate>
+ void
+ condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred)
+@@ -396,6 +403,8 @@ condition_variable::wait_for(unique_lock<mutex>& __lk,
+                       _VSTD::move(__pred));
+ }
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_END_NAMESPACE_STD
+ 
+ #endif  // _LIBCPP___MUTEX_BASE
+diff --git a/include/bitset b/include/bitset
+index 4cc7dbd..8c278cc 100644
+--- a/include/bitset
++++ b/include/bitset
+@@ -249,9 +249,9 @@ inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR
+ __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
+ #ifndef _LIBCPP_HAS_NO_CONSTEXPR
+-#if __SIZE_WIDTH__ == 64
++#if __SIZEOF_SIZE_T__ == 8
+     : __first_{__v}
+-#elif __SIZE_WIDTH__ == 32
++#elif __SIZEOF_SIZE_T__ == 4
+     : __first_{__v, __v >> __bits_per_word}
+ #else
+ #error This constructor has not been ported to this platform
+diff --git a/include/condition_variable b/include/condition_variable
+index dc67266..603ee8f 100644
+--- a/include/condition_variable
++++ b/include/condition_variable
+@@ -115,6 +115,8 @@ public:
+ #pragma GCC system_header
+ #endif
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ class _LIBCPP_TYPE_VIS condition_variable_any
+@@ -253,4 +255,6 @@ void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
+ 
+ _LIBCPP_END_NAMESPACE_STD
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ #endif  // _LIBCPP_CONDITION_VARIABLE
+diff --git a/include/future b/include/future
+index de00f25..c776c59 100644
+--- a/include/future
++++ b/include/future
+@@ -374,6 +374,8 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
+ #pragma GCC system_header
+ #endif
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ //enum class future_errc
+@@ -2612,4 +2614,6 @@ future<void>::share()
+ 
+ _LIBCPP_END_NAMESPACE_STD
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ #endif  // _LIBCPP_FUTURE
+diff --git a/include/mutex b/include/mutex
+index e0c02ad..b7a6709 100644
+--- a/include/mutex
++++ b/include/mutex
+@@ -187,6 +187,8 @@ template<class Callable, class ...Args>
+ 
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ class _LIBCPP_TYPE_VIS recursive_mutex
+ {
+     pthread_mutex_t __m_;
+@@ -425,6 +427,8 @@ lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
+ 
+ #endif  // _LIBCPP_HAS_NO_VARIADICS
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ struct _LIBCPP_TYPE_VIS once_flag;
+ 
+ #ifndef _LIBCPP_HAS_NO_VARIADICS
+diff --git a/include/regex b/include/regex
+index bebbaf0..7d922cb 100644
+--- a/include/regex
++++ b/include/regex
+@@ -964,7 +964,11 @@ public:
+     typedef locale                  locale_type;
+     typedef ctype_base::mask        char_class_type;
+ 
+-    static const char_class_type __regex_word = 0x80;
++    // Note that Android's whitespace bit, aka. _B (see locale_android.cpp for
++    // the details) was unfortunately defined as 0x80 which made the whitespace
++    // character be recognized as a word.
++    static const char_class_type __regex_word = 0x200;
++
+ private:
+     locale __loc_;
+     const ctype<char_type>* __ct_;
+diff --git a/include/shared_mutex b/include/shared_mutex
+index 7661054..fe16ee7 100644
+--- a/include/shared_mutex
++++ b/include/shared_mutex
+@@ -112,6 +112,8 @@ template <class Mutex>
+ #pragma GCC system_header
+ #endif
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ class _LIBCPP_TYPE_VIS shared_timed_mutex
+@@ -414,6 +416,8 @@ swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept
+ 
+ _LIBCPP_END_NAMESPACE_STD
+ 
++#endif  // _LIBC_HAS_PTHREADS
++
+ #endif  // _LIBCPP_STD_VER > 11
+ 
+ #endif  // _LIBCPP_SHARED_MUTEX
+diff --git a/include/thread b/include/thread
+index 1f1e4a2..0202440 100644
+--- a/include/thread
++++ b/include/thread
+@@ -106,6 +106,8 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
+ 
+ #define __STDCPP_THREADS__ __cplusplus
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ template <class _Tp>
+@@ -455,4 +457,6 @@ void yield() _NOEXCEPT {sched_yield();}
+ 
+ _LIBCPP_END_NAMESPACE_STD
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ #endif  // _LIBCPP_THREAD
+diff --git a/src/algorithm.cpp b/src/algorithm.cpp
+index 10c4c33..2ee8b00 100644
+--- a/src/algorithm.cpp
++++ b/src/algorithm.cpp
+@@ -48,12 +48,16 @@ template bool __insertion_sort_incomplete<__less<long double>&, long double*>(lo
+ 
+ template unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
+ 
++#if !_LIBCPP_SINGLE_THREADED
+ static pthread_mutex_t __rs_mut = PTHREAD_MUTEX_INITIALIZER;
++#endif
+ unsigned __rs_default::__c_ = 0;
+ 
+ __rs_default::__rs_default()
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     pthread_mutex_lock(&__rs_mut);
++#endif
+     __c_ = 1;
+ }
+ 
+@@ -64,8 +68,12 @@ __rs_default::__rs_default(const __rs_default&)
+ 
+ __rs_default::~__rs_default()
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     if (--__c_ == 0)
+         pthread_mutex_unlock(&__rs_mut);
++#else
++    --__c_;
++#endif
+ }
+ 
+ __rs_default::result_type
+diff --git a/src/chrono.cpp b/src/chrono.cpp
+index 15a6f46..331de3d 100644
+--- a/src/chrono.cpp
++++ b/src/chrono.cpp
+@@ -120,10 +120,17 @@ steady_clock::now() _NOEXCEPT
+ steady_clock::time_point
+ steady_clock::now() _NOEXCEPT
+ {
++#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0
+     struct timespec tp;
+     if (0 != clock_gettime(CLOCK_MONOTONIC, &tp))
+         __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed");
+     return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec));
++#else
++#warning posix doesn't have a monotonic clock on this system \
++         so we're falling back to std::steady_clock (which may \
++         not be monotonic, and therefore may not be conforming)
++    return time_point(system_clock::now().time_since_epoch());
++#endif
+ }
+ #endif  // __APPLE__
+ 
+diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp
+index 061d138..f21142d 100644
+--- a/src/condition_variable.cpp
++++ b/src/condition_variable.cpp
+@@ -12,6 +12,8 @@
+ #include "system_error"
+ #include "cassert"
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ condition_variable::~condition_variable()
+@@ -79,3 +81,6 @@ notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
+ }
+ 
+ _LIBCPP_END_NAMESPACE_STD
++
++#endif // !_LIBCPP_SINGLE_THREADED
++
+diff --git a/src/debug.cpp b/src/debug.cpp
+index d0e8679..05ec703 100644
+--- a/src/debug.cpp
++++ b/src/debug.cpp
+@@ -35,6 +35,7 @@ __get_const_db()
+ namespace
+ {
+ 
++#if !_LIBCPP_SINGLE_THREADED
+ typedef mutex mutex_type;
+ typedef lock_guard<mutex_type> WLock;
+ typedef lock_guard<mutex_type> RLock;
+@@ -45,6 +46,7 @@ mut()
+     static mutex_type m;
+     return m;
+ }
++#endif // !_LIBCPP_SINGLE_THREADED
+ 
+ }  // unnamed namespace
+ 
+@@ -108,7 +110,9 @@ __libcpp_db::~__libcpp_db()
+ void*
+ __libcpp_db::__find_c_from_i(void* __i) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     _LIBCPP_ASSERT(i != nullptr, "iterator not found in debug database.");
+     return i->__c_ != nullptr ? i->__c_->__c_ : nullptr;
+@@ -117,7 +121,9 @@ __libcpp_db::__find_c_from_i(void* __i) const
+ void
+ __libcpp_db::__insert_ic(void* __i, const void* __c)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     if (__cbeg_ == __cend_)
+         return;
+     size_t hc = hash<const void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
+@@ -138,7 +144,9 @@ __libcpp_db::__insert_ic(void* __i, const void* __c)
+ __c_node*
+ __libcpp_db::__insert_c(void* __c)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     if (__csz_ + 1 > static_cast<size_t>(__cend_ - __cbeg_))
+     {
+         size_t nc = __next_prime(2*static_cast<size_t>(__cend_ - __cbeg_) + 1);
+@@ -184,7 +192,9 @@ __libcpp_db::__insert_c(void* __c)
+ void
+ __libcpp_db::__erase_i(void* __i)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     if (__ibeg_ != __iend_)
+     {
+         size_t hi = hash<void*>()(__i) % static_cast<size_t>(__iend_ - __ibeg_);
+@@ -215,7 +225,9 @@ __libcpp_db::__erase_i(void* __i)
+ void
+ __libcpp_db::__invalidate_all(void* __c)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     if (__cend_ != __cbeg_)
+     {
+         size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
+@@ -239,17 +251,23 @@ __libcpp_db::__invalidate_all(void* __c)
+ __c_node*
+ __libcpp_db::__find_c_and_lock(void* __c) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     mut().lock();
++#endif
+     if (__cend_ == __cbeg_)
+     {
++#if !_LIBCPP_SINGLE_THREADED
+         mut().unlock();
++#endif
+         return nullptr;
+     }
+     size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
+     __c_node* p = __cbeg_[hc];
+     if (p == nullptr)
+     {
++#if !_LIBCPP_SINGLE_THREADED
+         mut().unlock();
++#endif
+         return nullptr;
+     }
+     while (p->__c_ != __c)
+@@ -257,7 +275,9 @@ __libcpp_db::__find_c_and_lock(void* __c) const
+         p = p->__next_;
+         if (p == nullptr)
+         {
++#if !_LIBCPP_SINGLE_THREADED
+             mut().unlock();
++#endif
+             return nullptr;
+         }
+     }
+@@ -281,13 +301,17 @@ __libcpp_db::__find_c(void* __c) const
+ void
+ __libcpp_db::unlock() const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     mut().unlock();
++#endif
+ }
+ 
+ void
+ __libcpp_db::__erase_c(void* __c)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     if (__cend_ != __cbeg_)
+     {
+         size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
+@@ -322,7 +346,9 @@ __libcpp_db::__erase_c(void* __c)
+ void
+ __libcpp_db::__iterator_copy(void* __i, const void* __i0)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     __i_node* i0 = __find_iterator(__i0);
+     __c_node* c0 = i0 != nullptr ? i0->__c_ : nullptr;
+@@ -348,7 +374,9 @@ __libcpp_db::__iterator_copy(void* __i, const void* __i0)
+ bool
+ __libcpp_db::__dereferenceable(const void* __i) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     return i != nullptr && i->__c_ != nullptr && i->__c_->__dereferenceable(__i);
+ }
+@@ -356,7 +384,9 @@ __libcpp_db::__dereferenceable(const void* __i) const
+ bool
+ __libcpp_db::__decrementable(const void* __i) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     return i != nullptr && i->__c_ != nullptr && i->__c_->__decrementable(__i);
+ }
+@@ -364,7 +394,9 @@ __libcpp_db::__decrementable(const void* __i) const
+ bool
+ __libcpp_db::__addable(const void* __i, ptrdiff_t __n) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     return i != nullptr && i->__c_ != nullptr && i->__c_->__addable(__i, __n);
+ }
+@@ -372,7 +404,9 @@ __libcpp_db::__addable(const void* __i, ptrdiff_t __n) const
+ bool
+ __libcpp_db::__subscriptable(const void* __i, ptrdiff_t __n) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     return i != nullptr && i->__c_ != nullptr && i->__c_->__subscriptable(__i, __n);
+ }
+@@ -380,7 +414,9 @@ __libcpp_db::__subscriptable(const void* __i, ptrdiff_t __n) const
+ bool
+ __libcpp_db::__less_than_comparable(const void* __i, const void* __j) const
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     RLock _(mut());
++#endif
+     __i_node* i = __find_iterator(__i);
+     __i_node* j = __find_iterator(__j);
+     __c_node* ci = i != nullptr ? i->__c_ : nullptr;
+@@ -391,7 +427,9 @@ __libcpp_db::__less_than_comparable(const void* __i, const void* __j) const
+ void
+ __libcpp_db::swap(void* c1, void* c2)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     size_t hc = hash<void*>()(c1) % static_cast<size_t>(__cend_ - __cbeg_);
+     __c_node* p1 = __cbeg_[hc];
+     _LIBCPP_ASSERT(p1 != nullptr, "debug mode internal logic error swap A");
+@@ -420,7 +458,9 @@ __libcpp_db::swap(void* c1, void* c2)
+ void
+ __libcpp_db::__insert_i(void* __i)
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     WLock _(mut());
++#endif
+     __insert_iterator(__i);
+ }
+ 
+diff --git a/src/future.cpp b/src/future.cpp
+index c67dc58..91756e1 100644
+--- a/src/future.cpp
++++ b/src/future.cpp
+@@ -10,6 +10,8 @@
+ #include "future"
+ #include "string"
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ class _LIBCPP_HIDDEN __future_error_category
+@@ -298,3 +300,7 @@ shared_future<void>::operator=(const shared_future& __rhs)
+ }
+ 
+ _LIBCPP_END_NAMESPACE_STD
++
++#endif // !_LIBCPP_SINGLE_THREADED
++
++
+diff --git a/src/memory.cpp b/src/memory.cpp
+index 666673f..2938538 100644
+--- a/src/memory.cpp
++++ b/src/memory.cpp
+@@ -119,7 +119,7 @@ __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT
+ 
+ #endif  // _LIBCPP_NO_RTTI
+ 
+-#if __has_feature(cxx_atomic)
++#if __has_feature(cxx_atomic) && !_LIBCPP_SINGLE_THREADED
+ 
+ static const std::size_t __sp_mut_count = 16;
+ static pthread_mutex_t mut_back_imp[__sp_mut_count] =
+@@ -172,7 +172,7 @@ __get_sp_mut(const void* p)
+     return muts[hash<const void*>()(p) & (__sp_mut_count-1)];
+ }
+ 
+-#endif // __has_feature(cxx_atomic)
++#endif // __has_feature(cxx_atomic) && LIBCPP_HAS_PTHREADS
+ 
+ void
+ declare_reachable(void*)
+diff --git a/src/mutex.cpp b/src/mutex.cpp
+index 0767897..18a68b1 100644
+--- a/src/mutex.cpp
++++ b/src/mutex.cpp
+@@ -14,6 +14,7 @@
+ #include "cassert"
+ 
+ _LIBCPP_BEGIN_NAMESPACE_STD
++#if !_LIBCPP_SINGLE_THREADED
+ 
+ const defer_lock_t  defer_lock = {};
+ const try_to_lock_t try_to_lock = {};
+@@ -206,21 +207,27 @@ recursive_timed_mutex::unlock() _NOEXCEPT
+     }
+ }
+ 
++#endif // !_LIBCPP_SINGLE_THREADED
++
+ // If dispatch_once_f ever handles C++ exceptions, and if one can get to it
+ // without illegal macros (unexpected macros not beginning with _UpperCase or
+ // __lowercase), and if it stops spinning waiting threads, then call_once should
+ // call into dispatch_once_f instead of here. Relevant radar this code needs to
+ // keep in sync with:  7741191.
+ 
++#if !_LIBCPP_SINGLE_THREADED
+ static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_cond_t  cv  = PTHREAD_COND_INITIALIZER;
++#endif
+ 
+ void
+ __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
+ {
++#if !_LIBCPP_SINGLE_THREADED
+     pthread_mutex_lock(&mut);
+     while (flag == 1)
+         pthread_cond_wait(&cv, &mut);
++#endif // !_LIBCPP_SINGLE_THREADED
+     if (flag == 0)
+     {
+ #ifndef _LIBCPP_NO_EXCEPTIONS
+@@ -228,26 +235,38 @@ __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))
+         {
+ #endif  // _LIBCPP_NO_EXCEPTIONS
+             flag = 1;
++#if !_LIBCPP_SINGLE_THREADED
+             pthread_mutex_unlock(&mut);
++#endif // !_LIBCPP_SINGLE_THREADED
+             func(arg);
++#if !_LIBCPP_SINGLE_THREADED
+             pthread_mutex_lock(&mut);
++#endif // !_LIBCPP_SINGLE_THREADED
+             flag = ~0ul;
++#if !_LIBCPP_SINGLE_THREADED
+             pthread_mutex_unlock(&mut);
+             pthread_cond_broadcast(&cv);
++#endif // !_LIBCPP_SINGLE_THREADED
+ #ifndef _LIBCPP_NO_EXCEPTIONS
+         }
+         catch (...)
+         {
++#if !_LIBCPP_SINGLE_THREADED
+             pthread_mutex_lock(&mut);
++#endif // !_LIBCPP_SINGLE_THREADED
+             flag = 0ul;
++#if !_LIBCPP_SINGLE_THREADED
+             pthread_mutex_unlock(&mut);
+             pthread_cond_broadcast(&cv);
++#endif // !_LIBCPP_SINGLE_THREADED
+             throw;
+         }
+ #endif  // _LIBCPP_NO_EXCEPTIONS
+     }
++#if !_LIBCPP_SINGLE_THREADED
+     else
+         pthread_mutex_unlock(&mut);
++#endif // !_LIBCPP_SINGLE_THREADED
+ }
+ 
+ _LIBCPP_END_NAMESPACE_STD
+diff --git a/src/shared_mutex.cpp b/src/shared_mutex.cpp
+index dd78a16..860e23a 100644
+--- a/src/shared_mutex.cpp
++++ b/src/shared_mutex.cpp
+@@ -10,6 +10,8 @@
+ #define _LIBCPP_BUILDING_SHARED_MUTEX
+ #include "shared_mutex"
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ shared_timed_mutex::shared_timed_mutex()
+@@ -99,3 +101,7 @@ shared_timed_mutex::unlock_shared()
+ 
+ 
+ _LIBCPP_END_NAMESPACE_STD
++
++#endif // !_LIBCPP_SINGLE_THREADED
++
++
+diff --git a/src/thread.cpp b/src/thread.cpp
+index bd2b7c3..1ffef7a 100644
+--- a/src/thread.cpp
++++ b/src/thread.cpp
+@@ -27,6 +27,8 @@
+ #include <windows.h>
+ #endif
+ 
++#if !_LIBCPP_SINGLE_THREADED
++
+ _LIBCPP_BEGIN_NAMESPACE_STD
+ 
+ thread::~thread()
+@@ -121,7 +123,11 @@ sleep_for(const chrono::nanoseconds& ns)
+             ts.tv_sec = ts_sec_max;
+             ts.tv_nsec = giga::num - 1;
+         }
++#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
+         nanosleep(&ts, 0);
++#else
++#warning sleep_for not yet implemented
++#endif
+     }
+ }
+ 
+@@ -223,3 +229,6 @@ __thread_struct::__make_ready_at_thread_exit(__assoc_sub_state* __s)
+ }
+ 
+ _LIBCPP_END_NAMESPACE_STD
++
++#endif // !_LIBCPP_SINGLE_THREADED
++
+diff --git a/test/re/re.alg/re.alg.match/basic.pass.cpp b/test/re/re.alg/re.alg.match/basic.pass.cpp
+index 55c7361..9d3f39d 100644
+--- a/test/re/re.alg/re.alg.match/basic.pass.cpp
++++ b/test/re/re.alg/re.alg.match/basic.pass.cpp
+@@ -614,6 +614,12 @@ int main()
+                                                  std::regex_constants::basic)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -648,6 +654,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1282,6 +1289,12 @@ int main()
+                                                  std::regex_constants::basic)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1316,6 +1329,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.match/ecma.pass.cpp b/test/re/re.alg/re.alg.match/ecma.pass.cpp
+index 162a6a7..bb36831 100644
+--- a/test/re/re.alg/re.alg.match/ecma.pass.cpp
++++ b/test/re/re.alg/re.alg.match/ecma.pass.cpp
+@@ -576,6 +576,12 @@ int main()
+         assert(!std::regex_match(s, m, std::regex("[a[.hyphen.]z]")));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -621,6 +627,7 @@ int main()
+         assert(m.size() == 1);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1241,6 +1248,12 @@ int main()
+         assert(!std::regex_match(s, m, std::wregex(L"[a[.hyphen.]z]")));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1274,6 +1287,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.match/extended.pass.cpp b/test/re/re.alg/re.alg.match/extended.pass.cpp
+index 683f65b..5ef8695 100644
+--- a/test/re/re.alg/re.alg.match/extended.pass.cpp
++++ b/test/re/re.alg/re.alg.match/extended.pass.cpp
+@@ -612,6 +612,12 @@ int main()
+                                                  std::regex_constants::extended)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -646,6 +652,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1278,6 +1285,12 @@ int main()
+                                                  std::regex_constants::extended)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1312,6 +1325,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.search/awk.pass.cpp b/test/re/re.alg/re.alg.search/awk.pass.cpp
+index 57606c1..b03dd7b 100644
+--- a/test/re/re.alg/re.alg.search/awk.pass.cpp
++++ b/test/re/re.alg/re.alg.search/awk.pass.cpp
+@@ -684,6 +684,12 @@ int main()
+                                                  std::regex_constants::awk)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -718,6 +724,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1455,6 +1462,12 @@ int main()
+                                                  std::regex_constants::awk)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1489,6 +1502,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.search/basic.pass.cpp b/test/re/re.alg/re.alg.search/basic.pass.cpp
+index 56396f3..809f870 100644
+--- a/test/re/re.alg/re.alg.search/basic.pass.cpp
++++ b/test/re/re.alg/re.alg.search/basic.pass.cpp
+@@ -686,6 +686,12 @@ int main()
+                                                  std::regex_constants::basic)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -720,6 +726,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1444,6 +1451,12 @@ int main()
+                                                  std::regex_constants::basic)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1478,6 +1491,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.search/ecma.pass.cpp b/test/re/re.alg/re.alg.search/ecma.pass.cpp
+index 8149157..21e3efe 100644
+--- a/test/re/re.alg/re.alg.search/ecma.pass.cpp
++++ b/test/re/re.alg/re.alg.search/ecma.pass.cpp
+@@ -666,6 +666,12 @@ int main()
+         assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]")));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -699,6 +705,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1445,6 +1452,12 @@ int main()
+         assert(!std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]")));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1478,6 +1491,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.alg/re.alg.search/extended.pass.cpp b/test/re/re.alg/re.alg.search/extended.pass.cpp
+index 8240872..9cac3b2 100644
+--- a/test/re/re.alg/re.alg.search/extended.pass.cpp
++++ b/test/re/re.alg/re.alg.search/extended.pass.cpp
+@@ -684,6 +684,12 @@ int main()
+                                                  std::regex_constants::extended)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::cmatch m;
+@@ -718,6 +724,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::cmatch m;
+         const char s[] = "m";
+@@ -1440,6 +1447,12 @@ int main()
+                                                  std::regex_constants::extended)));
+         assert(m.size() == 0);
+     }
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+     std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+     {
+         std::wcmatch m;
+@@ -1474,6 +1487,7 @@ int main()
+         assert(m.str(0) == s);
+     }
+     std::locale::global(std::locale("C"));
++#endif
+     {
+         std::wcmatch m;
+         const wchar_t s[] = L"m";
+diff --git a/test/re/re.traits/lookup_collatename.pass.cpp b/test/re/re.traits/lookup_collatename.pass.cpp
+index 055b554..9c6f108 100644
+--- a/test/re/re.traits/lookup_collatename.pass.cpp
++++ b/test/re/re.traits/lookup_collatename.pass.cpp
+@@ -103,9 +103,6 @@ int main()
+ 
+     test("tild", std::string(""));
+     test("ch", std::string(""));
+-    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+-    test("ch", std::string("ch"));
+-    std::locale::global(std::locale("C"));
+ 
+     test(L"NUL", std::wstring(L"\x00", 1));
+     test(L"alert", std::wstring(L"\x07"));
+@@ -179,7 +176,4 @@ int main()
+ 
+     test(L"tild", std::wstring(L""));
+     test(L"ch", std::wstring(L""));
+-    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
+-    test(L"ch", std::wstring(L"ch"));
+-    std::locale::global(std::locale("C"));
+ }
+diff --git a/test/re/re.traits/lookup_collatename.xlocale.pass.cpp b/test/re/re.traits/lookup_collatename.xlocale.pass.cpp
+new file mode 100644
+index 0000000..b6e563c
+--- /dev/null
++++ b/test/re/re.traits/lookup_collatename.xlocale.pass.cpp
+@@ -0,0 +1,41 @@
++//===----------------------------------------------------------------------===//
++//
++//                     The LLVM Compiler Infrastructure
++//
++// This file is dual licensed under the MIT and the University of Illinois Open
++// Source Licenses. See LICENSE.TXT for details.
++//
++//===----------------------------------------------------------------------===//
++
++// <regex>
++
++// template <class charT> struct regex_traits;
++
++// template <class ForwardIterator>
++//   string_type
++//   lookup_collatename(ForwardIterator first, ForwardIterator last) const;
++
++#include <regex>
++#include <iterator>
++#include <cassert>
++#include "test_iterators.h"
++
++template <class char_type>
++void
++test(const char_type* A, const std::basic_string<char_type>& expected)
++{
++    std::regex_traits<char_type> t;
++    typedef forward_iterator<const char_type*> F;
++    assert(t.lookup_collatename(F(A), F(A + t.length(A))) == expected);
++}
++
++int main()
++{
++#if !defined(__ANDROID__)
++    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
++    test("ch", std::string("ch"));
++
++    std::locale::global(std::locale("cs_CZ.ISO8859-2"));
++    test(L"ch", std::wstring(L"ch"));
++#endif
++}
+diff --git a/test/re/re.traits/transform.pass.cpp b/test/re/re.traits/transform.pass.cpp
+index 9b9feb1..73d6593 100644
+--- a/test/re/re.traits/transform.pass.cpp
++++ b/test/re/re.traits/transform.pass.cpp
+@@ -27,8 +27,15 @@ int main()
+         const char B[] = "B";
+         typedef forward_iterator<const char*> F;
+         assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1)));
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale("cs_CZ.ISO8859-2"));
+         assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1)));
++#endif
+     }
+     {
+         std::regex_traits<wchar_t> t;
+@@ -36,7 +43,14 @@ int main()
+         const wchar_t B[] = L"B";
+         typedef forward_iterator<const wchar_t*> F;
+         assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1)));
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale("cs_CZ.ISO8859-2"));
+         assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1)));
++#endif
+     }
+ }
+diff --git a/test/re/re.traits/transform_primary.pass.cpp b/test/re/re.traits/transform_primary.pass.cpp
+index 1e2aca6..a22d86d 100644
+--- a/test/re/re.traits/transform_primary.pass.cpp
++++ b/test/re/re.traits/transform_primary.pass.cpp
+@@ -29,9 +29,16 @@ int main()
+         typedef forward_iterator<const char*> F;
+         assert(t.transform_primary(F(A), F(A+1)) !=
+                t.transform_primary(F(Aacute), F(Aacute+1)));
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale("cs_CZ.ISO8859-2"));
+         assert(t.transform_primary(F(A), F(A+1)) ==
+                t.transform_primary(F(Aacute), F(Aacute+1)));
++#endif
+     }
+     {
+         std::regex_traits<wchar_t> t;
+@@ -40,8 +47,15 @@ int main()
+         typedef forward_iterator<const wchar_t*> F;
+         assert(t.transform_primary(F(A), F(A+1)) !=
+                t.transform_primary(F(Aacute), F(Aacute+1)));
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale("cs_CZ.ISO8859-2"));
+         assert(t.transform_primary(F(A), F(A+1)) ==
+                t.transform_primary(F(Aacute), F(Aacute+1)));
++#endif
+     }
+ }
+diff --git a/test/re/re.traits/translate_nocase.pass.cpp b/test/re/re.traits/translate_nocase.pass.cpp
+index 5e042ae..bd8a7f4 100644
+--- a/test/re/re.traits/translate_nocase.pass.cpp
++++ b/test/re/re.traits/translate_nocase.pass.cpp
+@@ -34,6 +34,12 @@ int main()
+         assert(t.translate_nocase('1') == '1');
+         assert(t.translate_nocase('\xDA') == '\xDA');
+         assert(t.translate_nocase('\xFA') == '\xFA');
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale(LOCALE_en_US_UTF_8));
+         assert(t.translate_nocase(' ') == ' ');
+         assert(t.translate_nocase('A') == 'a');
+@@ -43,6 +49,7 @@ int main()
+         assert(t.translate_nocase('1') == '1');
+         assert(t.translate_nocase('\xDA') == '\xFA');
+         assert(t.translate_nocase('\xFA') == '\xFA');
++#endif
+     }
+     {
+         std::regex_traits<wchar_t> t;
+@@ -54,6 +61,12 @@ int main()
+         assert(t.translate_nocase(L'1') == L'1');
+         assert(t.translate_nocase(L'\xDA') == L'\xDA');
+         assert(t.translate_nocase(L'\xFA') == L'\xFA');
++/* Disable locale specific tests on Android because Android's NDK does not
++ * support locales other than "C" and "POSIX".
++ *
++ * https://code.google.com/p/android/issues/detail?id=57313
++ */
++#if !defined(__ANDROID__)
+         t.imbue(std::locale(LOCALE_en_US_UTF_8));
+         assert(t.translate_nocase(L' ') == L' ');
+         assert(t.translate_nocase(L'A') == L'a');
+@@ -63,5 +76,6 @@ int main()
+         assert(t.translate_nocase(L'1') == L'1');
+         assert(t.translate_nocase(L'\xDA') == L'\xFA');
+         assert(t.translate_nocase(L'\xFA') == L'\xFA');
++#endif
+     }
+ }
+diff --git a/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
+index d1b7700..67ee23d 100644
+--- a/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
++++ b/test/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
+@@ -159,12 +159,16 @@ int main()
+     static_assert(std::alignment_of<T1>::value == 8, "");
+     static_assert(sizeof(T1) == 16, "");
+     }
++    // The expected values for the tests below (modulo the last one) are
++    // platform-specific which alignof deals with. In particular, the maximum
++    // alignment value on ARM is 8 bytes as opposed to 16 bytes on some other
++    // architectures that support 128 bit memory accesses.
+     {
+     typedef std::aligned_storage<16>::type T1;
+ #if _LIBCPP_STD_VER > 11
+     static_assert(std::is_same<std::aligned_storage_t<16>, T1>::value, "" );
+ #endif
+-    static_assert(std::alignment_of<T1>::value == 16, "");
++    static_assert(std::alignment_of<T1>::value == alignof(T1), "");
+     static_assert(sizeof(T1) == 16, "");
+     }
+     {
+@@ -172,8 +176,8 @@ int main()
+ #if _LIBCPP_STD_VER > 11
+     static_assert(std::is_same<std::aligned_storage_t<17>, T1>::value, "" );
+ #endif
+-    static_assert(std::alignment_of<T1>::value == 16, "");
+-    static_assert(sizeof(T1) == 32, "");
++    static_assert(std::alignment_of<T1>::value == alignof(T1), "");
++    static_assert(sizeof(T1) == 16 + alignof(T1), "");
+     }
+     {
+     typedef std::aligned_storage<10>::type T1;
+-- 
+1.9.1.423.g4596e3a
+
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/LICENSE.TXT b/sources/cxx-stl/llvm-libc++abi/libcxxabi/LICENSE.TXT
index b04ba2c..17969ae 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/LICENSE.TXT
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/LICENSE.TXT
@@ -14,7 +14,7 @@
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
 
 All rights reserved.
 
@@ -55,7 +55,7 @@
 
 ==============================================================================
 
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/cxxabi.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/cxxabi.h
index 66ef6d4..8fb079b 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/cxxabi.h
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/cxxabi.h
@@ -21,6 +21,14 @@
 #define _LIBCPPABI_VERSION 1001
 #define LIBCXXABI_NORETURN  __attribute__((noreturn))
 
+// TODO(danakj): This is also in unwind.h and libunwind.h, can we consolidate?
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \
+    !defined(__ARM_DWARF_EH__) && !defined(__APPLE__)
+#define LIBCXXABI_ARM_EHABI 1
+#else
+#define LIBCXXABI_ARM_EHABI 0
+#endif
+
 #ifdef __cplusplus
 
 namespace std {
@@ -44,6 +52,10 @@
 extern void * __cxa_get_exception_ptr(void * exceptionObject) throw();
 extern void * __cxa_begin_catch(void * exceptionObject) throw();
 extern void __cxa_end_catch();
+#if LIBCXXABI_ARM_EHABI
+extern bool __cxa_begin_cleanup(void * exceptionObject) throw();
+extern void __cxa_end_cleanup();
+#endif
 extern std::type_info * __cxa_current_exception_type();
 
 // 2.5.4 Rethrowing Exceptions
@@ -168,8 +180,8 @@
   } // extern "C"
 } // namespace __cxxabiv1
 
-#endif // __cplusplus
-
 namespace abi = __cxxabiv1;
 
+#endif // __cplusplus
+
 #endif // __CXXABI_H 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/libunwind.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/libunwind.h
index 1b2990d..ab97c41 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/libunwind.h
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/libunwind.h
@@ -17,6 +17,14 @@
 #include <stdint.h>
 #include <stddef.h>
 
+// TODO(danakj): This is also in unwind.h and cxxabi.h, can we consolidate?
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \
+    !defined(__ARM_DWARF_EH__) && !defined(__APPLE__)
+#define LIBCXXABI_ARM_EHABI 1
+#else
+#define LIBCXXABI_ARM_EHABI 0
+#endif
+
 #if __APPLE__
   #include <Availability.h>
     #if __arm__
@@ -56,8 +64,17 @@
 typedef struct unw_addr_space *unw_addr_space_t;
 
 typedef int unw_regnum_t;
+#if __arm__
+typedef uint32_t unw_word_t;
+#else
 typedef uint64_t unw_word_t;
+#endif
+
+#if __arm__
+typedef uint64_t unw_fpreg_t;
+#else
 typedef double unw_fpreg_t;
+#endif
 
 struct unw_proc_info_t {
   unw_word_t  start_ip;         /* start address of function */
@@ -87,6 +104,12 @@
 extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t)  LIBUNWIND_AVAIL;
 extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL;
 
+#if __arm__
+/* Save VFP registers in FSTMX format (instead of FSTMD). */
+extern void unw_save_vfp_as_X(unw_cursor_t *) LIBUNWIND_AVAIL;
+#endif
+
+
 extern const char *unw_regname(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
 extern int unw_get_proc_info(unw_cursor_t *, unw_proc_info_t *) LIBUNWIND_AVAIL;
 extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
@@ -353,4 +376,134 @@
   UNW_ARM64_D31 = 95,
 };
 
+// 32-bit ARM registers. Numbers match DWARF for ARM spec #3.1 Table 1.
+// Naming scheme uses recommendations given in Note 4 for VFP-v2 and VFP-v3.
+// In this scheme, even though the 64-bit floating point registers D0-D31
+// overlap physically with the 32-bit floating pointer registers S0-S31,
+// they are given a non-overlapping range of register numbers.
+//
+// Commented out ranges are not preserved during unwinding.
+enum {
+  UNW_ARM_R0  = 0,
+  UNW_ARM_R1  = 1,
+  UNW_ARM_R2  = 2,
+  UNW_ARM_R3  = 3,
+  UNW_ARM_R4  = 4,
+  UNW_ARM_R5  = 5,
+  UNW_ARM_R6  = 6,
+  UNW_ARM_R7  = 7,
+  UNW_ARM_R8  = 8,
+  UNW_ARM_R9  = 9,
+  UNW_ARM_R10 = 10,
+  UNW_ARM_R11 = 11,
+  UNW_ARM_R12 = 12,
+  UNW_ARM_SP  = 13,  // Logical alias for UNW_REG_SP
+  UNW_ARM_R13 = 13,
+  UNW_ARM_LR  = 14,
+  UNW_ARM_R14 = 14,
+  UNW_ARM_IP  = 15,  // Logical alias for UNW_REG_IP
+  UNW_ARM_R15 = 15,
+  // 16-63 -- OBSOLETE. Used in VFP1 to represent both S0-S31 and D0-D31.
+  UNW_ARM_S0  = 64,
+  UNW_ARM_S1  = 65,
+  UNW_ARM_S2  = 66,
+  UNW_ARM_S3  = 67,
+  UNW_ARM_S4  = 68,
+  UNW_ARM_S5  = 69,
+  UNW_ARM_S6  = 70,
+  UNW_ARM_S7  = 71,
+  UNW_ARM_S8  = 72,
+  UNW_ARM_S9  = 73,
+  UNW_ARM_S10 = 74,
+  UNW_ARM_S11 = 75,
+  UNW_ARM_S12 = 76,
+  UNW_ARM_S13 = 77,
+  UNW_ARM_S14 = 78,
+  UNW_ARM_S15 = 79,
+  UNW_ARM_S16 = 80,
+  UNW_ARM_S17 = 81,
+  UNW_ARM_S18 = 82,
+  UNW_ARM_S19 = 83,
+  UNW_ARM_S20 = 84,
+  UNW_ARM_S21 = 85,
+  UNW_ARM_S22 = 86,
+  UNW_ARM_S23 = 87,
+  UNW_ARM_S24 = 88,
+  UNW_ARM_S25 = 89,
+  UNW_ARM_S26 = 90,
+  UNW_ARM_S27 = 91,
+  UNW_ARM_S28 = 92,
+  UNW_ARM_S29 = 93,
+  UNW_ARM_S30 = 94,
+  UNW_ARM_S31 = 95,
+  //  96-103 -- OBSOLETE. F0-F7. Used by the FPA system. Superseded by VFP.
+  // 104-111 -- wCGR0-wCGR7, ACC0-ACC7 (Intel wireless MMX)
+  UNW_ARM_WR0 = 112,
+  UNW_ARM_WR1 = 113,
+  UNW_ARM_WR2 = 114,
+  UNW_ARM_WR3 = 115,
+  UNW_ARM_WR4 = 116,
+  UNW_ARM_WR5 = 117,
+  UNW_ARM_WR6 = 118,
+  UNW_ARM_WR7 = 119,
+  UNW_ARM_WR8 = 120,
+  UNW_ARM_WR9 = 121,
+  UNW_ARM_WR10 = 122,
+  UNW_ARM_WR11 = 123,
+  UNW_ARM_WR12 = 124,
+  UNW_ARM_WR13 = 125,
+  UNW_ARM_WR14 = 126,
+  UNW_ARM_WR15 = 127,
+  // 128-133 -- SPSR, SPSR_{FIQ|IRQ|ABT|UND|SVC}
+  // 134-143 -- Reserved
+  // 144-150 -- R8_USR–R14_USR
+  // 151-157 -- R8_FIQ–R14_FIQ
+  // 158-159 -- R13_IRQ–R14_IRQ
+  // 160-161 -- R13_ABT–R14_ABT
+  // 162-163 -- R13_UND–R14_UND
+  // 164-165 -- R13_SVC–R14_SVC
+  // 166-191 -- Reserved
+  UNW_ARM_WC0 = 192,
+  UNW_ARM_WC1 = 193,
+  UNW_ARM_WC2 = 194,
+  UNW_ARM_WC3 = 195,
+  // 196-199 -- wC4-wC7 (Intel wireless MMX control)
+  // 200-255 -- Reserved
+  UNW_ARM_D0  = 256,
+  UNW_ARM_D1  = 257,
+  UNW_ARM_D2  = 258,
+  UNW_ARM_D3  = 259,
+  UNW_ARM_D4  = 260,
+  UNW_ARM_D5  = 261,
+  UNW_ARM_D6  = 262,
+  UNW_ARM_D7  = 263,
+  UNW_ARM_D8  = 264,
+  UNW_ARM_D9  = 265,
+  UNW_ARM_D10 = 266,
+  UNW_ARM_D11 = 267,
+  UNW_ARM_D12 = 268,
+  UNW_ARM_D13 = 269,
+  UNW_ARM_D14 = 270,
+  UNW_ARM_D15 = 271,
+  UNW_ARM_D16 = 272,
+  UNW_ARM_D17 = 273,
+  UNW_ARM_D18 = 274,
+  UNW_ARM_D19 = 275,
+  UNW_ARM_D20 = 276,
+  UNW_ARM_D21 = 277,
+  UNW_ARM_D22 = 278,
+  UNW_ARM_D23 = 279,
+  UNW_ARM_D24 = 280,
+  UNW_ARM_D25 = 281,
+  UNW_ARM_D26 = 282,
+  UNW_ARM_D27 = 283,
+  UNW_ARM_D28 = 284,
+  UNW_ARM_D29 = 285,
+  UNW_ARM_D30 = 286,
+  UNW_ARM_D31 = 287,
+  // 288-319 -- Reserved for VFP/Neon
+  // 320-8191 -- Reserved
+  // 8192-16383 -- Unspecified vendor co-processor register.
+};
+
 #endif
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/mach-o/compact_unwind_encoding.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/mach-o/compact_unwind_encoding.h
index 6110688..3e9b054 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/mach-o/compact_unwind_encoding.h
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/mach-o/compact_unwind_encoding.h
@@ -265,15 +265,13 @@
 //
 
 
-#ifndef __OPEN_SOURCE__
-
 // ARM64
 //
 // 1-bit: start
 // 1-bit: has lsda
 // 2-bit: personality index
 //
-// 4-bits: 4=frame-based, 2=frameless, 3=dwarf
+// 4-bits: 4=frame-based, 3=dwarf, 2=frameless
 //  frameless:
 //        12-bits of stack size
 //  frame-based:
@@ -298,15 +296,6 @@
     UNWIND_ARM64_FRAME_D12_D13_PAIR            = 0x00000400,
     UNWIND_ARM64_FRAME_D14_D15_PAIR            = 0x00000800,
 
-    UNWIND_ARM64_FRAME_X21_X22_PAIR_OLD        = 0x00000001,
-    UNWIND_ARM64_FRAME_X23_X24_PAIR_OLD        = 0x00000002,
-    UNWIND_ARM64_FRAME_X25_X26_PAIR_OLD        = 0x00000004,
-    UNWIND_ARM64_FRAME_X27_X28_PAIR_OLD        = 0x00000008,
-    UNWIND_ARM64_FRAME_D8_D9_PAIR_OLD          = 0x00000010,
-    UNWIND_ARM64_FRAME_D10_D11_PAIR_OLD        = 0x00000020,
-    UNWIND_ARM64_FRAME_D12_D13_PAIR_OLD        = 0x00000040,
-    UNWIND_ARM64_FRAME_D14_D15_PAIR_OLD        = 0x00000080,
-
     UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK     = 0x00FFF000,
     UNWIND_ARM64_DWARF_SECTION_OFFSET          = 0x00FFFFFF,
 };
@@ -333,8 +322,6 @@
 //    function.
 //
 
-#endif // __OPEN_SOURCE__
-
 
 
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/unwind.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/unwind.h
index bd791da..7d16f02 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/unwind.h
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include/unwind.h
@@ -17,8 +17,23 @@
 #include <stdint.h>
 #include <stddef.h>
 
+#if defined(__APPLE__)
+#define LIBUNWIND_UNAVAIL __attribute__ (( unavailable ))
+#else
+#define LIBUNWIND_UNAVAIL
+#endif
+
+// TODO(danakj): This is also in cxxabi.h and libunwind.h, can we consolidate?
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \
+    !defined(__ARM_DWARF_EH__) && !defined(__APPLE__)
+#define LIBCXXABI_ARM_EHABI 1
+#else
+#define LIBCXXABI_ARM_EHABI 0
+#endif
+
 typedef enum {
   _URC_NO_REASON = 0,
+  _URC_OK = 0,
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
   _URC_FATAL_PHASE2_ERROR = 2,
   _URC_FATAL_PHASE1_ERROR = 3,
@@ -26,7 +41,10 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if LIBCXXABI_ARM_EHABI
+  _URC_FAILURE = 9,
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -37,13 +55,70 @@
   _UA_END_OF_STACK = 16 // gcc extension to C++ ABI
 } _Unwind_Action;
 
+typedef struct _Unwind_Context _Unwind_Context;   // opaque
+
+#if LIBCXXABI_ARM_EHABI
+typedef uint32_t _Unwind_State;
+
+static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME   = 0;
+static const _Unwind_State _US_UNWIND_FRAME_STARTING  = 1;
+static const _Unwind_State _US_UNWIND_FRAME_RESUME    = 2;
+
+typedef uint32_t _Unwind_EHT_Header;
+
+struct _Unwind_Control_Block;
+typedef struct _Unwind_Control_Block _Unwind_Control_Block;
+typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */
+
+struct _Unwind_Control_Block {
+  uint64_t exception_class;
+  void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block*);
+  /* Unwinder cache, private fields for the unwinder's use */
+  struct {
+    uint32_t reserved1; /* init reserved1 to 0, then don't touch */
+    uint32_t reserved2;
+    uint32_t reserved3;
+    uint32_t reserved4;
+    uint32_t reserved5;
+  } unwinder_cache;
+  /* Propagation barrier cache (valid after phase 1): */
+  struct {
+    uint32_t sp;
+    uint32_t bitpattern[5];
+  } barrier_cache;
+  /* Cleanup cache (preserved over cleanup): */
+  struct {
+    uint32_t bitpattern[4];
+  } cleanup_cache;
+  /* Pr cache (for pr's benefit): */
+  struct {
+    uint32_t fnstart; /* function start address */
+    _Unwind_EHT_Header* ehtp; /* pointer to EHT entry header word */
+    uint32_t additional; /* additional data */
+    uint32_t reserved1;
+  } pr_cache;
+
+  long long int :0; /* Enforce the 8-byte alignment */
+};
+
+typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
+      (_Unwind_State state,
+       _Unwind_Exception* exceptionObject,
+       struct _Unwind_Context* context);
+
+typedef _Unwind_Reason_Code (*__personality_routine)
+      (_Unwind_State state,
+       _Unwind_Exception* exceptionObject,
+       struct _Unwind_Context* context);
+#else
 struct _Unwind_Context;   // opaque
 struct _Unwind_Exception; // forward declaration
+typedef struct _Unwind_Exception _Unwind_Exception;
 
 struct _Unwind_Exception {
   uint64_t exception_class;
   void (*exception_cleanup)(_Unwind_Reason_Code reason,
-                            struct _Unwind_Exception *exc);
+                            _Unwind_Exception *exc);
   uintptr_t private_1; // non-zero means forced unwind
   uintptr_t private_2; // holds sp that phase1 found for phase2 to use
 #if !__LP64__
@@ -55,21 +130,23 @@
 #endif
 };
 
-typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
-    (int version,
-     _Unwind_Action actions,
-     uint64_t exceptionClass,
-     struct _Unwind_Exception* exceptionObject,
-     struct _Unwind_Context* context,
-     void* stop_parameter );
-
 typedef _Unwind_Reason_Code (*__personality_routine)
       (int version,
        _Unwind_Action actions,
        uint64_t exceptionClass,
-       struct _Unwind_Exception* exceptionObject,
+       _Unwind_Exception* exceptionObject,
        struct _Unwind_Context* context);
 
+typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
+        (int version,
+         _Unwind_Action actions,
+         uint64_t exceptionClass,
+         struct _Unwind_Exception *exceptionObject,
+         struct _Unwind_Context *context,
+         void *stop_parameter );
+
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -77,35 +154,111 @@
 //
 // The following are the base functions documented by the C++ ABI
 //
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
 extern _Unwind_Reason_Code
-    _Unwind_SjLj_RaiseException(struct _Unwind_Exception *exception_object);
-extern void _Unwind_SjLj_Resume(struct _Unwind_Exception *exception_object);
+    _Unwind_SjLj_RaiseException(_Unwind_Exception *exception_object);
+extern void _Unwind_SjLj_Resume(_Unwind_Exception *exception_object);
 #else
 extern _Unwind_Reason_Code
-    _Unwind_RaiseException(struct _Unwind_Exception *exception_object);
-extern void _Unwind_Resume(struct _Unwind_Exception *exception_object);
+    _Unwind_RaiseException(_Unwind_Exception *exception_object);
+extern void _Unwind_Resume(_Unwind_Exception *exception_object);
 #endif
-extern void _Unwind_DeleteException(struct _Unwind_Exception *exception_object);
+extern void _Unwind_DeleteException(_Unwind_Exception *exception_object);
+
+#if LIBCXXABI_ARM_EHABI
+typedef enum {
+  _UVRSC_CORE = 0, /* integer register */
+  _UVRSC_VFP = 1, /* vfp */
+  _UVRSC_WMMXD = 3, /* Intel WMMX data register */
+  _UVRSC_WMMXC = 4 /* Intel WMMX control register */
+} _Unwind_VRS_RegClass;
+
+typedef enum {
+  _UVRSD_UINT32 = 0,
+  _UVRSD_VFPX = 1,
+  _UVRSD_UINT64 = 3,
+  _UVRSD_FLOAT = 4,
+  _UVRSD_DOUBLE = 5
+} _Unwind_VRS_DataRepresentation;
+
+typedef enum {
+  _UVRSR_OK = 0,
+  _UVRSR_NOT_IMPLEMENTED = 1,
+  _UVRSR_FAILED = 2
+} _Unwind_VRS_Result;
+
+extern void _Unwind_Complete(_Unwind_Exception* exception_object);
+
+extern _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context* context,
+                                          _Unwind_VRS_RegClass regclass,
+                                          uint32_t regno,
+                                          _Unwind_VRS_DataRepresentation representation,
+                                          void *valuep);
+
+extern _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context* context,
+                                          _Unwind_VRS_RegClass regclass,
+                                          uint32_t regno,
+                                          _Unwind_VRS_DataRepresentation representation,
+                                          void *valuep);
+
+extern _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context,
+                                          _Unwind_VRS_RegClass regclass,
+                                          uint32_t discriminator,
+                                          _Unwind_VRS_DataRepresentation representation);
+
+// TODO(ajwong): This is not part of the EHABI. Decide if the name is right.
+extern _Unwind_Reason_Code _Unwind_VRS_Interpret(_Unwind_Context* context,
+                                                 uint32_t* data,
+                                                 size_t offset,
+                                                 size_t len);
+
+// TODO(ajwong) Should these {Set,Get}/{GR,IP} be removed in favor of
+// VRS_Get/VRS_Set? Is the thumb bit inference in SetIP correct?
+static inline uintptr_t _Unwind_GetGR(struct _Unwind_Context* context,
+                                      int index) {
+  uintptr_t value = 0;
+  _Unwind_VRS_Get(context, _UVRSC_CORE, (uint32_t)index, _UVRSD_UINT32, &value);
+  return value;
+}
+
+static inline void _Unwind_SetGR(struct _Unwind_Context* context, int index,
+                                 uintptr_t new_value) {
+  _Unwind_VRS_Set(context, _UVRSC_CORE, (uint32_t)index,
+                  _UVRSD_UINT32, &new_value);
+}
+
+static inline uintptr_t _Unwind_GetIP(struct _Unwind_Context* context) {
+  // remove the thumb-bit before returning
+  return (_Unwind_GetGR(context, 15) & (~(uintptr_t)0x1));
+}
+
+static inline void _Unwind_SetIP(struct _Unwind_Context* context,
+                                 uintptr_t new_value) {
+  uintptr_t thumb_bit = _Unwind_GetGR(context, 15) & ((uintptr_t)0x1);
+  _Unwind_SetGR(context, 15, new_value | thumb_bit);
+}
+#else // LIBCXXABI_ARM_EHABI
 extern uintptr_t _Unwind_GetGR(struct _Unwind_Context *context, int index);
 extern void _Unwind_SetGR(struct _Unwind_Context *context, int index,
                           uintptr_t new_value);
 extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *context);
 extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t new_value);
+#endif // LIBCXXABI_ARM_EHABI
+
 extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context);
 extern uintptr_t
     _Unwind_GetLanguageSpecificData(struct _Unwind_Context *context);
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
 extern _Unwind_Reason_Code
-    _Unwind_SjLj_ForcedUnwind(struct _Unwind_Exception *exception_object,
+    _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *exception_object,
                               _Unwind_Stop_Fn stop, void *stop_parameter);
-#else
+#else // !__USING_SJLJ_EXCEPTIONS__
 extern _Unwind_Reason_Code
-    _Unwind_ForcedUnwind(struct _Unwind_Exception *exception_object,
+    _Unwind_ForcedUnwind(_Unwind_Exception *exception_object,
                          _Unwind_Stop_Fn stop, void *stop_parameter);
-#endif
+#endif // !__USING_SJLJ_EXCEPTIONS__
 
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
 typedef struct _Unwind_FunctionContext *_Unwind_FunctionContext_t;
 extern void _Unwind_SjLj_Register(_Unwind_FunctionContext_t fc);
 extern void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t fc);
@@ -118,12 +271,12 @@
 //
 //  called by __cxa_rethrow().
 //
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
 extern _Unwind_Reason_Code
-    _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *exception_object);
+    _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *exception_object);
 #else
 extern _Unwind_Reason_Code
-    _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *exception_object);
+    _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object);
 #endif
 
 // _Unwind_Backtrace() is a gcc extension that walks the stack and calls the
@@ -181,28 +334,28 @@
 // Mac OS X does not support text-rel and data-rel addressing so these functions
 // are unimplemented
 extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *context)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *context)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 
 // Mac OS X 10.4 and 10.5 had implementations of these functions in
 // libgcc_s.dylib, but they never worked.  
 /// These functions are no longer available on Mac OS X.
 extern void __register_frame_info_bases(const void *fde, void *ob, void *tb,
-                                        void *db) __attribute__((unavailable));
+                                        void *db) LIBUNWIND_UNAVAIL;
 extern void __register_frame_info(const void *fde, void *ob)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern void __register_frame_info_table_bases(const void *fde, void *ob,
                                               void *tb, void *db)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern void __register_frame_info_table(const void *fde, void *ob)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern void __register_frame_table(const void *fde)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern void *__deregister_frame_info(const void *fde)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 extern void *__deregister_frame_info_bases(const void *fde)
-    __attribute__((unavailable));
+    LIBUNWIND_UNAVAIL;
 
 #ifdef __cplusplus
 }
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/lib/buildit b/sources/cxx-stl/llvm-libc++abi/libcxxabi/lib/buildit
new file mode 100755
index 0000000..ea4359d
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/lib/buildit
@@ -0,0 +1,159 @@
+#! /bin/sh
+#
+# Set the $TRIPLE environment variable to your system's triple before
+# running this script.  If you set $CXX, that will be used to compile
+# the library.  Otherwise we'll use clang++.
+
+set -e
+
+if [ `basename $(pwd)` != "lib" ]
+then
+	echo "current directory must be lib"
+	exit 1
+fi
+
+if [ -z "$CXX" ]
+then
+	CXX=clang++
+fi
+
+if [ -z "$CC" ]
+then
+    CC=clang
+fi
+
+if [ -z "$AR" ]
+then
+    AR=ar
+fi
+
+if [ -z "$RANLIB" ]
+then
+    RANLIB=ranlib
+fi
+
+if [ -z "$AR" ]
+then
+    AR=ar
+fi
+
+if [ -z "$RANLIB" ]
+then
+    RANLIB=ranlib
+fi
+
+if [ -z $RC_ProjectSourceVersion ]
+then
+  RC_ProjectSourceVersion=1
+fi
+
+EXTRA_CC_FLAGS="-std=c11"
+EXTRA_CXX_FLAGS="-std=c++11 -stdlib=libc++"
+EXTRA_FLAGS="-fstrict-aliasing -Wstrict-aliasing=2 \
+             -Wsign-conversion -Wshadow -Wconversion -Wunused-variable \
+             -Wmissing-field-initializers -Wchar-subscripts -Wmismatched-tags \
+             -Wmissing-braces -Wshorten-64-to-32 -Wsign-compare \
+             -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter \
+             -Wnewline-eof"
+
+case $TRIPLE in
+  *-apple-*)
+    if [ -z $RC_XBS ]
+    then
+      RC_CFLAGS="-arch i386 -arch x86_64"
+    fi
+    SOEXT=dylib
+    if [ -n "$SDKROOT" ]
+    then
+        EXTRA_CXX_FLAGS+="-isysroot ${SDKROOT}"
+        CXX=`xcrun -sdk "${SDKROOT}"  -find clang++`
+        CC=`xcrun -sdk "${SDKROOT}"  -find clang`
+    fi
+    LDSHARED_FLAGS="-o libc++abi.dylib \
+        -dynamiclib -nodefaultlibs  \
+        -current_version ${RC_ProjectSourceVersion} \
+        -compatibility_version 1 \
+        -install_name /usr/lib/libc++abi.dylib \
+        -lSystem"
+	if [ -f "${SDKROOT}/usr/local/lib/libCrashReporterClient.a" ]
+	then
+		LDSHARED_FLAGS+=" -lCrashReporterClient"
+	fi
+    ;;
+  *-*-mingw*)
+    # FIXME: removing libgcc and libsupc++ dependencies means porting libcxxrt and LLVM/compiler-rt
+    SOEXT=dll
+    LDSHARED_FLAGS="-o libc++abi.dll \
+        -shared -nodefaultlibs -Wl,--export-all-symbols -Wl,--allow-multiple-definition -Wl,--out-implib,libc++abi.dll.a \
+        -lsupc++ -lpthread -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcr100 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt"
+	;;
+  *-none-eabi*)
+    RC_CFLAGS="-fPIC"
+    SOEXT=so
+    EXTRA_FLAGS+=" -target $TRIPLE --sysroot=$SYSROOT -no-integrated-as -funwind-tables -DLIBCXXABI_BARE_METAL=1"
+  ;;
+  *)
+    RC_CFLAGS="-fPIC"
+    SOEXT=so
+    LDSHARED_FLAGS="-o libc++abi.so.1.0 \
+        -shared -nodefaultlibs -Wl,-soname,libc++abi.so.1 \
+        -lpthread -lrt -lc -lstdc++"
+    ;;
+esac
+
+if [ -z $RC_XBS ]
+then
+    rm -f libc++abi.1.$SOEXT*
+fi
+
+set -x
+
+# Build the generic bits
+for FILE in ../src/*.cpp; do
+  $CXX -c -g -O0 $RC_CFLAGS $EXTRA_CXX_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+done
+case $TRIPLE in
+  *-*-mingw*)
+    for FILE in ../src/support/win32/*.cpp; do
+      $CXX -c -g -O0 $RC_CFLAGS $EXTRA_CXX_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+    done
+    ;;
+  *-apple-*)
+    for FILE in ../src/support/apple/*.cpp; do
+      $CXX -c -g -O0 $RC_CFLAGS $EXTRA_CXX_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+    done
+    ;;
+  *)
+    ;;
+esac
+
+# Build the Unwinder
+case $TRIPLE in
+  *-none-eabi*)
+    for FILE in ../src/Unwind/*.S; do
+      $CC -c -g -O0 $RC_CFLAGS $EXTRA_CC_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+    done
+    for FILE in ../src/Unwind/*.c; do
+      $CC -c -g -O0 $RC_CFLAGS $EXTRA_CC_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+    done
+    for FILE in ../src/Unwind/*.cpp; do
+      $CXX -c -g -O0 $RC_CFLAGS $EXTRA_CXX_FLAGS $EXTRA_FLAGS -I../include $OPTIONS $FILE
+    done
+  ;;
+esac
+
+# Package everything up in a library (shared or static)
+case $TRIPLE in
+  *-none-eabi*)
+    $AR rc libc++abi.a *.o
+    $RANLIB libc++abi.a
+  ;;
+  *)
+    $CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_CXX_FLAGS $EXTRA_FLAGS
+  ;;
+esac
+
+if [ -z $RC_XBS ]
+then
+    rm *.o
+fi
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/AddressSpace.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/AddressSpace.hpp
index 9efe8bf..857dc16 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/AddressSpace.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/AddressSpace.hpp
@@ -16,10 +16,27 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+
+#if !_LIBUNWIND_IS_BAREMETAL
 #include <dlfcn.h>
+#if defined(__ANDROID__) && !__LP64__
+// dladdr only exits in API >= 8. Call to our my_dladdr in android/support for dynamic lookup
+#if __ANDROID_API__ < 8
+typedef struct {
+    const char *dli_fname;  /* Pathname of shared object that contains address */
+    void       *dli_fbase;  /* Address at which shared object is loaded */
+    const char *dli_sname;  /* Name of nearest symbol with address lower than addr */
+    void       *dli_saddr;  /* Exact address of symbol named in dli_sname */
+} Dl_info;
+#endif // __ANDROID_API__ >= 8
+extern "C" int my_dladdr(const void* addr, Dl_info *info);
+#define dladdr  my_dladdr
+#endif
+#endif
 
 #if __APPLE__
-#include <mach-o/dyld_priv.h>
+#include <mach-o/getsect.h>
 namespace libunwind {
    bool checkKeyMgrRegisteredFDEs(uintptr_t targetAddr, void *&fde);
 }
@@ -30,23 +47,55 @@
 #include "dwarf2.h"
 #include "Registers.hpp"
 
+#if LIBCXXABI_ARM_EHABI
+#if __LINUX__
+ // Emulate the BSD dl_unwind_find_exidx API when on a GNU libdl system.
+ typedef long unsigned int *_Unwind_Ptr;
+ extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr targetAddr, int *length);
+ _Unwind_Ptr (*dl_unwind_find_exidx)(_Unwind_Ptr targetAddr, int *length) =
+     __gnu_Unwind_Find_exidx;
+#else
+ #include <link.h>
+#endif
+#endif  // LIBCXXABI_ARM_EHABI
+
+#if LIBCXXABI_ARM_EHABI && _LIBUNWIND_IS_BAREMETAL
+// When statically linked on bare-metal, the symbols for the EH table are looked
+// up without going through the dynamic loader.
+// TODO(jroelofs): since Newlib on arm-none-eabi doesn't
+//                 have dl_unwind_find_exidx...
+struct EHTEntry {
+  uint32_t functionOffset;
+  uint32_t unwindOpcodes;
+};
+extern EHTEntry __exidx_start;
+extern EHTEntry __exidx_end;
+#endif
+
 namespace libunwind {
 
 /// Used by findUnwindSections() to return info about needed sections.
 struct UnwindInfoSections {
-  uintptr_t        dso_base;
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
+  uintptr_t       dso_base;
   uintptr_t       dwarf_section;
   uintptr_t       dwarf_section_length;
 #endif
 #if _LIBUNWIND_SUPPORT_DWARF_INDEX
+  uintptr_t       dso_base;
   uintptr_t       dwarf_index_section;
   uintptr_t       dwarf_index_section_length;
 #endif
 #if _LIBUNWIND_SUPPORT_COMPACT_UNWIND
+  uintptr_t       dso_base;
   uintptr_t       compact_unwind_section;
   uintptr_t       compact_unwind_section_length;
 #endif
+#if LIBCXXABI_ARM_EHABI
+  // No dso_base for ARM EHABI.
+  uintptr_t       arm_section;
+  uintptr_t       arm_section_length;
+#endif
 };
 
 
@@ -62,12 +111,36 @@
   typedef uint32_t pint_t;
   typedef int32_t  sint_t;
 #endif
-  uint8_t         get8(pint_t addr)      { return *((uint8_t *)addr); }
-  uint16_t        get16(pint_t addr)     { return *((uint16_t *)addr); }
-  uint32_t        get32(pint_t addr)     { return *((uint32_t *)addr); }
-  uint64_t        get64(pint_t addr)     { return *((uint64_t *)addr); }
-  double          getDouble(pint_t addr) { return *((double *)addr); }
-  v128            getVector(pint_t addr) { return *((v128 *)addr); }
+  uint8_t         get8(pint_t addr) {
+    uint8_t val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
+  uint16_t         get16(pint_t addr) {
+    uint16_t val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
+  uint32_t         get32(pint_t addr) {
+    uint32_t val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
+  uint64_t         get64(pint_t addr) {
+    uint64_t val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
+  double           getDouble(pint_t addr) {
+    double val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
+  v128             getVector(pint_t addr) {
+    v128 val;
+    memcpy(&val, (void *)addr, sizeof(val));
+    return val;
+  }
   uintptr_t       getP(pint_t addr);
   static uint64_t getULEB128(pint_t &addr, pint_t end);
   static int64_t  getSLEB128(pint_t &addr, pint_t end);
@@ -81,7 +154,6 @@
   static LocalAddressSpace sThisAddressSpace;
 };
 
-
 inline uintptr_t LocalAddressSpace::getP(pint_t addr) {
 #if __LP64__
   return get64(addr);
@@ -172,12 +244,14 @@
     result = (pint_t)getSLEB128(addr, end);
     break;
   case DW_EH_PE_sdata2:
-    result = (uint16_t)get16(addr);
+    // Sign extend from signed 16-bit value.
+    result = (pint_t)(int16_t)get16(addr);
     p += 2;
     addr = (pint_t) p;
     break;
   case DW_EH_PE_sdata4:
-    result = (uint32_t)get32(addr);
+    // Sign extend from signed 32-bit value.
+    result = (pint_t)(int32_t)get32(addr);
     p += 4;
     addr = (pint_t) p;
     break;
@@ -221,6 +295,48 @@
   return result;
 }
 
+#if __APPLE__ 
+  struct dyld_unwind_sections
+  {
+    const struct mach_header*   mh;
+    const void*                 dwarf_section;
+    uintptr_t                   dwarf_section_length;
+    const void*                 compact_unwind_section;
+    uintptr_t                   compact_unwind_section_length;
+  };
+  #if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
+                                 && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)) \
+      || defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+    // In 10.7.0 or later, libSystem.dylib implements this function.
+    extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *);
+  #else
+    // In 10.6.x and earlier, we need to implement this functionality.
+    static inline bool _dyld_find_unwind_sections(void* addr, 
+                                                    dyld_unwind_sections* info) {
+      // Find mach-o image containing address.
+      Dl_info dlinfo;
+      if (!dladdr(addr, &dlinfo))
+        return false;
+      const mach_header *mh = (const mach_header *)dlinfo.dli_saddr;
+      
+      // Find dwarf unwind section in that image.
+      unsigned long size;
+      const uint8_t *p = getsectiondata(mh, "__TEXT", "__eh_frame", &size);
+      if (!p)
+        return false;
+      
+      // Fill in return struct.
+      info->mh = mh;
+      info->dwarf_section = p;
+      info->dwarf_section_length = size;
+      info->compact_unwind_section = 0;
+      info->compact_unwind_section_length = 0;
+     
+      return true;
+    }
+  #endif
+#endif
+
 inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr,
                                                   UnwindInfoSections &info) {
 #if __APPLE__
@@ -235,9 +351,21 @@
     info.compact_unwind_section_length = dyldInfo.compact_unwind_section_length;
     return true;
   }
-#else
-  // TO DO
-
+#elif LIBCXXABI_ARM_EHABI
+ #if !_LIBUNWIND_IS_BAREMETAL
+  int length = 0;
+  info.arm_section = (uintptr_t) dl_unwind_find_exidx(
+      (_Unwind_Ptr) targetAddr, &length);
+  info.arm_section_length = length;
+ #else
+  // Bare metal, statically linked
+  info.arm_section =        (uintptr_t)(&__exidx_start);
+  info.arm_section_length = (uintptr_t)(&__exidx_end - &__exidx_start);
+ #endif
+  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %X length %x\n",
+                             info.arm_section, info.arm_section_length);
+  if (info.arm_section && info.arm_section_length)
+    return true;
 #endif
 
   return false;
@@ -256,7 +384,8 @@
 inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf,
                                                 size_t bufLen,
                                                 unw_word_t *offset) {
-  dl_info dyldInfo;
+#if !_LIBUNWIND_IS_BAREMETAL
+  Dl_info dyldInfo;
   if (dladdr((void *)addr, &dyldInfo)) {
     if (dyldInfo.dli_sname != NULL) {
       strlcpy(buf, dyldInfo.dli_sname, bufLen);
@@ -264,6 +393,7 @@
       return true;
     }
   }
+#endif
   return false;
 }
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfInstructions.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfInstructions.hpp
index 158bad8..dbce2e8 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfInstructions.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfInstructions.hpp
@@ -63,33 +63,17 @@
   static v128 getSavedVectorRegister(A &addressSpace, const R &registers,
                                   pint_t cfa, const RegisterLocation &savedReg);
 
-  // x86 specific variants
-  static int lastRestoreReg(const Registers_x86 &);
-  static bool isReturnAddressRegister(int regNum, const Registers_x86 &);
   static pint_t getCFA(A &addressSpace, const PrologInfo &prolog,
-                       const Registers_x86 &);
-
-  // x86_64 specific variants
-  static int lastRestoreReg(const Registers_x86_64 &);
-  static bool isReturnAddressRegister(int regNum, const Registers_x86_64 &);
-  static pint_t getCFA(A &addressSpace,
-                       const PrologInfo &prolog,
-                       const Registers_x86_64 &);
-
-  // ppc specific variants
-  static int lastRestoreReg(const Registers_ppc &);
-  static bool isReturnAddressRegister(int regNum, const Registers_ppc &);
-  static pint_t getCFA(A &addressSpace,
-                       const PrologInfo &prolog,
-                       const Registers_ppc &);
-
-  // arm64 specific variants
-  static bool isReturnAddressRegister(int regNum, const Registers_arm64 &);
-  static int lastRestoreReg(const Registers_arm64 &);
-  static pint_t getCFA(A &addressSpace,
-                       const PrologInfo &prolog,
-                       const Registers_arm64 &);
-
+                       const R &registers) {
+    if (prolog.cfaRegister != 0)
+      return (pint_t)((sint_t)registers.getRegister((int)prolog.cfaRegister) +
+             prolog.cfaRegisterOffset);
+    if (prolog.cfaExpression != 0)
+      return evaluateExpression((pint_t)prolog.cfaExpression, addressSpace, 
+                                registers, 0);
+    assert(0 && "getCFA(): unknown location");
+    __builtin_unreachable();
+  }
 };
 
 
@@ -177,17 +161,21 @@
     PrologInfo prolog;
     if (CFI_Parser<A>::parseFDEInstructions(addressSpace, fdeInfo, cieInfo, pc,
                                                                      &prolog)) {
-      R newRegisters = registers;
-
       // get pointer to cfa (architecture specific)
       pint_t cfa = getCFA(addressSpace, prolog, registers);
 
-      // restore registers that dwarf says were saved
+       // restore registers that dwarf says were saved
+      R newRegisters = registers;
       pint_t returnAddress = 0;
-      for (int i = 0; i <= lastRestoreReg(newRegisters); ++i) {
-        if (prolog.savedRegisters[i].location !=
-            CFI_Parser<A>::kRegisterUnused) {
-          if (registers.validFloatRegister(i))
+      const int lastReg = R::lastDwarfRegNum();
+      assert((int)CFI_Parser<A>::kMaxRegisterNumber > lastReg
+                                                && "register range too large");
+      assert(lastReg <= (int)cieInfo.returnAddressRegister
+                 && "register range does not contain return address register");
+      for (int i = 0; i <= lastReg; ++i) {
+         if (prolog.savedRegisters[i].location !=
+             CFI_Parser<A>::kRegisterUnused) {
+           if (registers.validFloatRegister(i))
             newRegisters.setFloatRegister(
                 i, getSavedFloatRegister(addressSpace, registers, cfa,
                                          prolog.savedRegisters[i]));
@@ -195,7 +183,7 @@
             newRegisters.setVectorRegister(
                 i, getSavedVectorRegister(addressSpace, registers, cfa,
                                           prolog.savedRegisters[i]));
-          else if (isReturnAddressRegister(i, registers))
+          else if (i == (int)cieInfo.returnAddressRegister)
             returnAddress = getSavedRegister(addressSpace, registers, cfa,
                                              prolog.savedRegisters[i]);
           else if (registers.validRegister(i))
@@ -764,123 +752,6 @@
   return *sp;
 }
 
-//
-//  x86_64 specific functions
-//
-template <typename A, typename R>
-int DwarfInstructions<A, R>::lastRestoreReg(const Registers_x86_64 &) {
-  static_assert((int)CFI_Parser<A>::kMaxRegisterNumber
-              > (int)DW_X86_64_RET_ADDR, "register number out of range");
-  return DW_X86_64_RET_ADDR;
-}
-
-template <typename A, typename R>
-bool
-DwarfInstructions<A, R>::isReturnAddressRegister(int regNum,
-                                                 const Registers_x86_64 &) {
-  return (regNum == DW_X86_64_RET_ADDR);
-}
-
-template <typename A, typename R>
-typename A::pint_t DwarfInstructions<A, R>::getCFA(
-    A &addressSpace, const PrologInfo &prolog,
-    const Registers_x86_64 &registers) {
-  if (prolog.cfaRegister != 0)
-    return (pint_t)((sint_t)registers.getRegister((int)prolog.cfaRegister)
-                                                    + prolog.cfaRegisterOffset);
-  else if (prolog.cfaExpression != 0)
-    return evaluateExpression((pint_t)prolog.cfaExpression, addressSpace, registers, 0);
-  else
-    _LIBUNWIND_ABORT("getCFA(): unknown location for x86_64 cfa");
-}
-
-
-//
-//  x86 specific functions
-//
-template <typename A, typename R>
-int DwarfInstructions<A, R>::lastRestoreReg(const Registers_x86 &) {
-  static_assert((int)CFI_Parser<A>::kMaxRegisterNumber
-              > (int)DW_X86_RET_ADDR, "register number out of range");
-  return DW_X86_RET_ADDR;
-}
-
-template <typename A, typename R>
-bool DwarfInstructions<A, R>::isReturnAddressRegister(int regNum,
-                                                      const Registers_x86 &) {
-  return (regNum == DW_X86_RET_ADDR);
-}
-
-template <typename A, typename R>
-typename A::pint_t DwarfInstructions<A, R>::getCFA(
-    A &addressSpace, const PrologInfo &prolog,
-    const Registers_x86 &registers) {
-  if (prolog.cfaRegister != 0)
-    return (pint_t)((sint_t)registers.getRegister((int)prolog.cfaRegister)
-                                                    + prolog.cfaRegisterOffset);
-  else if (prolog.cfaExpression != 0)
-    return evaluateExpression((pint_t)prolog.cfaExpression, addressSpace,
-                                                                  registers, 0);
-  else
-    _LIBUNWIND_ABORT("getCFA(): unknown location for x86 cfa");
-}
-
-
-//
-//  ppc specific functions
-//
-template <typename A, typename R>
-int DwarfInstructions<A, R>::lastRestoreReg(const Registers_ppc &) {
-  static_assert((int)CFI_Parser<A>::kMaxRegisterNumber
-              > (int)UNW_PPC_SPEFSCR, "register number out of range");
-  return UNW_PPC_SPEFSCR;
-}
-
-template <typename A, typename R>
-bool DwarfInstructions<A, R>::isReturnAddressRegister(int regNum,
-                                                      const Registers_ppc &) {
-  return (regNum == UNW_PPC_LR);
-}
-
-template <typename A, typename R>
-typename A::pint_t DwarfInstructions<A, R>::getCFA(
-    A &addressSpace, const PrologInfo &prolog,
-    const Registers_ppc &registers) {
-  if (prolog.cfaRegister != 0)
-    return registers.getRegister(prolog.cfaRegister) + prolog.cfaRegisterOffset;
-  else if (prolog.cfaExpression != 0)
-    return evaluateExpression((pint_t)prolog.cfaExpression, addressSpace,
-                                                                  registers, 0);
-  else
-    _LIBUNWIND_ABORT("getCFA(): unknown location for ppc cfa");
-}
-
-
-
-//
-// arm64 specific functions
-//
-template <typename A, typename R>
-bool DwarfInstructions<A, R>::isReturnAddressRegister(int regNum,
-                                                      const Registers_arm64 &) {
-  return (regNum == UNW_ARM64_LR);
-}
-
-template <typename A, typename R>
-int DwarfInstructions<A, R>::lastRestoreReg(const Registers_arm64 &) {
-  static_assert((int)CFI_Parser<A>::kMaxRegisterNumber
-              > (int)UNW_ARM64_D31, "register number out of range");
-  return UNW_ARM64_D31;
-}
-
-template <typename A, typename R>
-typename A::pint_t DwarfInstructions<A, R>::getCFA(A&, const PrologInfo &prolog,
-                                             const Registers_arm64 &registers) {
-  if (prolog.cfaRegister != 0)
-    return registers.getRegister(prolog.cfaRegister) + prolog.cfaRegisterOffset;
-  else
-    _LIBUNWIND_ABORT("getCFA(): unsupported location for arm64 cfa");
-}
 
 
 } // namespace libunwind
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfParser.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfParser.hpp
index 152baab..2ba0c9c 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfParser.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/DwarfParser.hpp
@@ -49,6 +49,7 @@
     int       dataAlignFactor;
     bool      isSignalFrame;
     bool      fdesHaveAugmentationData;
+    uint8_t   returnAddressRegister;
   };
 
   /// Information about an FDE (Frame Description Entry)
@@ -149,7 +150,7 @@
   if (cieInfo->fdesHaveAugmentationData) {
     pint_t augLen = (pint_t)addressSpace.getULEB128(p, nextCFI);
     pint_t endOfAug = p + augLen;
-    if (cieInfo->lsdaEncoding != 0) {
+    if (cieInfo->lsdaEncoding != DW_EH_PE_omit) {
       // peek at value (without indirection).  Zero means no lsda
       pint_t lsdaStart = p;
       if (addressSpace.getEncodedP(p, nextCFI, cieInfo->lsdaEncoding & 0x0F) !=
@@ -216,7 +217,7 @@
             if (cieInfo->fdesHaveAugmentationData) {
               pint_t augLen = (pint_t)addressSpace.getULEB128(p, nextCFI);
               pint_t endOfAug = p + augLen;
-              if (cieInfo->lsdaEncoding != 0) {
+              if (cieInfo->lsdaEncoding != DW_EH_PE_omit) {
                 // peek at value (without indirection).  Zero means no lsda
                 pint_t lsdaStart = p;
                 if (addressSpace.getEncodedP(
@@ -255,7 +256,7 @@
 const char *CFI_Parser<A>::parseCIE(A &addressSpace, pint_t cie,
                                     CIE_Info *cieInfo) {
   cieInfo->pointerEncoding = 0;
-  cieInfo->lsdaEncoding = 0;
+  cieInfo->lsdaEncoding = DW_EH_PE_omit;
   cieInfo->personalityEncoding = 0;
   cieInfo->personalityOffsetInCIE = 0;
   cieInfo->personality = 0;
@@ -295,7 +296,9 @@
   // parse data alignment factor
   cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd);
   // parse return address register
-  addressSpace.getULEB128(p, cieContentEnd);
+  uint64_t raReg = addressSpace.getULEB128(p, cieContentEnd);
+  assert(raReg < 255 && "return address register too large");
+  cieInfo->returnAddressRegister = (uint8_t)raReg;
   // parse augmentation data based on augmentation string
   const char *result = NULL;
   if (addressSpace.get8(strStart) == 'z') {
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Registers.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Registers.hpp
index a0050dd..8c1acfc 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Registers.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Registers.hpp
@@ -15,6 +15,7 @@
 
 #include <stdint.h>
 #include <strings.h>
+#include <string.h>
 
 #include "libunwind.h"
 #include "config.h"
@@ -43,6 +44,7 @@
   void        setVectorRegister(int num, v128 value);
   const char *getRegisterName(int num);
   void        jumpto();
+  static int  lastDwarfRegNum() { return 8; }
 
   uint32_t  getSP() const          { return _registers.__esp; }
   void      setSP(uint32_t value)  { _registers.__esp = value; }
@@ -91,7 +93,7 @@
 }
 
 inline Registers_x86::Registers_x86() {
-  bzero(&_registers, sizeof(_registers));
+  memset(&_registers, 0, sizeof(_registers));
 }
 
 inline bool Registers_x86::validRegister(int regNum) const {
@@ -230,6 +232,7 @@
   void        setVectorRegister(int num, v128 value);
   const char *getRegisterName(int num);
   void        jumpto();
+  static int  lastDwarfRegNum() { return 16; }
 
   uint64_t  getSP() const          { return _registers.__rsp; }
   void      setSP(uint64_t value)  { _registers.__rsp = value; }
@@ -282,7 +285,7 @@
 }
 
 inline Registers_x86_64::Registers_x86_64() {
-  bzero(&_registers, sizeof(_registers));
+  memset(&_registers, 0, sizeof(_registers));
 }
 
 inline bool Registers_x86_64::validRegister(int regNum) const {
@@ -477,6 +480,7 @@
   void        setVectorRegister(int num, v128 value);
   const char *getRegisterName(int num);
   void        jumpto();
+  static int  lastDwarfRegNum() { return 112; }
 
   uint64_t  getSP() const         { return _registers.__r1; }
   void      setSP(uint32_t value) { _registers.__r1 = value; }
@@ -548,9 +552,9 @@
 }
 
 inline Registers_ppc::Registers_ppc() {
-  bzero(&_registers, sizeof(_registers));
-  bzero(&_floatRegisters, sizeof(_floatRegisters));
-  bzero(&_vectorRegisters, sizeof(_vectorRegisters));
+  memset(&_registers, 0, sizeof(_registers));
+  memset(&_floatRegisters, 0, sizeof(_floatRegisters));
+  memset(&_vectorRegisters, 0, sizeof(_vectorRegisters));
 }
 
 inline bool Registers_ppc::validRegister(int regNum) const {
@@ -1030,6 +1034,7 @@
   void        setVectorRegister(int num, v128 value);
   const char *getRegisterName(int num);
   void        jumpto();
+  static int  lastDwarfRegNum() { return 95; }
 
   uint64_t  getSP() const         { return _registers.__sp; }
   void      setSP(uint64_t value) { _registers.__sp = value; }
@@ -1065,8 +1070,8 @@
 }
 
 inline Registers_arm64::Registers_arm64() {
-  bzero(&_registers, sizeof(_registers));
-  bzero(&_registers, sizeof(_vectorHalfRegisters));
+  memset(&_registers, 0, sizeof(_registers));
+  memset(&_vectorHalfRegisters, 0, sizeof(_vectorHalfRegisters));
 }
 
 inline bool Registers_arm64::validRegister(int regNum) const {
@@ -1273,6 +1278,428 @@
   _LIBUNWIND_ABORT("no arm64 vector register support yet");
 }
 
+/// Registers_arm holds the register state of a thread in a 32-bit arm
+/// process.
+///
+/// NOTE: Assumes VFPv3. On ARM processors without a floating point unit,
+/// this uses more memory than required.
+class _LIBUNWIND_HIDDEN Registers_arm {
+public:
+  Registers_arm();
+  Registers_arm(const void *registers);
+
+  bool        validRegister(int num) const;
+  uint32_t    getRegister(int num);
+  void        setRegister(int num, uint32_t value);
+  bool        validFloatRegister(int num) const;
+  unw_fpreg_t getFloatRegister(int num);
+  void        setFloatRegister(int num, unw_fpreg_t value);
+  bool        validVectorRegister(int num) const;
+  v128        getVectorRegister(int num) const;
+  void        setVectorRegister(int num, v128 value);
+  const char *getRegisterName(int num);
+  void        jumpto() {
+    restoreSavedFloatRegisters();
+    restoreCoreAndJumpTo();
+  }
+
+  uint32_t  getSP() const         { return _registers.__sp; }
+  void      setSP(uint32_t value) { _registers.__sp = value; }
+  uint32_t  getIP() const         { return _registers.__pc; }
+  void      setIP(uint32_t value) { _registers.__pc = value; }
+
+  void saveVFPAsX() {
+    assert(_use_X_for_vfp_save || !_saved_vfp_d0_d15);
+    _use_X_for_vfp_save = true;
+  }
+
+  void restoreSavedFloatRegisters() {
+    if (_saved_vfp_d0_d15) {
+      if (_use_X_for_vfp_save)
+        restoreVFPWithFLDMX(_vfp_d0_d15_pad);
+      else
+        restoreVFPWithFLDMD(_vfp_d0_d15_pad);
+    }
+    if (_saved_vfp_d16_d31)
+      restoreVFPv3(_vfp_d16_d31);
+    if (_saved_iwmmx)
+      restoreiWMMX(_iwmmx);
+    if (_saved_iwmmx_control)
+      restoreiWMMXControl(_iwmmx_control);
+  }
+
+private:
+  struct GPRs {
+    uint32_t __r[13]; // r0-r12
+    uint32_t __sp;    // Stack pointer r13
+    uint32_t __lr;    // Link register r14
+    uint32_t __pc;    // Program counter r15
+  };
+
+  static void saveVFPWithFSTMD(unw_fpreg_t*);
+  static void saveVFPWithFSTMX(unw_fpreg_t*);
+  static void saveVFPv3(unw_fpreg_t*);
+  static void saveiWMMX(unw_fpreg_t*);
+  static void saveiWMMXControl(uint32_t*);
+  static void restoreVFPWithFLDMD(unw_fpreg_t*);
+  static void restoreVFPWithFLDMX(unw_fpreg_t*);
+  static void restoreVFPv3(unw_fpreg_t*);
+  static void restoreiWMMX(unw_fpreg_t*);
+  static void restoreiWMMXControl(uint32_t*);
+  void restoreCoreAndJumpTo();
+
+  // ARM registers
+  GPRs _registers;
+
+  // We save floating point registers lazily because we can't know ahead of
+  // time which ones are used. See EHABI #4.7.
+
+  // Whether D0-D15 are saved in the FTSMX instead of FSTMD format.
+  //
+  // See EHABI #7.5 that explains how matching instruction sequences for load
+  // and store need to be used to correctly restore the exact register bits.
+  bool _use_X_for_vfp_save;
+  // Whether VFP D0-D15 are saved.
+  bool _saved_vfp_d0_d15;
+  // Whether VFPv3 D16-D31 are saved.
+  bool _saved_vfp_d16_d31;
+  // Whether iWMMX data registers are saved.
+  bool _saved_iwmmx;
+  // Whether iWMMX control registers are saved.
+  bool _saved_iwmmx_control;
+  // VFP registers D0-D15, + padding if saved using FSTMX
+  unw_fpreg_t _vfp_d0_d15_pad[17];
+  // VFPv3 registers D16-D31, always saved using FSTMD
+  unw_fpreg_t _vfp_d16_d31[16];
+  // iWMMX registers
+  unw_fpreg_t _iwmmx[16];
+  // iWMMX control registers
+  uint32_t _iwmmx_control[4];
+};
+
+inline Registers_arm::Registers_arm(const void *registers)
+  : _use_X_for_vfp_save(false),
+    _saved_vfp_d0_d15(false),
+    _saved_vfp_d16_d31(false),
+    _saved_iwmmx(false),
+    _saved_iwmmx_control(false) {
+  static_assert(sizeof(Registers_arm) < sizeof(unw_context_t),
+                    "arm registers do not fit into unw_context_t");
+  // See unw_getcontext() note about data.
+  memcpy(&_registers, registers, sizeof(_registers));
+  memset(&_vfp_d0_d15_pad, 0, sizeof(_vfp_d0_d15_pad));
+  memset(&_vfp_d16_d31, 0, sizeof(_vfp_d16_d31));
+  memset(&_iwmmx, 0, sizeof(_iwmmx));
+  memset(&_iwmmx_control, 0, sizeof(_iwmmx_control));
+}
+
+inline Registers_arm::Registers_arm()
+  : _use_X_for_vfp_save(false),
+    _saved_vfp_d0_d15(false),
+    _saved_vfp_d16_d31(false),
+    _saved_iwmmx(false),
+    _saved_iwmmx_control(false) {
+  memset(&_registers, 0, sizeof(_registers));
+  memset(&_vfp_d0_d15_pad, 0, sizeof(_vfp_d0_d15_pad));
+  memset(&_vfp_d16_d31, 0, sizeof(_vfp_d16_d31));
+  memset(&_iwmmx, 0, sizeof(_iwmmx));
+  memset(&_iwmmx_control, 0, sizeof(_iwmmx_control));
+}
+
+inline bool Registers_arm::validRegister(int regNum) const {
+  // Returns true for all non-VFP registers supported by the EHABI
+  // virtual register set (VRS).
+  if (regNum == UNW_REG_IP)
+    return true;
+  if (regNum == UNW_REG_SP)
+    return true;
+  if (regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R15)
+    return true;
+  if (regNum >= UNW_ARM_WC0 && regNum <= UNW_ARM_WC3)
+    return true;
+  return false;
+}
+
+inline uint32_t Registers_arm::getRegister(int regNum) {
+  if (regNum == UNW_REG_SP || regNum == UNW_ARM_SP)
+    return _registers.__sp;
+  if (regNum == UNW_ARM_LR)
+    return _registers.__lr;
+  if (regNum == UNW_REG_IP || regNum == UNW_ARM_IP)
+    return _registers.__pc;
+  if (regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R12)
+    return _registers.__r[regNum];
+  if (regNum >= UNW_ARM_WC0 && regNum <= UNW_ARM_WC3) {
+    if (!_saved_iwmmx_control) {
+      _saved_iwmmx_control = true;
+      saveiWMMXControl(_iwmmx_control);
+    }
+    return _iwmmx_control[regNum - UNW_ARM_WC0];
+  }
+  _LIBUNWIND_ABORT("unsupported arm register");
+}
+
+inline void Registers_arm::setRegister(int regNum, uint32_t value) {
+  if (regNum == UNW_REG_SP || regNum == UNW_ARM_SP)
+    _registers.__sp = value;
+  else if (regNum == UNW_ARM_LR)
+    _registers.__lr = value;
+  else if (regNum == UNW_REG_IP || regNum == UNW_ARM_IP)
+    _registers.__pc = value;
+  else if (regNum >= UNW_ARM_R0 && regNum <= UNW_ARM_R12)
+    _registers.__r[regNum] = value;
+  else if (regNum >= UNW_ARM_WC0 && regNum <= UNW_ARM_WC3) {
+    if (!_saved_iwmmx_control) {
+      _saved_iwmmx_control = true;
+      saveiWMMXControl(_iwmmx_control);
+    }
+    _iwmmx_control[regNum - UNW_ARM_WC0] = value;
+  } else
+    _LIBUNWIND_ABORT("unsupported arm register");
+}
+
+inline const char *Registers_arm::getRegisterName(int regNum) {
+  switch (regNum) {
+  case UNW_REG_IP:
+  case UNW_ARM_IP: // UNW_ARM_R15 is alias
+    return "pc";
+  case UNW_ARM_LR: // UNW_ARM_R14 is alias
+    return "lr";
+  case UNW_REG_SP:
+  case UNW_ARM_SP: // UNW_ARM_R13 is alias
+    return "sp";
+  case UNW_ARM_R0:
+    return "r0";
+  case UNW_ARM_R1:
+    return "r1";
+  case UNW_ARM_R2:
+    return "r2";
+  case UNW_ARM_R3:
+    return "r3";
+  case UNW_ARM_R4:
+    return "r4";
+  case UNW_ARM_R5:
+    return "r5";
+  case UNW_ARM_R6:
+    return "r6";
+  case UNW_ARM_R7:
+    return "r7";
+  case UNW_ARM_R8:
+    return "r8";
+  case UNW_ARM_R9:
+    return "r9";
+  case UNW_ARM_R10:
+    return "r10";
+  case UNW_ARM_R11:
+    return "r11";
+  case UNW_ARM_R12:
+    return "r12";
+  case UNW_ARM_S0:
+    return "s0";
+  case UNW_ARM_S1:
+    return "s1";
+  case UNW_ARM_S2:
+    return "s2";
+  case UNW_ARM_S3:
+    return "s3";
+  case UNW_ARM_S4:
+    return "s4";
+  case UNW_ARM_S5:
+    return "s5";
+  case UNW_ARM_S6:
+    return "s6";
+  case UNW_ARM_S7:
+    return "s7";
+  case UNW_ARM_S8:
+    return "s8";
+  case UNW_ARM_S9:
+    return "s9";
+  case UNW_ARM_S10:
+    return "s10";
+  case UNW_ARM_S11:
+    return "s11";
+  case UNW_ARM_S12:
+    return "s12";
+  case UNW_ARM_S13:
+    return "s13";
+  case UNW_ARM_S14:
+    return "s14";
+  case UNW_ARM_S15:
+    return "s15";
+  case UNW_ARM_S16:
+    return "s16";
+  case UNW_ARM_S17:
+    return "s17";
+  case UNW_ARM_S18:
+    return "s18";
+  case UNW_ARM_S19:
+    return "s19";
+  case UNW_ARM_S20:
+    return "s20";
+  case UNW_ARM_S21:
+    return "s21";
+  case UNW_ARM_S22:
+    return "s22";
+  case UNW_ARM_S23:
+    return "s23";
+  case UNW_ARM_S24:
+    return "s24";
+  case UNW_ARM_S25:
+    return "s25";
+  case UNW_ARM_S26:
+    return "s26";
+  case UNW_ARM_S27:
+    return "s27";
+  case UNW_ARM_S28:
+    return "s28";
+  case UNW_ARM_S29:
+    return "s29";
+  case UNW_ARM_S30:
+    return "s30";
+  case UNW_ARM_S31:
+    return "s31";
+  case UNW_ARM_D0:
+    return "d0";
+  case UNW_ARM_D1:
+    return "d1";
+  case UNW_ARM_D2:
+    return "d2";
+  case UNW_ARM_D3:
+    return "d3";
+  case UNW_ARM_D4:
+    return "d4";
+  case UNW_ARM_D5:
+    return "d5";
+  case UNW_ARM_D6:
+    return "d6";
+  case UNW_ARM_D7:
+    return "d7";
+  case UNW_ARM_D8:
+    return "d8";
+  case UNW_ARM_D9:
+    return "d9";
+  case UNW_ARM_D10:
+    return "d10";
+  case UNW_ARM_D11:
+    return "d11";
+  case UNW_ARM_D12:
+    return "d12";
+  case UNW_ARM_D13:
+    return "d13";
+  case UNW_ARM_D14:
+    return "d14";
+  case UNW_ARM_D15:
+    return "d15";
+  case UNW_ARM_D16:
+    return "d16";
+  case UNW_ARM_D17:
+    return "d17";
+  case UNW_ARM_D18:
+    return "d18";
+  case UNW_ARM_D19:
+    return "d19";
+  case UNW_ARM_D20:
+    return "d20";
+  case UNW_ARM_D21:
+    return "d21";
+  case UNW_ARM_D22:
+    return "d22";
+  case UNW_ARM_D23:
+    return "d23";
+  case UNW_ARM_D24:
+    return "d24";
+  case UNW_ARM_D25:
+    return "d25";
+  case UNW_ARM_D26:
+    return "d26";
+  case UNW_ARM_D27:
+    return "d27";
+  case UNW_ARM_D28:
+    return "d28";
+  case UNW_ARM_D29:
+    return "d29";
+  case UNW_ARM_D30:
+    return "d30";
+  case UNW_ARM_D31:
+    return "d31";
+  default:
+    return "unknown register";
+  }
+}
+
+inline bool Registers_arm::validFloatRegister(int regNum) const {
+  // NOTE: Consider the intel MMX registers floating points so the
+  // unw_get_fpreg can be used to transmit the 64-bit data back.
+  return ((regNum >= UNW_ARM_D0) && (regNum <= UNW_ARM_D31))
+      || ((regNum >= UNW_ARM_WR0) && (regNum <= UNW_ARM_WR15));
+}
+
+inline unw_fpreg_t Registers_arm::getFloatRegister(int regNum) {
+  if (regNum >= UNW_ARM_D0 && regNum <= UNW_ARM_D15) {
+    if (!_saved_vfp_d0_d15) {
+      _saved_vfp_d0_d15 = true;
+      if (_use_X_for_vfp_save)
+        saveVFPWithFSTMX(_vfp_d0_d15_pad);
+      else
+        saveVFPWithFSTMD(_vfp_d0_d15_pad);
+    }
+    return _vfp_d0_d15_pad[regNum - UNW_ARM_D0];
+  } else if (regNum >= UNW_ARM_D16 && regNum <= UNW_ARM_D31) {
+    if (!_saved_vfp_d16_d31) {
+      _saved_vfp_d16_d31 = true;
+      saveVFPv3(_vfp_d16_d31);
+    }
+    return _vfp_d16_d31[regNum - UNW_ARM_D16];
+  } else if (regNum >= UNW_ARM_WR0 && regNum <= UNW_ARM_WR15) {
+    if (!_saved_iwmmx) {
+      _saved_iwmmx = true;
+      saveiWMMX(_iwmmx);
+    }
+    return _iwmmx[regNum - UNW_ARM_WR0];
+  } else {
+    _LIBUNWIND_ABORT("Unknown ARM float register");
+  }
+}
+
+inline void Registers_arm::setFloatRegister(int regNum, unw_fpreg_t value) {
+  if (regNum >= UNW_ARM_D0 && regNum <= UNW_ARM_D15) {
+    if (!_saved_vfp_d0_d15) {
+      _saved_vfp_d0_d15 = true;
+      if (_use_X_for_vfp_save)
+        saveVFPWithFSTMX(_vfp_d0_d15_pad);
+      else
+        saveVFPWithFSTMD(_vfp_d0_d15_pad);
+    }
+    _vfp_d0_d15_pad[regNum - UNW_ARM_D0] = value;
+  } else if (regNum >= UNW_ARM_D16 && regNum <= UNW_ARM_D31) {
+    if (!_saved_vfp_d16_d31) {
+      _saved_vfp_d16_d31 = true;
+      saveVFPv3(_vfp_d16_d31);
+    }
+    _vfp_d16_d31[regNum - UNW_ARM_D0] = value;
+  } else if (regNum >= UNW_ARM_WR0 && regNum <= UNW_ARM_WR15) {
+    if (!_saved_iwmmx) {
+      _saved_iwmmx = true;
+      saveiWMMX(_iwmmx);
+    }
+    _iwmmx[regNum - UNW_ARM_WR0] = value;
+  } else {
+    _LIBUNWIND_ABORT("Unknown ARM float register");
+  }
+}
+
+inline bool Registers_arm::validVectorRegister(int) const {
+  return false;
+}
+
+inline v128 Registers_arm::getVectorRegister(int) const {
+  _LIBUNWIND_ABORT("ARM vector support not implemented");
+}
+
+inline void Registers_arm::setVectorRegister(int, v128) {
+  _LIBUNWIND_ABORT("ARM vector support not implemented");
+}
+
 } // namespace libunwind
 
 #endif // __REGISTERS_HPP__
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Unwind-EHABI.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Unwind-EHABI.cpp
new file mode 100644
index 0000000..f4619f0
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/Unwind-EHABI.cpp
@@ -0,0 +1,952 @@
+//===--------------------------- Unwind-EHABI.cpp -------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//
+//  Implements ARM zero-cost C++ exceptions
+//
+//===----------------------------------------------------------------------===//
+
+#include <unwind.h>
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "config.h"
+#include "libunwind.h"
+#include "unwind.h"
+#include "../private_typeinfo.h"
+
+#if LIBCXXABI_ARM_EHABI
+namespace {
+
+// Strange order: take words in order, but inside word, take from most to least
+// signinficant byte.
+uint8_t getByte(uint32_t* data, size_t offset) {
+  uint8_t* byteData = reinterpret_cast<uint8_t*>(data);
+  return byteData[(offset & ~0x03) + (3 - (offset&0x03))];
+}
+
+const char* getNextWord(const char* data, uint32_t* out) {
+  *out = *reinterpret_cast<const uint32_t*>(data);
+  return data + 4;
+}
+
+const char* getNextNibble(const char* data, uint32_t* out) {
+  *out = *reinterpret_cast<const uint16_t*>(data);
+  return data + 2;
+}
+
+static inline uint32_t signExtendPrel31(uint32_t data) {
+  return data | ((data & 0x40000000u) << 1);
+}
+
+struct Descriptor {
+   // See # 9.2
+   typedef enum {
+     SU16 = 0, // Short descriptor, 16-bit entries
+     LU16 = 1, // Long descriptor,  16-bit entries
+     LU32 = 3, // Long descriptor,  32-bit entries
+     RESERVED0 =  4, RESERVED1 =  5, RESERVED2  = 6,  RESERVED3  =  7,
+     RESERVED4 =  8, RESERVED5 =  9, RESERVED6  = 10, RESERVED7  = 11,
+     RESERVED8 = 12, RESERVED9 = 13, RESERVED10 = 14, RESERVED11 = 15
+   } Format;
+
+   // See # 9.2
+   typedef enum {
+     CLEANUP = 0x0,
+     FUNC    = 0x1,
+     CATCH   = 0x2,
+     INVALID = 0x4
+   } Kind;
+};
+
+_Unwind_Reason_Code ProcessDescriptors(
+    _Unwind_State state,
+    _Unwind_Control_Block* ucbp,
+    struct _Unwind_Context* context,
+    Descriptor::Format format,
+    const char* descriptorStart,
+    int flags) {
+  // EHT is inlined in the index using compact form. No descriptors. #5
+  if (flags & 0x1)
+    return _URC_CONTINUE_UNWIND;
+
+  const char* descriptor = descriptorStart;
+  uint32_t descriptorWord;
+  getNextWord(descriptor, &descriptorWord);
+  while (descriptorWord) {
+    // Read descriptor based on # 9.2.
+    uint32_t length;
+    uint32_t offset;
+    switch (format) {
+      case Descriptor::LU32:
+        descriptor = getNextWord(descriptor, &length);
+        descriptor = getNextWord(descriptor, &offset);
+      case Descriptor::LU16:
+        descriptor = getNextNibble(descriptor, &length);
+        descriptor = getNextNibble(descriptor, &offset);
+      default:
+        assert(false);
+        return _URC_FAILURE;
+    }
+
+    // See # 9.2 table for decoding the kind of descriptor. It's a 2-bit value.
+    Descriptor::Kind kind =
+        static_cast<Descriptor::Kind>((length & 0x1) | ((offset & 0x1) << 1));
+
+    // Clear off flag from last bit.
+    length &= ~1;
+    offset &= ~1;
+    uintptr_t scopeStart = ucbp->pr_cache.fnstart + offset;
+    uintptr_t scopeEnd = scopeStart + length;
+    uintptr_t pc = _Unwind_GetIP(context);
+    bool isInScope = (scopeStart <= pc) && (pc < scopeEnd);
+
+    switch (kind) {
+      case Descriptor::CLEANUP: {
+        // TODO(ajwong): Handle cleanup descriptors.
+        break;
+      }
+      case Descriptor::FUNC: {
+        // TODO(ajwong): Handle function descriptors.
+        break;
+      }
+      case Descriptor::CATCH: {
+        // Catch descriptors require gobbling one more word.
+        uint32_t landing_pad;
+        descriptor = getNextWord(descriptor, &landing_pad);
+
+        if (isInScope) {
+          // TODO(ajwong): This is only phase1 compatible logic. Implement
+          // phase2.
+          bool is_reference_type = landing_pad & 0x80000000;
+          landing_pad = signExtendPrel31(landing_pad & ~0x80000000);
+          if (landing_pad == 0xffffffff) {
+            return _URC_HANDLER_FOUND;
+          } else if (landing_pad == 0xfffffffe ) {
+            return _URC_FAILURE;
+          } else {
+            void* matched_object;
+            /*
+            if (__cxxabiv1::__cxa_type_match(
+                    ucbp, reinterpret_cast<const std::type_info *>(landing_pad),
+                    is_reference_type,
+                    &matched_object) != __cxxabiv1::ctm_failed)
+                return _URC_HANDLER_FOUND;
+                */
+            _LIBUNWIND_ABORT("Type matching not implemented");
+          }
+        }
+        break;
+      }
+      default:
+        _LIBUNWIND_ABORT("Invalid descriptor kind found.");
+    };
+
+    getNextWord(descriptor, &descriptorWord);
+  }
+
+  return _URC_CONTINUE_UNWIND;
+}
+
+_Unwind_Reason_Code unwindOneFrame(
+    _Unwind_State state,
+    _Unwind_Control_Block* ucbp,
+    struct _Unwind_Context* context) {
+  // Read the compact model EHT entry's header # 6.3
+  uint32_t* unwindingData = ucbp->pr_cache.ehtp;
+  uint32_t unwindInfo = *unwindingData;
+  assert((unwindInfo & 0xf0000000) == 0x80000000 && "Must be a compact entry");
+  Descriptor::Format format =
+      static_cast<Descriptor::Format>((unwindInfo & 0x0f000000) >> 24);
+  size_t len = 0;
+  size_t startOffset = 0;
+  switch (format) {
+    case Descriptor::SU16:
+      len = 4;
+      startOffset = 1;
+      break;
+    case Descriptor::LU16:
+    case Descriptor::LU32:
+      len = 4 + 4 * ((unwindInfo & 0x00ff0000) >> 16);
+      startOffset = 2;
+      break;
+    default:
+      return _URC_FAILURE;
+  }
+
+  // Handle descriptors before unwinding so they are processed in the context
+  // of the correct stack frame.
+  _Unwind_Reason_Code result =
+      ProcessDescriptors(
+          state, ucbp, context, format,
+          reinterpret_cast<const char*>(ucbp->pr_cache.ehtp) + len,
+          ucbp->pr_cache.additional);
+
+  if (result != _URC_CONTINUE_UNWIND)
+    return result;
+
+  return _Unwind_VRS_Interpret(context, unwindingData, startOffset, len);
+}
+
+// Generates mask discriminator for _Unwind_VRS_Pop, e.g. for _UVRSC_CORE /
+// _UVRSD_UINT32.
+uint32_t RegisterMask(uint8_t start, uint8_t count_minus_one) {
+  return ((1U << (count_minus_one + 1)) - 1) << start;
+}
+
+// Generates mask discriminator for _Unwind_VRS_Pop, e.g. for _UVRSC_VFP /
+// _UVRSD_DOUBLE.
+uint32_t RegisterRange(uint8_t start, uint8_t count_minus_one) {
+  return (start << 16) | (count_minus_one + 1);
+}
+
+} // end anonymous namespace
+
+_Unwind_Reason_Code _Unwind_VRS_Interpret(
+    _Unwind_Context* context,
+    uint32_t* data,
+    size_t offset,
+    size_t len) {
+  bool wrotePC = false;
+  bool finish = false;
+  while (offset < len && !finish) {
+    uint8_t byte = getByte(data, offset++);
+    if ((byte & 0x80) == 0) {
+      uint32_t sp;
+      _Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32, &sp);
+      if (byte & 0x40)
+        sp -= ((byte & 0x3f) << 2) + 4;
+      else
+        sp += (byte << 2) + 4;
+      _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32, &sp);
+    } else {
+      switch (byte & 0xf0) {
+        case 0x80: {
+          if (offset >= len)
+            return _URC_FAILURE;
+          uint16_t registers =
+              ((byte & 0x0f) << 12) | (getByte(data, offset++) << 4);
+          if (!registers)
+            return _URC_FAILURE;
+          if (registers & (1<<15))
+            wrotePC = true;
+          _Unwind_VRS_Pop(context, _UVRSC_CORE, registers, _UVRSD_UINT32);
+          break;
+        }
+        case 0x90: {
+          uint8_t reg = byte & 0x0f;
+          if (reg == 13 || reg == 15)
+            return _URC_FAILURE;
+          uint32_t sp;
+          _Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_R0 + reg,
+                          _UVRSD_UINT32, &sp);
+          _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
+                          &sp);
+          break;
+        }
+        case 0xa0: {
+          uint32_t registers = RegisterMask(4, byte & 0x07);
+          if (byte & 0x08)
+            registers |= 1<<14;
+          _Unwind_VRS_Pop(context, _UVRSC_CORE, registers, _UVRSD_UINT32);
+          break;
+        }
+        case 0xb0: {
+          switch (byte) {
+            case 0xb0:
+              finish = true;
+              break;
+            case 0xb1: {
+              if (offset >= len)
+                return _URC_FAILURE;
+              uint8_t registers = getByte(data, offset++);
+              if (registers & 0xf0 || !registers)
+                return _URC_FAILURE;
+              _Unwind_VRS_Pop(context, _UVRSC_CORE, registers, _UVRSD_UINT32);
+              break;
+            }
+            case 0xb2: {
+              uint32_t addend = 0;
+              uint32_t shift = 0;
+              // This decodes a uleb128 value.
+              while (true) {
+                if (offset >= len)
+                  return _URC_FAILURE;
+                uint32_t v = getByte(data, offset++);
+                addend |= (v & 0x7f) << shift;
+                if ((v & 0x80) == 0)
+                  break;
+                shift += 7;
+              }
+              uint32_t sp;
+              _Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
+                              &sp);
+              sp += 0x204 + (addend << 2);
+              _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
+                              &sp);
+              break;
+            }
+            case 0xb3: {
+              uint8_t v = getByte(data, offset++);
+              _Unwind_VRS_Pop(context, _UVRSC_VFP,
+                              RegisterRange(v >> 4, v & 0x0f), _UVRSD_VFPX);
+              break;
+            }
+            case 0xb4:
+            case 0xb5:
+            case 0xb6:
+            case 0xb7:
+              return _URC_FAILURE;
+            default:
+              _Unwind_VRS_Pop(context, _UVRSC_VFP,
+                              RegisterRange(8, byte & 0x07), _UVRSD_VFPX);
+              break;
+          }
+          break;
+        }
+        case 0xc0: {
+          switch (byte) {
+            case 0xc0:
+            case 0xc1:
+            case 0xc2:
+            case 0xc3:
+            case 0xc4:
+            case 0xc5:
+              _Unwind_VRS_Pop(context, _UVRSC_WMMXD,
+                              RegisterRange(10, byte & 0x7), _UVRSD_DOUBLE);
+              break;
+            case 0xc6: {
+              uint8_t v = getByte(data, offset++);
+              uint8_t start = v >> 4;
+              uint8_t count_minus_one = v & 0xf;
+              if (start + count_minus_one >= 16)
+                return _URC_FAILURE;
+              _Unwind_VRS_Pop(context, _UVRSC_WMMXD,
+                              RegisterRange(start, count_minus_one),
+                              _UVRSD_DOUBLE);
+              break;
+            }
+            case 0xc7: {
+              uint8_t v = getByte(data, offset++);
+              if (!v || v & 0xf0)
+                return _URC_FAILURE;
+              _Unwind_VRS_Pop(context, _UVRSC_WMMXC, v, _UVRSD_DOUBLE);
+              break;
+            }
+            case 0xc8:
+            case 0xc9: {
+              uint8_t v = getByte(data, offset++);
+              uint8_t start = ((byte == 0xc8) ? 16 : 0) + (v >> 4);
+              uint8_t count_minus_one = v & 0xf;
+              if (start + count_minus_one >= 32)
+                return _URC_FAILURE;
+              _Unwind_VRS_Pop(context, _UVRSC_VFP,
+                              RegisterRange(start, count_minus_one),
+                              _UVRSD_DOUBLE);
+              break;
+            }
+            default:
+              return _URC_FAILURE;
+          }
+          break;
+        }
+        case 0xd0: {
+          if (byte & 0x08)
+            return _URC_FAILURE;
+          _Unwind_VRS_Pop(context, _UVRSC_VFP, RegisterRange(8, byte & 0x7),
+                          _UVRSD_DOUBLE);
+          break;
+        }
+        default:
+          return _URC_FAILURE;
+      }
+    }
+  }
+  if (!wrotePC) {
+    uint32_t lr;
+    _Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_LR, _UVRSD_UINT32, &lr);
+    _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_IP, _UVRSD_UINT32, &lr);
+  }
+  return _URC_CONTINUE_UNWIND;
+}
+
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr0(
+    _Unwind_State state,
+    _Unwind_Control_Block *ucbp,
+    _Unwind_Context *context) {
+  return unwindOneFrame(state, ucbp, context);
+}
+
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr1(
+    _Unwind_State state,
+    _Unwind_Control_Block *ucbp,
+    _Unwind_Context *context) {
+  return unwindOneFrame(state, ucbp, context);
+}
+
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(
+    _Unwind_State state,
+    _Unwind_Control_Block *ucbp,
+    _Unwind_Context *context) {
+  return unwindOneFrame(state, ucbp, context);
+}
+
+static _Unwind_Reason_Code
+unwind_phase1(unw_context_t *uc, _Unwind_Exception *exception_object) {
+  // EHABI #7.3 discusses preserving the VRS in a "temporary VRS" during
+  // phase 1 and then restoring it to the "primary VRS" for phase 2. The
+  // effect is phase 2 doesn't see any of the VRS manipulations from phase 1.
+  // In this implementation, the phases don't share the VRS backing store.
+  // Instead, they are passed the original |uc| and they create a new VRS
+  // from scratch thus achieving the same effect.
+  unw_cursor_t cursor1;
+  unw_init_local(&cursor1, uc);
+
+  // Walk each frame looking for a place to stop.
+  for (bool handlerNotFound = true; handlerNotFound;) {
+
+    // Ask libuwind to get next frame (skip over first which is
+    // _Unwind_RaiseException).
+    int stepResult = unw_step(&cursor1);
+    if (stepResult == 0) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached "
+                            "bottom => _URC_END_OF_STACK\n",
+                            exception_object);
+      return _URC_END_OF_STACK;
+    } else if (stepResult < 0) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed => "
+                            "_URC_FATAL_PHASE1_ERROR\n",
+                            exception_object);
+      return _URC_FATAL_PHASE1_ERROR;
+    }
+
+    // See if frame has code to run (has personality routine).
+    unw_proc_info_t frameInfo;
+    unw_word_t sp;
+    if (unw_get_proc_info(&cursor1, &frameInfo) != UNW_ESUCCESS) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info "
+                            "failed => _URC_FATAL_PHASE1_ERROR\n",
+                            exception_object);
+      return _URC_FATAL_PHASE1_ERROR;
+    }
+
+    // When tracing, print state information.
+    if (_LIBUNWIND_TRACING_UNWINDING) {
+      char functionName[512];
+      unw_word_t offset;
+      if ((unw_get_proc_name(&cursor1, functionName, 512, &offset) !=
+           UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip))
+        strcpy(functionName, ".anonymous.");
+      unw_word_t pc;
+      unw_get_reg(&cursor1, UNW_REG_IP, &pc);
+      _LIBUNWIND_TRACE_UNWINDING(
+          "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, "
+          "lsda=0x%llX, personality=0x%llX\n",
+          exception_object, (long long)pc, (long long)frameInfo.start_ip,
+          functionName, (long long)frameInfo.lsda,
+          (long long)frameInfo.handler);
+    }
+
+    // If there is a personality routine, ask it if it will want to stop at
+    // this frame.
+    if (frameInfo.handler != 0) {
+      __personality_routine p =
+          (__personality_routine)(long)(frameInfo.handler);
+      _LIBUNWIND_TRACE_UNWINDING(
+          "unwind_phase1(ex_ojb=%p): calling personality function %p\n",
+          exception_object, p);
+      struct _Unwind_Context *context = (struct _Unwind_Context *)(&cursor1);
+      exception_object->pr_cache.fnstart = frameInfo.start_ip;
+      exception_object->pr_cache.ehtp =
+          (_Unwind_EHT_Header *)frameInfo.unwind_info;
+      exception_object->pr_cache.additional = frameInfo.flags;
+      _Unwind_Reason_Code personalityResult =
+          (*p)(_US_VIRTUAL_UNWIND_FRAME, exception_object, context);
+      _LIBUNWIND_TRACE_UNWINDING(
+          "unwind_phase1(ex_ojb=%p): personality result %d "
+          "start_ip %x ehtp %p additional %x\n",
+          exception_object, personalityResult,
+          exception_object->pr_cache.fnstart, exception_object->pr_cache.ehtp,
+          exception_object->pr_cache.additional);
+      switch (personalityResult) {
+      case _URC_HANDLER_FOUND:
+        // found a catch clause or locals that need destructing in this frame
+        // stop search and remember stack pointer at the frame
+        handlerNotFound = false;
+        // p should have initialized barrier_cache. EHABI #7.3.5
+        _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): "
+                                   "_URC_HANDLER_FOUND \n",
+                                   exception_object);
+        return _URC_NO_REASON;
+
+      case _URC_CONTINUE_UNWIND:
+        _LIBUNWIND_TRACE_UNWINDING(
+            "unwind_phase1(ex_ojb=%p): _URC_CONTINUE_UNWIND\n",
+            exception_object);
+        // continue unwinding
+        break;
+
+      // EHABI #7.3.3
+      case _URC_FAILURE:
+        return _URC_FAILURE;
+
+      default:
+        // something went wrong
+        _LIBUNWIND_TRACE_UNWINDING(
+            "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR\n",
+            exception_object);
+        return _URC_FATAL_PHASE1_ERROR;
+      }
+    }
+  }
+  return _URC_NO_REASON;
+}
+
+static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc,
+                                         _Unwind_Exception *exception_object,
+                                         bool resume) {
+  // See comment at the start of unwind_phase1 regarding VRS integrity.
+  unw_cursor_t cursor2;
+  unw_init_local(&cursor2, uc);
+
+  _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", exception_object);
+  int frame_count = 0;
+
+  // Walk each frame until we reach where search phase said to stop.
+  while (true) {
+    // Ask libuwind to get next frame (skip over first which is
+    // _Unwind_RaiseException or _Unwind_Resume).
+    //
+    // Resume only ever makes sense for 1 frame.
+    _Unwind_State state =
+        resume ? _US_UNWIND_FRAME_RESUME : _US_UNWIND_FRAME_STARTING;
+    if (resume && frame_count == 1) {
+      // On a resume, first unwind the _Unwind_Resume() frame. The next frame
+      // is now the landing pad for the cleanup from a previous execution of
+      // phase2. To continue unwindingly correctly, replace VRS[15] with the
+      // IP of the frame that the previous run of phase2 installed the context
+      // for. After this, continue unwinding as if normal.
+      //
+      // See #7.4.6 for details.
+      unw_set_reg(&cursor2, UNW_REG_IP,
+                  exception_object->unwinder_cache.reserved2);
+      resume = false;
+    }
+
+    int stepResult = unw_step(&cursor2);
+    if (stepResult == 0) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached "
+                            "bottom => _URC_END_OF_STACK\n",
+                            exception_object);
+      return _URC_END_OF_STACK;
+    } else if (stepResult < 0) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step failed => "
+                            "_URC_FATAL_PHASE1_ERROR\n",
+                            exception_object);
+      return _URC_FATAL_PHASE2_ERROR;
+    }
+
+    // Get info about this frame.
+    unw_word_t sp;
+    unw_proc_info_t frameInfo;
+    unw_get_reg(&cursor2, UNW_REG_SP, &sp);
+    if (unw_get_proc_info(&cursor2, &frameInfo) != UNW_ESUCCESS) {
+      _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info "
+                            "failed => _URC_FATAL_PHASE1_ERROR\n",
+                            exception_object);
+      return _URC_FATAL_PHASE2_ERROR;
+    }
+
+    // When tracing, print state information.
+    if (_LIBUNWIND_TRACING_UNWINDING) {
+      char functionName[512];
+      unw_word_t offset;
+      if ((unw_get_proc_name(&cursor2, functionName, 512, &offset) !=
+           UNW_ESUCCESS) || (frameInfo.start_ip + offset > frameInfo.end_ip))
+        strcpy(functionName, ".anonymous.");
+      _LIBUNWIND_TRACE_UNWINDING(
+          "unwind_phase2(ex_ojb=%p): start_ip=0x%llX, func=%s, sp=0x%llX, "
+          "lsda=0x%llX, personality=0x%llX\n",
+          exception_object, (long long)frameInfo.start_ip, functionName,
+          (long long)sp, (long long)frameInfo.lsda,
+          (long long)frameInfo.handler);
+    }
+
+    // If there is a personality routine, tell it we are unwinding.
+    if (frameInfo.handler != 0) {
+      __personality_routine p =
+          (__personality_routine)(long)(frameInfo.handler);
+      struct _Unwind_Context *context = (struct _Unwind_Context *)(&cursor2);
+      // EHABI #7.2
+      exception_object->pr_cache.fnstart = frameInfo.start_ip;
+      exception_object->pr_cache.ehtp =
+          (_Unwind_EHT_Header *)frameInfo.unwind_info;
+      exception_object->pr_cache.additional = frameInfo.flags;
+      _Unwind_Reason_Code personalityResult =
+          (*p)(state, exception_object, context);
+      switch (personalityResult) {
+      case _URC_CONTINUE_UNWIND:
+        // Continue unwinding
+        _LIBUNWIND_TRACE_UNWINDING(
+            "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND\n",
+            exception_object);
+        // EHABI #7.2
+        if (sp == exception_object->barrier_cache.sp) {
+          // Phase 1 said we would stop at this frame, but we did not...
+          _LIBUNWIND_ABORT("during phase1 personality function said it would "
+                           "stop here, but now in phase2 it did not stop here");
+        }
+        break;
+      case _URC_INSTALL_CONTEXT:
+        _LIBUNWIND_TRACE_UNWINDING(
+            "unwind_phase2(ex_ojb=%p): _URC_INSTALL_CONTEXT\n",
+            exception_object);
+        // Personality routine says to transfer control to landing pad.
+        // We may get control back if landing pad calls _Unwind_Resume().
+        if (_LIBUNWIND_TRACING_UNWINDING) {
+          unw_word_t pc;
+          unw_get_reg(&cursor2, UNW_REG_IP, &pc);
+          unw_get_reg(&cursor2, UNW_REG_SP, &sp);
+          _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering  "
+                                     "user code with ip=0x%llX, sp=0x%llX\n",
+                                     exception_object, (long long)pc,
+                                     (long long)sp);
+        }
+
+        {
+          // EHABI #7.4.1 says we need to preserve pc for when _Unwind_Resume
+          // is called back, to find this same frame.
+          unw_word_t pc;
+          unw_get_reg(&cursor2, UNW_REG_IP, &pc);
+          exception_object->unwinder_cache.reserved2 = (uint32_t)pc;
+        }
+        unw_resume(&cursor2);
+        // unw_resume() only returns if there was an error.
+        return _URC_FATAL_PHASE2_ERROR;
+
+      // # EHABI #7.4.3
+      case _URC_FAILURE:
+        abort();
+
+      default:
+        // Personality routine returned an unknown result code.
+        _LIBUNWIND_DEBUG_LOG("personality function returned unknown result %d",
+                      personalityResult);
+        return _URC_FATAL_PHASE2_ERROR;
+      }
+    }
+    frame_count++;
+  }
+
+  // Clean up phase did not resume at the frame that the search phase
+  // said it would...
+  return _URC_FATAL_PHASE2_ERROR;
+}
+
+/// Called by __cxa_throw.  Only returns if there is a fatal error.
+_LIBUNWIND_EXPORT _Unwind_Reason_Code
+_Unwind_RaiseException(_Unwind_Exception *exception_object) {
+  _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)\n",
+                             exception_object);
+  unw_context_t uc;
+  unw_getcontext(&uc);
+
+  // This field for is for compatibility with GCC to say this isn't a forced
+  // unwind. EHABI #7.2
+  exception_object->unwinder_cache.reserved1 = 0;
+
+  // phase 1: the search phase
+  _Unwind_Reason_Code phase1 = unwind_phase1(&uc, exception_object);
+  if (phase1 != _URC_NO_REASON)
+    return phase1;
+
+  // phase 2: the clean up phase
+  return unwind_phase2(&uc, exception_object, false);
+}
+
+_LIBUNWIND_EXPORT void _Unwind_Complete(_Unwind_Exception* exception_object) {
+  // This is to be called when exception handling completes to give us a chance
+  // to perform any housekeeping. EHABI #7.2. But we have nothing to do here.
+}
+
+/// When _Unwind_RaiseException() is in phase2, it hands control
+/// to the personality function at each frame.  The personality
+/// may force a jump to a landing pad in that function, the landing
+/// pad code may then call _Unwind_Resume() to continue with the
+/// unwinding.  Note: the call to _Unwind_Resume() is from compiler
+/// geneated user code.  All other _Unwind_* routines are called
+/// by the C++ runtime __cxa_* routines.
+///
+/// Note: re-throwing an exception (as opposed to continuing the unwind)
+/// is implemented by having the code call __cxa_rethrow() which
+/// in turn calls _Unwind_Resume_or_Rethrow().
+_LIBUNWIND_EXPORT void
+_Unwind_Resume(_Unwind_Exception *exception_object) {
+  _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)\n", exception_object);
+  unw_context_t uc;
+  unw_getcontext(&uc);
+
+  // _Unwind_RaiseException on EHABI will always set the reserved1 field to 0,
+  // which is in the same position as private_1 below.
+  // TODO(ajwong): Who wronte the above? Why is it true?
+  unwind_phase2(&uc, exception_object, true);
+
+  // Clients assume _Unwind_Resume() does not return, so all we can do is abort.
+  _LIBUNWIND_ABORT("_Unwind_Resume() can't return");
+}
+
+/// Called by personality handler during phase 2 to get LSDA for current frame.
+_LIBUNWIND_EXPORT uintptr_t
+_Unwind_GetLanguageSpecificData(struct _Unwind_Context *context) {
+  unw_cursor_t *cursor = (unw_cursor_t *)context;
+  unw_proc_info_t frameInfo;
+  uintptr_t result = 0;
+  if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
+    result = (uintptr_t)frameInfo.lsda;
+  _LIBUNWIND_TRACE_API("_Unwind_GetLanguageSpecificData(context=%p)"
+                       "=> 0x%llx\n", context, (long long)result);
+  if (result != 0) {
+    if (*((uint8_t *)result) != 0xFF)
+      _LIBUNWIND_DEBUG_LOG("lsda at 0x%llx does not start with 0xFF\n",
+                           (long long)result);
+  }
+  return result;
+}
+
+static uint64_t ValueAsBitPattern(_Unwind_VRS_DataRepresentation representation,
+                                  void* valuep) {
+  uint64_t value = 0;
+  switch (representation) {
+    case _UVRSD_UINT32:
+    case _UVRSD_FLOAT:
+      memcpy(&value, valuep, sizeof(uint32_t));
+      break;
+
+    case _UVRSD_VFPX:
+    case _UVRSD_UINT64:
+    case _UVRSD_DOUBLE:
+      memcpy(&value, valuep, sizeof(uint64_t));
+      break;
+  }
+  return value;
+}
+
+_Unwind_VRS_Result _Unwind_VRS_Set(
+    _Unwind_Context *context,
+    _Unwind_VRS_RegClass regclass,
+    uint32_t regno,
+    _Unwind_VRS_DataRepresentation representation,
+    void *valuep) {
+  _LIBUNWIND_TRACE_API("_Unwind_VRS_Set(context=%p, regclass=%d, reg=%d, "
+                       "rep=%d, value=0x%llX)\n", context, regclass,
+                       regno, representation,
+                       ValueAsBitPattern(representation, valuep));
+  unw_cursor_t *cursor = (unw_cursor_t *)context;
+  switch (regclass) {
+    case _UVRSC_CORE:
+      if (representation != _UVRSD_UINT32 || regno > 15)
+        return _UVRSR_FAILED;
+      return unw_set_reg(cursor, UNW_ARM_R0 + regno, *(unw_word_t *)valuep) ==
+                     UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_WMMXC:
+      if (representation != _UVRSD_UINT32 || regno > 3)
+        return _UVRSR_FAILED;
+      return unw_set_reg(cursor, UNW_ARM_WC0 + regno, *(unw_word_t *)valuep) ==
+                     UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_VFP:
+      if (representation != _UVRSD_VFPX && representation != _UVRSD_DOUBLE)
+        return _UVRSR_FAILED;
+      if (representation == _UVRSD_VFPX) {
+        // Can only touch d0-15 with FSTMFDX.
+        if (regno > 15)
+          return _UVRSR_FAILED;
+        unw_save_vfp_as_X(cursor);
+      } else {
+        if (regno > 31)
+          return _UVRSR_FAILED;
+      }
+      return unw_set_fpreg(cursor, UNW_ARM_D0 + regno,
+                           *(unw_fpreg_t *)valuep) == UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_WMMXD:
+      if (representation != _UVRSD_DOUBLE || regno > 31)
+        return _UVRSR_FAILED;
+      return unw_set_fpreg(cursor, UNW_ARM_WR0 + regno,
+                           *(unw_fpreg_t *)valuep) == UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+  }
+}
+
+static _Unwind_VRS_Result _Unwind_VRS_Get_Internal(
+    _Unwind_Context *context,
+    _Unwind_VRS_RegClass regclass,
+    uint32_t regno,
+    _Unwind_VRS_DataRepresentation representation,
+    void *valuep) {
+  unw_cursor_t *cursor = (unw_cursor_t *)context;
+  switch (regclass) {
+    case _UVRSC_CORE:
+      if (representation != _UVRSD_UINT32 || regno > 15)
+        return _UVRSR_FAILED;
+      return unw_get_reg(cursor, UNW_ARM_R0 + regno, (unw_word_t *)valuep) ==
+                     UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_WMMXC:
+      if (representation != _UVRSD_UINT32 || regno > 3)
+        return _UVRSR_FAILED;
+      return unw_get_reg(cursor, UNW_ARM_WC0 + regno, (unw_word_t *)valuep) ==
+                     UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_VFP:
+      if (representation != _UVRSD_VFPX && representation != _UVRSD_DOUBLE)
+        return _UVRSR_FAILED;
+      if (representation == _UVRSD_VFPX) {
+        // Can only touch d0-15 with FSTMFDX.
+        if (regno > 15)
+          return _UVRSR_FAILED;
+        unw_save_vfp_as_X(cursor);
+      } else {
+        if (regno > 31)
+          return _UVRSR_FAILED;
+      }
+      return unw_get_fpreg(cursor, UNW_ARM_D0 + regno, (unw_fpreg_t *)valuep) ==
+                     UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+    case _UVRSC_WMMXD:
+      if (representation != _UVRSD_DOUBLE || regno > 31)
+        return _UVRSR_FAILED;
+      return unw_get_fpreg(cursor, UNW_ARM_WR0 + regno,
+                           (unw_fpreg_t *)valuep) == UNW_ESUCCESS
+                 ? _UVRSR_OK
+                 : _UVRSR_FAILED;
+  }
+}
+
+_Unwind_VRS_Result _Unwind_VRS_Get(
+    _Unwind_Context *context,
+    _Unwind_VRS_RegClass regclass,
+    uint32_t regno,
+    _Unwind_VRS_DataRepresentation representation,
+    void *valuep) {
+  _Unwind_VRS_Result result =
+      _Unwind_VRS_Get_Internal(context, regclass, regno, representation,
+                               valuep);
+  _LIBUNWIND_TRACE_API("_Unwind_VRS_Get(context=%p, regclass=%d, reg=%d, "
+                       "rep=%d, value=0x%llX, result = %d)\n",
+                       context, regclass, regno, representation,
+                       ValueAsBitPattern(representation, valuep), result);
+  return result;
+}
+
+_Unwind_VRS_Result _Unwind_VRS_Pop(
+    _Unwind_Context *context,
+    _Unwind_VRS_RegClass regclass,
+    uint32_t discriminator,
+    _Unwind_VRS_DataRepresentation representation) {
+  _LIBUNWIND_TRACE_API("_Unwind_VRS_Pop(context=%p, regclass=%d, "
+                       "discriminator=%d, representation=%d)\n",
+                        context, regclass, discriminator, representation);
+  switch (regclass) {
+    case _UVRSC_CORE:
+    case _UVRSC_WMMXC: {
+      if (representation != _UVRSD_UINT32)
+        return _UVRSR_FAILED;
+      // When popping SP from the stack, we don't want to override it from the
+      // computed new stack location. See EHABI #7.5.4 table 3.
+      bool poppedSP = false;
+      uint32_t* sp;
+      if (_Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_SP,
+                          _UVRSD_UINT32, &sp) != _UVRSR_OK) {
+        return _UVRSR_FAILED;
+      }
+      for (int i = 0; i < 16; ++i) {
+        if (!(discriminator & (1<<i)))
+          continue;
+        uint32_t value = *sp++;
+        if (regclass == _UVRSC_CORE && i == 13)
+          poppedSP = true;
+        if (_Unwind_VRS_Set(context, regclass, i,
+                            _UVRSD_UINT32, &value) != _UVRSR_OK) {
+          return _UVRSR_FAILED;
+        }
+      }
+      if (!poppedSP) {
+        return _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP,
+                               _UVRSD_UINT32, &sp);
+      }
+      return _UVRSR_OK;
+    }
+    case _UVRSC_VFP:
+    case _UVRSC_WMMXD: {
+      if (representation != _UVRSD_VFPX && representation != _UVRSD_DOUBLE)
+        return _UVRSR_FAILED;
+      uint32_t first = discriminator >> 16;
+      uint32_t count = discriminator & 0xffff;
+      uint32_t end = first+count;
+      uint32_t* sp;
+      if (_Unwind_VRS_Get(context, _UVRSC_CORE, UNW_ARM_SP,
+                          _UVRSD_UINT32, &sp) != _UVRSR_OK) {
+        return _UVRSR_FAILED;
+      }
+      // For _UVRSD_VFPX, we're assuming the data is stored in FSTMX "standard
+      // format 1", which is equivalent to FSTMD + a padding word.
+      for (uint32_t i = first; i < end; ++i) {
+        // SP is only 32-bit aligned so don't copy 64-bit at a time.
+        uint64_t value = *sp++;
+        value |= ((uint64_t)(*sp++)) << 32;
+        if (_Unwind_VRS_Set(context, regclass, i, representation, &value) !=
+            _UVRSR_OK)
+          return _UVRSR_FAILED;
+      }
+      if (representation == _UVRSD_VFPX)
+        ++sp;
+      return _Unwind_VRS_Set(context, _UVRSC_CORE, UNW_ARM_SP, _UVRSD_UINT32,
+                             &sp);
+    }
+  };
+}
+
+/// Called by personality handler during phase 2 to find the start of the
+/// function.
+_LIBUNWIND_EXPORT uintptr_t
+_Unwind_GetRegionStart(struct _Unwind_Context *context) {
+  unw_cursor_t *cursor = (unw_cursor_t *)context;
+  unw_proc_info_t frameInfo;
+  uintptr_t result = 0;
+  if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
+    result = (uintptr_t)frameInfo.start_ip;
+  _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX\n",
+                             context, (long long)result);
+  return result;
+}
+
+
+/// Called by personality handler during phase 2 if a foreign exception
+// is caught.
+_LIBUNWIND_EXPORT void
+_Unwind_DeleteException(_Unwind_Exception *exception_object) {
+  _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n",
+                              exception_object);
+  if (exception_object->exception_cleanup != NULL)
+    (*exception_object->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT,
+                                           exception_object);
+}
+
+#endif  // LIBCXXABI_ARM_EHABI
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindCursor.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindCursor.hpp
index 256a72d..d348b78 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindCursor.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindCursor.hpp
@@ -12,10 +12,12 @@
 #ifndef __UNWINDCURSOR_HPP__
 #define __UNWINDCURSOR_HPP__
 
+#include <algorithm>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <pthread.h>
+#include <unwind.h>
 
 #if __APPLE__
   #include <mach-o/dyld.h>
@@ -151,10 +153,12 @@
   _LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_unlock(&_lock));
 }
 
+#if __APPLE__
 template <typename A>
 void DwarfFDECache<A>::dyldUnloadHook(const struct mach_header *mh, intptr_t ) {
   removeAllIn((pint_t) mh);
 }
+#endif
 
 template <typename A>
 void DwarfFDECache<A>::iterateCacheEntries(void (*func)(
@@ -363,12 +367,13 @@
 
 class _LIBUNWIND_HIDDEN AbstractUnwindCursor {
 public:
+  virtual             ~AbstractUnwindCursor() {}
   virtual bool        validReg(int) = 0;
   virtual unw_word_t  getReg(int) = 0;
   virtual void        setReg(int, unw_word_t) = 0;
   virtual bool        validFloatReg(int) = 0;
-  virtual double      getFloatReg(int) = 0;
-  virtual void        setFloatReg(int, double) = 0;
+  virtual unw_fpreg_t getFloatReg(int) = 0;
+  virtual void        setFloatReg(int, unw_fpreg_t) = 0;
   virtual int         step() = 0;
   virtual void        getInfo(unw_proc_info_t *) = 0;
   virtual void        jumpto() = 0;
@@ -376,6 +381,9 @@
   virtual bool        getFunctionName(char *bf, size_t ln, unw_word_t *off) = 0;
   virtual void        setInfoBasedOnIPRegister(bool isReturnAddr = false) = 0;
   virtual const char *getRegisterName(int num) = 0;
+#if __arm__
+  virtual void        saveVFPAsX() = 0;
+#endif
 };
 
 
@@ -392,8 +400,8 @@
   virtual unw_word_t  getReg(int);
   virtual void        setReg(int, unw_word_t);
   virtual bool        validFloatReg(int);
-  virtual double      getFloatReg(int);
-  virtual void        setFloatReg(int, double);
+  virtual unw_fpreg_t getFloatReg(int);
+  virtual void        setFloatReg(int, unw_fpreg_t);
   virtual int         step();
   virtual void        getInfo(unw_proc_info_t *);
   virtual void        jumpto();
@@ -401,11 +409,18 @@
   virtual bool        getFunctionName(char *buf, size_t len, unw_word_t *off);
   virtual void        setInfoBasedOnIPRegister(bool isReturnAddress = false);
   virtual const char *getRegisterName(int num);
+#if __arm__
+  virtual void        saveVFPAsX();
+#endif
 
   void            operator delete(void *, size_t) {}
 
 private:
 
+#if LIBCXXABI_ARM_EHABI
+  bool getInfoFromEHABISection(pint_t pc, const UnwindInfoSections &sects);
+#endif
+
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
   bool getInfoFromDwarfSection(pint_t pc, const UnwindInfoSections &sects,
                                             uint32_t fdeSectionOffsetHint=0);
@@ -483,7 +498,9 @@
     }
     return false;
   }
+#endif // _LIBUNWIND_SUPPORT_COMPACT_UNWIND
 
+#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
   compact_unwind_encoding_t dwarfEncoding() const {
     R dummy;
     return dwarfEncoding(dummy);
@@ -504,7 +521,7 @@
   compact_unwind_encoding_t dwarfEncoding(Registers_arm64 &) const {
     return UNWIND_ARM64_MODE_DWARF;
   }
-#endif // _LIBUNWIND_SUPPORT_COMPACT_UNWIND
+#endif // _LIBUNWIND_SUPPORT_DWARF_UNWIND
 
 
   A               &_addressSpace;
@@ -521,14 +538,13 @@
       _isSignalFrame(false) {
   static_assert(sizeof(UnwindCursor<A, R>) < sizeof(unw_cursor_t),
                 "UnwindCursor<> does not fit in unw_cursor_t");
-
-  bzero(&_info, sizeof(_info));
+  memset(&_info, 0, sizeof(_info));
 }
 
 template <typename A, typename R>
 UnwindCursor<A, R>::UnwindCursor(A &as, void *)
     : _addressSpace(as), _unwindInfoMissing(false), _isSignalFrame(false) {
-  bzero(&_info, sizeof(_info));
+  memset(&_info, 0, sizeof(_info));
   // FIXME
   // fill in _registers from thread arg
 }
@@ -555,12 +571,12 @@
 }
 
 template <typename A, typename R>
-double UnwindCursor<A, R>::getFloatReg(int regNum) {
+unw_fpreg_t UnwindCursor<A, R>::getFloatReg(int regNum) {
   return _registers.getFloatRegister(regNum);
 }
 
 template <typename A, typename R>
-void UnwindCursor<A, R>::setFloatReg(int regNum, double value) {
+void UnwindCursor<A, R>::setFloatReg(int regNum, unw_fpreg_t value) {
   _registers.setFloatRegister(regNum, value);
 }
 
@@ -568,6 +584,12 @@
   _registers.jumpto();
 }
 
+#if __arm__
+template <typename A, typename R> void UnwindCursor<A, R>::saveVFPAsX() {
+  _registers.saveVFPAsX();
+}
+#endif
+
 template <typename A, typename R>
 const char *UnwindCursor<A, R>::getRegisterName(int regNum) {
   return _registers.getRegisterName(regNum);
@@ -577,6 +599,212 @@
   return _isSignalFrame;
 }
 
+#if LIBCXXABI_ARM_EHABI
+struct EHABIIndexEntry {
+  uint32_t functionOffset;
+  uint32_t data;
+};
+
+// Unable to unwind in the ARM index table (section 5 EHABI).
+#define UNW_EXIDX_CANTUNWIND 0x1
+
+static inline uint32_t signExtendPrel31(uint32_t data) {
+  return data | ((data & 0x40000000u) << 1);
+}
+
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr0(
+    _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr1(
+    _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
+extern "C" _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(
+    _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
+
+template<typename A>
+struct EHABISectionIterator {
+  typedef EHABISectionIterator _Self;
+
+  typedef std::random_access_iterator_tag iterator_category;
+  typedef typename A::pint_t value_type;
+  typedef typename A::pint_t* pointer;
+  typedef typename A::pint_t& reference;
+  typedef size_t size_type;
+  typedef size_t difference_type;
+
+  static _Self begin(A& addressSpace, const UnwindInfoSections& sects) {
+    return _Self(addressSpace, sects, 0);
+  }
+  static _Self end(A& addressSpace, const UnwindInfoSections& sects) {
+    return _Self(addressSpace, sects, sects.arm_section_length);
+  }
+
+  EHABISectionIterator(A& addressSpace, const UnwindInfoSections& sects, size_t i)
+      : _addressSpace(&addressSpace), _sects(&sects), _i(i) {}
+
+  _Self& operator++() { ++_i; return *this; }
+  _Self& operator+=(size_t a) { _i += a; return *this; }
+  _Self& operator--() { assert(_i > 0); --_i; return *this; }
+  _Self& operator-=(size_t a) { assert(_i >= a); _i -= a; return *this; }
+
+  _Self operator+(size_t a) { _Self out = *this; out._i += a; return out; }
+  _Self operator-(size_t a) { assert(_i >= a); _Self out = *this; out._i -= a; return out; }
+
+  size_t operator-(const _Self& other) { return _i - other._i; }
+
+  bool operator==(const _Self& other) const {
+    assert(_addressSpace == other._addressSpace);
+    assert(_sects == other._sects);
+    return _i == other._i;
+  }
+
+  typename A::pint_t operator*() const { return functionAddress(); }
+
+  typename A::pint_t functionAddress() const {
+    typename A::pint_t indexAddr = _sects->arm_section + arrayoffsetof(
+        EHABIIndexEntry, _i, functionOffset);
+    return indexAddr + signExtendPrel31(_addressSpace->get32(indexAddr));
+  }
+
+  typename A::pint_t dataAddress() {
+    typename A::pint_t indexAddr = _sects->arm_section + arrayoffsetof(
+        EHABIIndexEntry, _i, data);
+    return indexAddr;
+  }
+
+ private:
+  size_t _i;
+  A* _addressSpace;
+  const UnwindInfoSections* _sects;
+};
+
+template <typename A, typename R>
+bool UnwindCursor<A, R>::getInfoFromEHABISection(
+    pint_t pc,
+    const UnwindInfoSections &sects) {
+  EHABISectionIterator<A> begin =
+      EHABISectionIterator<A>::begin(_addressSpace, sects);
+  EHABISectionIterator<A> end =
+      EHABISectionIterator<A>::end(_addressSpace, sects);
+
+  EHABISectionIterator<A> itNextPC = std::upper_bound(begin, end, pc);
+  if (itNextPC == begin || itNextPC == end)
+    return false;
+  EHABISectionIterator<A> itThisPC = itNextPC - 1;
+
+  pint_t thisPC = itThisPC.functionAddress();
+  pint_t nextPC = itNextPC.functionAddress();
+  pint_t indexDataAddr = itThisPC.dataAddress();
+
+  if (indexDataAddr == 0)
+    return false;
+
+  uint32_t indexData = _addressSpace.get32(indexDataAddr);
+  if (indexData == UNW_EXIDX_CANTUNWIND)
+    return false;
+
+  // If the high bit is set, the exception handling table entry is inline inside
+  // the index table entry on the second word (aka |indexDataAddr|). Otherwise,
+  // the table points at an offset in the exception handling table (section 5 EHABI).
+  pint_t exceptionTableAddr;
+  uint32_t exceptionTableData;
+  bool isSingleWordEHT;
+  if (indexData & 0x80000000) {
+    exceptionTableAddr = indexDataAddr;
+    // TODO(ajwong): Should this data be 0?
+    exceptionTableData = indexData;
+    isSingleWordEHT = true;
+  } else {
+    exceptionTableAddr = indexDataAddr + signExtendPrel31(indexData);
+    exceptionTableData = _addressSpace.get32(exceptionTableAddr);
+    isSingleWordEHT = false;
+  }
+
+  // Now we know the 3 things:
+  //   exceptionTableAddr -- exception handler table entry.
+  //   exceptionTableData -- the data inside the first word of the eht entry.
+  //   isSingleWordEHT -- whether the entry is in the index.
+  unw_word_t personalityRoutine = 0xbadf00d;
+  bool scope32 = false;
+  uintptr_t lsda = 0xbadf00d;
+
+  // If the high bit in the exception handling table entry is set, the entry is
+  // in compact form (section 6.3 EHABI).
+  if (exceptionTableData & 0x80000000) {
+    // Grab the index of the personality routine from the compact form.
+    int choice = (exceptionTableData & 0x0f000000) >> 24;
+    int extraWords = 0;
+    switch (choice) {
+      case 0:
+        personalityRoutine = (unw_word_t) &__aeabi_unwind_cpp_pr0;
+        extraWords = 0;
+        scope32 = false;
+        break;
+      case 1:
+        personalityRoutine = (unw_word_t) &__aeabi_unwind_cpp_pr1;
+        extraWords = (exceptionTableData & 0x00ff0000) >> 16;
+        scope32 = false;
+        break;
+      case 2:
+        personalityRoutine = (unw_word_t) &__aeabi_unwind_cpp_pr2;
+        extraWords = (exceptionTableData & 0x00ff0000) >> 16;
+        scope32 = true;
+        break;
+      default:
+        _LIBUNWIND_ABORT("unknown personality routine");
+        return false;
+    }
+
+    if (isSingleWordEHT) {
+      if (extraWords != 0) {
+        _LIBUNWIND_ABORT("index inlined table detected but pr function "
+                         "requires extra words");
+        return false;
+      }
+    }
+  } else {
+    pint_t personalityAddr =
+        exceptionTableAddr + signExtendPrel31(exceptionTableData);
+    personalityRoutine = personalityAddr;
+
+    // ARM EHABI # 6.2, # 9.2
+    //
+    //  +---- ehtp
+    //  v
+    // +--------------------------------------+
+    // | +--------+--------+--------+-------+ |
+    // | |0| prel31 to personalityRoutine   | |
+    // | +--------+--------+--------+-------+ |
+    // | |      N |      unwind opcodes     | |  <-- UnwindData
+    // | +--------+--------+--------+-------+ |
+    // | | Word 2        unwind opcodes     | |
+    // | +--------+--------+--------+-------+ |
+    // | ...                                  |
+    // | +--------+--------+--------+-------+ |
+    // | | Word N        unwind opcodes     | |
+    // | +--------+--------+--------+-------+ |
+    // | | LSDA                             | |  <-- lsda
+    // | | ...                              | |
+    // | +--------+--------+--------+-------+ |
+    // +--------------------------------------+
+
+    uint32_t *UnwindData = reinterpret_cast<uint32_t*>(exceptionTableAddr) + 1;
+    uint32_t FirstDataWord = *UnwindData;
+    size_t N = ((FirstDataWord >> 24) & 0xff);
+    size_t NDataWords = N + 1;
+    lsda = reinterpret_cast<uintptr_t>(UnwindData + NDataWords);
+  }
+
+  _info.start_ip = thisPC;
+  _info.end_ip = nextPC;
+  _info.handler = personalityRoutine;
+  _info.unwind_info = exceptionTableAddr;
+  _info.lsda = lsda;
+  // flags is pr_cache.additional. See EHABI #7.2 for definition of bit 0.
+  _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0;  // Use enum?
+
+  return true;
+}
+#endif
+
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
 template <typename A, typename R>
 bool UnwindCursor<A, R>::getInfoFromDwarfSection(pint_t pc,
@@ -876,8 +1104,9 @@
                             sectionHeader.personalityArrayCount());
       return false;
     }
-    uint32_t personalityDelta = _addressSpace.get32(
-        sects.compact_unwind_section + sectionHeader.personalityArraySectionOffset() +
+    int32_t personalityDelta = (int32_t)_addressSpace.get32(
+        sects.compact_unwind_section +
+        sectionHeader.personalityArraySectionOffset() +
         personalityIndex * sizeof(uint32_t));
     pint_t personalityPointer = sects.dso_base + (pint_t)personalityDelta;
     personality = _addressSpace.getP(personalityPointer);
@@ -909,6 +1138,11 @@
 template <typename A, typename R>
 void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) {
   pint_t pc = (pint_t)this->getReg(UNW_REG_IP);
+#if LIBCXXABI_ARM_EHABI
+  // Remove the thumb bit so the IP represents the actual instruction address.
+  // This matches the behaviour of _Unwind_GetIP on arm.
+  pc &= (pint_t)~0x1;
+#endif
 
   // If the last line of a function is a "throw" the compiler sometimes
   // emits no instructions after the call to __cxa_throw.  This means
@@ -953,6 +1187,12 @@
       }
     }
 #endif
+
+#if LIBCXXABI_ARM_EHABI
+    // If there is ARM EHABI unwind info, look there next.
+    if (sects.arm_section != 0 && this->getInfoFromEHABISection(pc, sects))
+      return;
+#endif
   }
 
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
@@ -1022,7 +1262,7 @@
 
 template <typename A, typename R>
 int UnwindCursor<A, R>::step() {
-  // Bottom of stack is defined is when no unwind info cannot be found.
+  // Bottom of stack is defined is when unwind info cannot be found.
   if (_unwindInfoMissing)
     return UNW_STEP_END;
 
@@ -1032,8 +1272,15 @@
   result = this->stepWithCompactEncoding();
 #elif _LIBUNWIND_SUPPORT_DWARF_UNWIND
   result = this->stepWithDwarfFDE();
+#elif LIBCXXABI_ARM_EHABI
+  result = UNW_STEP_SUCCESS;
+#elif defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__mips64)
+  // ToDo: really?
+  result = UNW_STEP_SUCCESS;
 #else
-  #error Need _LIBUNWIND_SUPPORT_COMPACT_UNWIND or _LIBUNWIND_SUPPORT_DWARF_UNWIND
+  #error Need _LIBUNWIND_SUPPORT_COMPACT_UNWIND or \
+              _LIBUNWIND_SUPPORT_DWARF_UNWIND or \
+              LIBCXXABI_ARM_EHABI
 #endif
 
   // update info based on new PC
@@ -1041,6 +1288,8 @@
     this->setInfoBasedOnIPRegister(true);
     if (_unwindInfoMissing)
       return UNW_STEP_END;
+    if (_info.gp)
+      setReg(UNW_REG_SP, getReg(UNW_REG_SP) + _info.gp);
   }
 
   return result;
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
index c84db76..745c309 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
@@ -24,10 +24,21 @@
 
 ///  Called by __cxa_rethrow().
 _LIBUNWIND_EXPORT _Unwind_Reason_Code
-_Unwind_Resume_or_Rethrow(struct _Unwind_Exception *exception_object) {
+_Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
   _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
-                             "private_1=%ld\n",
-                              exception_object, exception_object->private_1);
+                       "private_1=%ld\n",
+                       exception_object,
+#if LIBCXXABI_ARM_EHABI
+                       (long)exception_object->unwinder_cache.reserved1);
+#else
+                       (long)exception_object->private_1);
+#endif
+
+#if LIBCXXABI_ARM_EHABI
+  // _Unwind_RaiseException on EHABI will always set the reserved1 field to 0,
+  // which is in the same position as private_1 below.
+  return _Unwind_RaiseException(exception_object);
+#else
   // If this is non-forced and a stopping place was found, then this is a
   // re-throw.
   // Call _Unwind_RaiseException() as if this was a new exception
@@ -42,6 +53,7 @@
   _Unwind_Resume(exception_object);
   _LIBUNWIND_ABORT("_Unwind_Resume_or_Rethrow() called _Unwind_RaiseException()"
                    " which unexpectedly returned");
+#endif
 }
 
 
@@ -116,7 +128,8 @@
       unw_get_proc_info(&cursor, &frameInfo);
       _LIBUNWIND_TRACE_UNWINDING(
           " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n",
-          frameInfo.start_ip, functionName, frameInfo.lsda, &cursor);
+          (long long)frameInfo.start_ip, functionName, (long long)frameInfo.lsda,
+          &cursor);
     }
 
     // call trace function with this frame
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1.c b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1.c
index b2e93c7..410ac74 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1.c
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindLevel1.c
@@ -22,15 +22,16 @@
 #include "unwind.h"
 #include "config.h"
 
-#if _LIBUNWIND_BUILD_ZERO_COST_APIS
+#if _LIBUNWIND_BUILD_ZERO_COST_APIS && !LIBCXXABI_ARM_EHABI
 
 static _Unwind_Reason_Code
-unwind_phase1(unw_context_t *uc, struct _Unwind_Exception *exception_object) {
+unwind_phase1(unw_context_t *uc, _Unwind_Exception *exception_object) {
   unw_cursor_t cursor1;
   unw_init_local(&cursor1, uc);
+  bool handlerNotFound;
 
   // Walk each frame looking for a place to stop.
-  for (bool handlerNotFound = true; handlerNotFound;) {
+  for (handlerNotFound = true; handlerNotFound;) {
 
     // Ask libuwind to get next frame (skip over first which is
     // _Unwind_RaiseException).
@@ -69,8 +70,8 @@
       _LIBUNWIND_TRACE_UNWINDING(
           "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, "
           "lsda=0x%llX, personality=0x%llX\n",
-          exception_object, pc, frameInfo.start_ip, functionName,
-          frameInfo.lsda, frameInfo.handler);
+          exception_object, (long long)pc, (long long)frameInfo.start_ip, functionName,
+          (long long)frameInfo.lsda, (long long)frameInfo.handler);
     }
 
     // If there is a personality routine, ask it if it will want to stop at
@@ -117,7 +118,7 @@
 
 
 static _Unwind_Reason_Code
-unwind_phase2(unw_context_t *uc, struct _Unwind_Exception *exception_object) {
+unwind_phase2(unw_context_t *uc, _Unwind_Exception *exception_object) {
   unw_cursor_t cursor2;
   unw_init_local(&cursor2, uc);
 
@@ -125,7 +126,6 @@
 
   // Walk each frame until we reach where search phase said to stop.
   while (true) {
-
     // Ask libuwind to get next frame (skip over first which is
     // _Unwind_RaiseException).
     int stepResult = unw_step(&cursor2);
@@ -162,8 +162,9 @@
       _LIBUNWIND_TRACE_UNWINDING(
           "unwind_phase2(ex_ojb=%p): start_ip=0x%llX, func=%s, sp=0x%llX, "
           "lsda=0x%llX, personality=0x%llX\n",
-          exception_object, frameInfo.start_ip, functionName, sp,
-          frameInfo.lsda, frameInfo.handler);
+          exception_object, (long long)frameInfo.start_ip, functionName,
+          (long long)sp, (long long)frameInfo.lsda,
+          (long long)frameInfo.handler);
     }
 
     // If there is a personality routine, tell it we are unwinding.
@@ -187,7 +188,7 @@
         if (sp == exception_object->private_2) {
           // Phase 1 said we would stop at this frame, but we did not...
           _LIBUNWIND_ABORT("during phase1 personality function said it would "
-                           "stop here, but now if phase2 it did not stop here");
+                           "stop here, but now in phase2 it did not stop here");
         }
         break;
       case _URC_INSTALL_CONTEXT:
@@ -202,8 +203,10 @@
           unw_get_reg(&cursor2, UNW_REG_SP, &sp);
           _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering  "
                                      "user code with ip=0x%llX, sp=0x%llX\n",
-                                    exception_object, pc, sp);
+                                     exception_object, (long long)pc,
+                                     (long long)sp);
         }
+
         unw_resume(&cursor2);
         // unw_resume() only returns if there was an error.
         return _URC_FATAL_PHASE2_ERROR;
@@ -223,7 +226,7 @@
 
 static _Unwind_Reason_Code
 unwind_phase2_forced(unw_context_t *uc,
-                     struct _Unwind_Exception *exception_object,
+                     _Unwind_Exception *exception_object,
                      _Unwind_Stop_Fn stop, void *stop_parameter) {
   unw_cursor_t cursor2;
   unw_init_local(&cursor2, uc);
@@ -237,7 +240,7 @@
       _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): unw_step "
                                  "failed => _URC_END_OF_STACK\n",
                                  exception_object);
-      return _URC_FATAL_PHASE1_ERROR;
+      return _URC_FATAL_PHASE2_ERROR;
     }
 
     // When tracing, print state information.
@@ -324,7 +327,7 @@
 
 /// Called by __cxa_throw.  Only returns if there is a fatal error.
 _LIBUNWIND_EXPORT _Unwind_Reason_Code
-_Unwind_RaiseException(struct _Unwind_Exception *exception_object) {
+_Unwind_RaiseException(_Unwind_Exception *exception_object) {
   _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)\n",
                              exception_object);
   unw_context_t uc;
@@ -358,7 +361,7 @@
 /// is implemented by having the code call __cxa_rethrow() which
 /// in turn calls _Unwind_Resume_or_Rethrow().
 _LIBUNWIND_EXPORT void
-_Unwind_Resume(struct _Unwind_Exception *exception_object) {
+_Unwind_Resume(_Unwind_Exception *exception_object) {
   _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)\n", exception_object);
   unw_context_t uc;
   unw_getcontext(&uc);
@@ -380,7 +383,7 @@
 /// Unwinds stack, calling "stop" function at each frame.
 /// Could be used to implement longjmp().
 _LIBUNWIND_EXPORT _Unwind_Reason_Code
-_Unwind_ForcedUnwind(struct _Unwind_Exception *exception_object,
+_Unwind_ForcedUnwind(_Unwind_Exception *exception_object,
                      _Unwind_Stop_Fn stop, void *stop_parameter) {
   _LIBUNWIND_TRACE_API("_Unwind_ForcedUnwind(ex_obj=%p, stop=%p)\n",
                   exception_object, stop);
@@ -406,10 +409,11 @@
   if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
     result = (uintptr_t)frameInfo.lsda;
   _LIBUNWIND_TRACE_API("_Unwind_GetLanguageSpecificData(context=%p)"
-                             "=> 0x%lX\n", context, result);
+                       "=> 0x%llx\n", context, (long long)result);
   if (result != 0) {
     if (*((uint8_t *)result) != 0xFF)
-      _LIBUNWIND_DEBUG_LOG("lsda at 0x%lX does not start with 0xFF\n", result);
+      _LIBUNWIND_DEBUG_LOG("lsda at 0x%llx does not start with 0xFF\n",
+                           (long long)result);
   }
   return result;
 }
@@ -475,8 +479,8 @@
   uintptr_t result = 0;
   if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS)
     result = (uintptr_t)frameInfo.start_ip;
-  _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%lX\n",
-                             context, result);
+  _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX\n",
+                             context, (long long)result);
   return result;
 }
 
@@ -484,7 +488,7 @@
 /// Called by personality handler during phase 2 if a foreign exception
 // is caught.
 _LIBUNWIND_EXPORT void
-_Unwind_DeleteException(struct _Unwind_Exception *exception_object) {
+_Unwind_DeleteException(_Unwind_Exception *exception_object) {
   _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n",
                               exception_object);
   if (exception_object->exception_cleanup != NULL)
@@ -492,4 +496,4 @@
                                            exception_object);
 }
 
-#endif // _LIBUNWIND_BUILD_ZERO_COST_APIS
+#endif // _LIBUNWIND_BUILD_ZERO_COST_APIS && !LIBCXXABI_ARM_EHABI
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.s b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.S
similarity index 66%
rename from sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.s
rename to sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.S
index c61c354..1feb1d5 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.s
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.S
@@ -1,4 +1,4 @@
-//===------------------------ UnwindRegistersSave.s -----------------------===//
+//===-------------------- UnwindRegistersRestore.S ------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "assembly.h"
+
+  .text
 
 #if __i386__
-  .text
-  .globl __ZN9libunwind13Registers_x866jumptoEv
-  .private_extern __ZN9libunwind13Registers_x866jumptoEv
-__ZN9libunwind13Registers_x866jumptoEv:
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_x866jumptoEv)
 #
 # void libunwind::Registers_x86::jumpto()
 #
@@ -54,10 +54,7 @@
 
 #elif __x86_64__
 
-  .text
-  .globl __ZN9libunwind16Registers_x86_646jumptoEv
-  .private_extern __ZN9libunwind16Registers_x86_646jumptoEv
-__ZN9libunwind16Registers_x86_646jumptoEv:
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind16Registers_x86_646jumptoEv)
 #
 # void libunwind::Registers_x86_64::jumpto()
 #
@@ -98,10 +95,7 @@
 
 #elif __ppc__
 
-  .text
-  .globl __ZN9libunwind13Registers_ppc6jumptoEv
-  .private_extern __ZN9libunwind13Registers_ppc6jumptoEv
-__ZN9libunwind13Registers_ppc6jumptoEv:
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
 ;
 ; void libunwind::Registers_ppc::jumpto()
 ;
@@ -266,16 +260,14 @@
 
 #elif __arm64__
 
-  .text
-  .globl __ZN9libunwind15Registers_arm646jumptoEv
-  .private_extern __ZN9libunwind15Registers_arm646jumptoEv
-__ZN9libunwind15Registers_arm646jumptoEv:
 ;
 ; void libunwind::Registers_arm64::jumpto()
 ;
 ; On entry:
 ;  thread_state pointer is in x0
 ;
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Registers_arm646jumptoEv)
   ; skip restore of x0,x1 for now
   ldp    x2, x3,  [x0, #0x010]
   ldp    x4, x5,  [x0, #0x020]
@@ -316,8 +308,108 @@
   ldp    x0, x1,  [x0, #0x000]  ; restore x0,x1
   ret    lr            ; jump to pc
 
+#elif __arm__
 
-
-
+@
+@ void libunwind::Registers_arm::restoreCoreAndJumpTo()
+@
+@ On entry:
+@  thread_state pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm20restoreCoreAndJumpToEv)
+  @ Use lr as base so that r0 can be restored.
+  mov lr, r0
+  @ 32bit thumb-2 restrictions for ldm:
+  @ . the sp (r13) cannot be in the list
+  @ . the pc (r15) and lr (r14) cannot both be in the list in an LDM instruction
+  ldm lr, {r0-r12}
+  ldr sp, [lr, #52]
+  ldr lr, [lr, #60]  @ restore pc into lr
+#if _ARM_ARCH > 4
+  bx lr
+#else
+  mov pc, lr
 #endif
 
+@
+@ static void libunwind::Registers_arm::restoreVFPWithFLDMD(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm19restoreVFPWithFLDMDEPy)
+  @ VFP and iwMMX instructions are only available when compiling with the flags
+  @ that enable them. We don't want to do that in the library (because we don't
+  @ want the compiler to generate instructions that access those) but this is
+  @ only accessed if the personality routine needs these registers. Use of
+  @ these registers implies they are, actually, available on the target, so
+  @ it's ok to execute.
+  @ So, generate the instruction using the corresponding coprocessor mnemonic.
+  ldc p11, cr0, [r0], {#0x20}  @ fldmiad r0, {d0-d15}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::restoreVFPWithFLDMX(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm19restoreVFPWithFLDMXEPy)
+  ldc p11, cr0, [r0], {#0x21}  @ fldmiax r0, {d0-d15}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::restoreVFPv3(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm12restoreVFPv3EPy)
+  ldcl p11, cr0, [r0], {#0x20}  @ vldm r0, {d16-d31}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::restoreiWMMX(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm12restoreiWMMXEPy)
+  ldcl p1, cr0, [r0], #8  @ wldrd wR0, [r0], #8
+  ldcl p1, cr1, [r0], #8  @ wldrd wR1, [r0], #8
+  ldcl p1, cr2, [r0], #8  @ wldrd wR2, [r0], #8
+  ldcl p1, cr3, [r0], #8  @ wldrd wR3, [r0], #8
+  ldcl p1, cr4, [r0], #8  @ wldrd wR4, [r0], #8
+  ldcl p1, cr5, [r0], #8  @ wldrd wR5, [r0], #8
+  ldcl p1, cr6, [r0], #8  @ wldrd wR6, [r0], #8
+  ldcl p1, cr7, [r0], #8  @ wldrd wR7, [r0], #8
+  ldcl p1, cr8, [r0], #8  @ wldrd wR8, [r0], #8
+  ldcl p1, cr9, [r0], #8  @ wldrd wR9, [r0], #8
+  ldcl p1, cr10, [r0], #8  @ wldrd wR10, [r0], #8
+  ldcl p1, cr11, [r0], #8  @ wldrd wR11, [r0], #8
+  ldcl p1, cr12, [r0], #8  @ wldrd wR12, [r0], #8
+  ldcl p1, cr13, [r0], #8  @ wldrd wR13, [r0], #8
+  ldcl p1, cr14, [r0], #8  @ wldrd wR14, [r0], #8
+  ldcl p1, cr15, [r0], #8  @ wldrd wR15, [r0], #8
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::restoreiWMMXControl(unw_uint32_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm19restoreiWMMXControlEPj)
+  ldc2 p1, cr8, [r0], #4  @ wldrw wCGR0, [r0], #4
+  ldc2 p1, cr9, [r0], #4  @ wldrw wCGR1, [r0], #4
+  ldc2 p1, cr10, [r0], #4  @ wldrw wCGR2, [r0], #4
+  ldc2 p1, cr11, [r0], #4  @ wldrw wCGR3, [r0], #4
+  mov pc, lr
+
+#endif
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.s b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.S
similarity index 61%
rename from sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.s
rename to sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.S
index 05d29ec..48c45b0 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersRestore.s
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/UnwindRegistersSave.S
@@ -1,4 +1,4 @@
-//===-------------------- UnwindRegistersRestore.s ------------------------===//
+//===------------------------ UnwindRegistersSave.S -----------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "assembly.h"
 
     .text
 
@@ -24,8 +25,7 @@
 #   +-----------------------+   <-- SP
 #   +                       +
 #
-  .globl _unw_getcontext
-_unw_getcontext:
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
   push  %eax
   movl  8(%esp), %eax
   movl  %ebx,  4(%eax)
@@ -60,8 +60,7 @@
 # On entry:
 #  thread_state pointer is in rdi
 #
-  .globl _unw_getcontext
-_unw_getcontext:
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
   movq  %rax,   (%rdi)
   movq  %rbx,  8(%rdi)
   movq  %rcx, 16(%rdi)
@@ -96,8 +95,7 @@
 ; On entry:
 ;  thread_state pointer is in r3
 ;
-  .globl _unw_getcontext
-_unw_getcontext:
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
   stw    r0,  8(r3)
   mflr  r0
   stw    r0,  0(r3)  ; store lr as ssr0
@@ -240,8 +238,8 @@
 ; On entry:
 ;  thread_state pointer is in x0
 ;
-  .globl _unw_getcontext
-_unw_getcontext:
+  .p2align 2
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
   stp    x0, x1,  [x0, #0x000]
   stp    x2, x3,  [x0, #0x010]
   stp    x4, x5,  [x0, #0x020]
@@ -282,5 +280,130 @@
   ldr    x0, #0      ; return UNW_ESUCCESS
   ret
 
+#elif __arm__ && !__APPLE__
+
+@
+@ extern int unw_getcontext(unw_context_t* thread_state)
+@
+@ On entry:
+@  thread_state pointer is in r0
+@ 
+@ Per EHABI #4.7 this only saves the core integer registers.
+@ EHABI #7.4.5 notes that in general all VRS registers should be restored
+@ however this is very hard to do for VFP registers because it is unknown
+@ to the lbirary how many registers are implemented by the architecture.
+@ Instead, VFP registers are demand saved by logic external to unw_getcontext.
+@
+  .p2align 2
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+  @ 32bit thumb-2 restrictions for stm:
+  @ . the sp (r13) cannot be in the list
+  @ . the pc (r15) cannot be in the list in an STM instruction
+  stm r0, {r0-r12}
+  str sp, [r0, #52]
+  str lr, [r0, #56]
+  str lr, [r0, #60]  @ store return address as pc
+  mov r0, #0         @ return UNW_ESUCCESS
+#if _ARM_ARCH > 4
+  bx lr
+#else
+  mov pc, lr
 #endif
 
+@
+@ static void libunwind::Registers_arm::saveVFPWithFSTMD(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveVFPWithFSTMDEPy)
+  stc p11, cr0, [r0], {#0x20}  @ fstmiad r0, {d0-d15}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::saveVFPWithFSTMX(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveVFPWithFSTMXEPy)
+  stc p11, cr0, [r0], {#0x21}  @ fstmiax r0, {d0-d15}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::saveVFPv3(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm9saveVFPv3EPy)
+  @ VFP and iwMMX instructions are only available when compiling with the flags
+  @ that enable them. We don't want to do that in the library (because we don't
+  @ want the compiler to generate instructions that access those) but this is
+  @ only accessed if the personality routine needs these registers. Use of
+  @ these registers implies they are, actually, available on the target, so
+  @ it's ok to execute.
+  @ So, generate the instructions using the corresponding coprocessor mnemonic.
+  stcl p11, cr0, [r0], {#0x20}  @ vldm r0, {d16-d31}
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::saveiWMMX(unw_fpreg_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm9saveiWMMXEPy)
+  stcl p1, cr0, [r0], #8  @ wstrd wR0, [r0], #8
+  stcl p1, cr1, [r0], #8  @ wstrd wR1, [r0], #8
+  stcl p1, cr2, [r0], #8  @ wstrd wR2, [r0], #8
+  stcl p1, cr3, [r0], #8  @ wstrd wR3, [r0], #8
+  stcl p1, cr4, [r0], #8  @ wstrd wR4, [r0], #8
+  stcl p1, cr5, [r0], #8  @ wstrd wR5, [r0], #8
+  stcl p1, cr6, [r0], #8  @ wstrd wR6, [r0], #8
+  stcl p1, cr7, [r0], #8  @ wstrd wR7, [r0], #8
+  stcl p1, cr8, [r0], #8  @ wstrd wR8, [r0], #8
+  stcl p1, cr9, [r0], #8  @ wstrd wR9, [r0], #8
+  stcl p1, cr10, [r0], #8  @ wstrd wR10, [r0], #8
+  stcl p1, cr11, [r0], #8  @ wstrd wR11, [r0], #8
+  stcl p1, cr12, [r0], #8  @ wstrd wR12, [r0], #8
+  stcl p1, cr13, [r0], #8  @ wstrd wR13, [r0], #8
+  stcl p1, cr14, [r0], #8  @ wstrd wR14, [r0], #8
+  stcl p1, cr15, [r0], #8  @ wstrd wR15, [r0], #8
+  mov pc, lr
+
+@
+@ static void libunwind::Registers_arm::saveiWMMXControl(unw_uint32_t* values)
+@
+@ On entry:
+@  values pointer is in r0
+@
+  .p2align 2
+DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveiWMMXControlEPj)
+  stc2 p1, cr8, [r0], #4  @ wstrw wCGR0, [r0], #4
+  stc2 p1, cr9, [r0], #4  @ wstrw wCGR1, [r0], #4
+  stc2 p1, cr10, [r0], #4  @ wstrw wCGR2, [r0], #4
+  stc2 p1, cr11, [r0], #4  @ wstrw wCGR3, [r0], #4
+  mov pc, lr
+
+#elif __mips64
+#
+# extern int unw_getcontext(unw_context_t* thread_state)
+# ToDo:
+#
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+  j $31
+
+#elif __mips__
+#
+# extern int unw_getcontext(unw_context_t* thread_state)
+# ToDo:
+#
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+  j $31
+
+#endif
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/assembly.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/assembly.h
new file mode 100644
index 0000000..210d350
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/assembly.h
@@ -0,0 +1,46 @@
+/* ===-- assembly.h - libUnwind assembler support macros -------------------===
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file defines macros for use in libUnwind assembler source.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#ifndef UNWIND_ASSEMBLY_H
+#define UNWIND_ASSEMBLY_H
+
+#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__)
+#define SEPARATOR @
+#elif defined(__arm64__)
+#define SEPARATOR %%
+#else
+#define SEPARATOR ;
+#endif
+
+#if defined(__APPLE__)
+#define HIDDEN_DIRECTIVE .private_extern
+#else
+#define HIDDEN_DIRECTIVE .hidden
+#endif
+
+#define GLUE2(a, b) a ## b
+#define GLUE(a, b) GLUE2(a, b)
+#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
+
+#define DEFINE_LIBUNWIND_FUNCTION(name)                   \
+  .globl SYMBOL_NAME(name) SEPARATOR                      \
+  SYMBOL_NAME(name):
+
+#define DEFINE_LIBUNWIND_PRIVATE_FUNCTION(name)           \
+  .globl SYMBOL_NAME(name) SEPARATOR                      \
+  HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR            \
+  SYMBOL_NAME(name):
+
+#endif /* UNWIND_ASSEMBLY_H */
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/config.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/config.h
index 2b92464..ebd600f 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/config.h
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/config.h
@@ -14,16 +14,23 @@
 #ifndef LIBUNWIND_CONFIG_H
 #define LIBUNWIND_CONFIG_H
 
+#ifndef NDEBUG
+#include <stdio.h> // for logging
+#endif
+
 #include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
 
 // Define static_assert() unless already defined by compiler.
 #ifndef __has_feature
   #define __has_feature(__x) 0
 #endif
-#if !(__has_feature(cxx_static_assert))
-  #define static_assert(__b, __m) \
-      extern int compile_time_assert_failed[ ( __b ) ? 1 : -1 ]  \
-                                                  __attribute__( ( unused ) );
+#if !(__has_feature(cxx_static_assert)) && !defined(static_assert)
+// TODO(ajwong): This caused some compile failures on gcc.
+//  #define static_assert(__b, __m) \
+//      extern int compile_time_assert_failed[ ( __b ) ? 1 : -1 ]  \
+//                                                  __attribute__( ( unused ) );
 #endif
 
 // Platform specific configuration defines.
@@ -47,26 +54,36 @@
   #define _LIBUNWIND_ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg)
 
   #if FOR_DYLD
-    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
-    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND   0
-    #define _LIBUNWIND_SUPPORT_DWARF_INDEX    0
+    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND   1
+    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND     0
+    #define _LIBUNWIND_SUPPORT_DWARF_INDEX      0
+    #define _LIBUNWIND_IS_BAREMETAL             0
   #else
-    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
-    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND   1
-    #define _LIBUNWIND_SUPPORT_DWARF_INDEX    0
+    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND   1
+    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND     1
+    #define _LIBUNWIND_SUPPORT_DWARF_INDEX      0
+    #define _LIBUNWIND_IS_BAREMETAL             0
   #endif
 
 #else
-  // #define _LIBUNWIND_BUILD_ZERO_COST_APIS
-  // #define _LIBUNWIND_BUILD_SJLJ_APIS
-  // #define _LIBUNWIND_SUPPORT_FRAME_APIS
-  // #define _LIBUNWIND_EXPORT
-  // #define _LIBUNWIND_HIDDEN
-  // #define _LIBUNWIND_LOG()
-  // #define _LIBUNWIND_ABORT()
-  // #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND
-  // #define _LIBUNWIND_SUPPORT_DWARF_UNWIND
-  // #define _LIBUNWIND_SUPPORT_DWARF_INDEX
+  static inline void assert_rtn(const char* func, const char* file, int line, const char* msg)  __attribute__ ((noreturn));
+  static inline void assert_rtn(const char* func, const char* file, int line, const char* msg) {
+    fprintf(stderr, "libunwind: %s %s:%d - %s\n",  func, file, line, msg);
+    assert(false);
+    abort();
+  }
+  #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__i386__ || __x86_64__ || __arm64__ || __arm__ || __mips__)
+  #define _LIBUNWIND_BUILD_SJLJ_APIS      0
+  #define _LIBUNWIND_SUPPORT_FRAME_APIS   (__i386__ || __x86_64__)
+  #define _LIBUNWIND_EXPORT               __attribute__((visibility("default")))
+  #define _LIBUNWIND_HIDDEN               __attribute__((visibility("hidden")))
+  #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
+  #define _LIBUNWIND_ABORT(msg) assert_rtn(__func__, __FILE__, __LINE__, msg)
+
+  #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND   0
+  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND     defined(__mips__)
+  #define _LIBUNWIND_SUPPORT_DWARF_INDEX      0
+  #define _LIBUNWIND_IS_BAREMETAL             0
 #endif
 
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp
index 2043ac2..0c07c15 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/Unwind/libunwind.cpp
@@ -12,11 +12,16 @@
 
 #include <libunwind.h>
 
+#ifndef NDEBUG
+#include <cstdlib> // getenv
+#endif
 #include <new>
 
 #include "libunwind_ext.h"
 #include "config.h"
 
+#include <stdlib.h>
+
 
 #if _LIBUNWIND_BUILD_ZERO_COST_APIS
 
@@ -50,6 +55,9 @@
 #elif __arm64__
   new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_arm64>(
                                  context, LocalAddressSpace::sThisAddressSpace);
+#elif __arm__
+  new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_arm>(
+                                 context, LocalAddressSpace::sThisAddressSpace);
 #endif
   AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
   co->setInfoBasedOnIPRegister();
@@ -160,24 +168,16 @@
 /// Set value of specified register at cursor position in stack frame.
 _LIBUNWIND_EXPORT int unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum,
                                   unw_word_t value) {
-  _LIBUNWIND_TRACE_API("unw_set_reg(cursor=%p, regNum=%d, value=0x%llX)\n",
-                             cursor, regNum, value);
+  _LIBUNWIND_TRACE_API("unw_set_reg(cursor=%p, regNum=%d, value=0x%lX)\n",
+                       cursor, regNum, (long)value);
   typedef LocalAddressSpace::pint_t pint_t;
   AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
   if (co->validReg(regNum)) {
     co->setReg(regNum, (pint_t)value);
     // specical case altering IP to re-find info (being called by personality
     // function)
-    if (regNum == UNW_REG_IP) {
-      unw_proc_info_t info;
-      co->getInfo(&info);
-      pint_t orgArgSize = (pint_t)info.gp;
-      uint64_t orgFuncStart = info.start_ip;
+    if (regNum == UNW_REG_IP)
       co->setInfoBasedOnIPRegister(false);
-      // and adjust REG_SP if there was a DW_CFA_GNU_args_size
-      if ((orgFuncStart == info.start_ip) && (orgArgSize != 0))
-        co->setReg(UNW_REG_SP, co->getReg(UNW_REG_SP) + orgArgSize);
-    }
     return UNW_ESUCCESS;
   }
   return UNW_EBADREG;
@@ -201,8 +201,11 @@
 /// Set value of specified float register at cursor position in stack frame.
 _LIBUNWIND_EXPORT int unw_set_fpreg(unw_cursor_t *cursor, unw_regnum_t regNum,
                                     unw_fpreg_t value) {
-  _LIBUNWIND_TRACE_API("unw_set_fpreg(cursor=%p, regNum=%d, value=%g)\n",
-                             cursor, regNum, value);
+#if __arm__
+  _LIBUNWIND_TRACE_API("unw_set_fpreg(cursor=%p, regNum=%d, value=%llx)\n", cursor, regNum, value);
+#else
+  _LIBUNWIND_TRACE_API("unw_set_fpreg(cursor=%p, regNum=%d, value=%g)\n", cursor, regNum, value);
+#endif
   AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
   if (co->validFloatReg(regNum)) {
     co->setFloatReg(regNum, value);
@@ -247,7 +250,7 @@
 _LIBUNWIND_EXPORT int unw_get_proc_name(unw_cursor_t *cursor, char *buf,
                                         size_t bufLen, unw_word_t *offset) {
   _LIBUNWIND_TRACE_API("unw_get_proc_name(cursor=%p, &buf=%p,"
-                             "bufLen=%ld)\n", cursor, buf, bufLen);
+                             "bufLen=%zu)\n", cursor, buf, bufLen);
   AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
   if (co->getFunctionName(buf, bufLen, offset))
     return UNW_ESUCCESS;
@@ -282,6 +285,15 @@
   return co->isSignalFrame();
 }
 
+#if __arm__
+// Save VFP registers d0-d15 using FSTMIADX instead of FSTMIADD
+_LIBUNWIND_EXPORT void unw_save_vfp_as_X(unw_cursor_t *cursor) {
+  _LIBUNWIND_TRACE_API("unw_fpreg_save_vfp_as_X(cursor=%p)\n", cursor);
+  AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
+  return co->saveVFPAsX();
+}
+#endif
+
 
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND
 /// SPI: walks cached dwarf entries
@@ -324,6 +336,7 @@
 
 // Add logging hooks in Debug builds only
 #ifndef NDEBUG
+#include <stdlib.h>
 
 _LIBUNWIND_HIDDEN
 bool logAPIs() {
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/config.h b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/config.h
new file mode 100644
index 0000000..0ca9791
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/config.h
@@ -0,0 +1,48 @@
+//===----------------------------- config.h -------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//
+//  Defines macros used within the libc++abi project.
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifndef LIBCXXABI_CONFIG_H
+#define LIBCXXABI_CONFIG_H
+
+#include <unistd.h>
+
+#if defined(_POSIX_THREADS) && _POSIX_THREADS > 0
+#  define LIBCXXABI_SINGLE_THREADED 0
+#else
+#  define LIBCXXABI_SINGLE_THREADED 1
+#endif
+
+// Set this in the CXXFLAGS when you need it, because otherwise we'd have to
+// #if !defined(__linux__) && !defined(__APPLE__) && ...
+// and so-on for *every* platform.
+#ifndef LIBCXXABI_BARE_METAL
+#  define LIBCXXABI_BARE_METAL 0
+#endif
+
+// -- BEGIN Taken from gabixx_config.h for gcc compat
+// Clang provides __sync_swap(), but GCC does not.
+// IMPORTANT: For GCC, __sync_lock_test_and_set has acquire semantics only
+// so an explicit __sync_synchronize is needed to ensure a full barrier.
+// TODO(digit): Use __atomic_swap_acq_rel when available.
+#if !defined(__clang__)
+#  define __sync_swap(address, value)  \
+  __extension__ ({ \
+    __typeof__(*(address)) __ret = __sync_lock_test_and_set((address),(value)); \
+    __sync_synchronize(); \
+    __ret; \
+  })
+#endif
+// -- END Taken from gabixx_config.h for gcc compat
+
+
+#endif // LIBCXXABI_CONFIG_H
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_aux_runtime.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_aux_runtime.cpp
index abd8091..15fede0 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_aux_runtime.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_aux_runtime.cpp
@@ -7,7 +7,7 @@
 //
 //
 // This file implements the "Auxiliary Runtime APIs"
-// http://www.codesourcery.com/public/cxx-abi/abi-eh.html#cxx-aux
+// http://mentorembedded.github.io/cxx-abi/abi-eh.html#cxx-aux
 //===----------------------------------------------------------------------===//
 
 #include "cxxabi.h"
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp
index 27ffb71..583edb4 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp
@@ -13,6 +13,7 @@
 #include <new>
 #include <exception>
 #include "abort_message.h"
+#include "config.h" // For __sync_swap
 #include "cxxabi.h"
 #include "cxa_handlers.hpp"
 #include "cxa_exception.hpp"
@@ -91,6 +92,9 @@
 std::unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
 
 // In the future these will become:
+// TODO(ajwong): Can this actually be true? Is std::atomic part of libc++? If so, do we have a
+// layering violation?
+//
 // std::atomic<std::terminate_handler>  __cxa_terminate_handler(default_terminate_handler);
 // std::atomic<std::unexpected_handler> __cxa_unexpected_handler(default_unexpected_handler);
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_demangle.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_demangle.cpp
index ba8225c..2d07686 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_demangle.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_demangle.cpp
@@ -38,7 +38,8 @@
 template <class C>
     const char* parse_encoding(const char* first, const char* last, C& db);
 template <class C>
-    const char* parse_name(const char* first, const char* last, C& db);
+    const char* parse_name(const char* first, const char* last, C& db,
+                           bool* ends_with_template_args = 0);
 template <class C>
     const char* parse_expression(const char* first, const char* last, C& db);
 template <class C>
@@ -155,7 +156,11 @@
 template <>
 struct float_data<long double>
 {
+#if defined(__arm__)
+    static const size_t mangled_size = 16;
+#else
     static const size_t mangled_size = 20;  // May need to be adjusted to 16 or 24 on other platforms
+#endif
     static const size_t max_demangled_size = 40;
     static constexpr const char* spec = "%LaL";
 };
@@ -352,6 +357,7 @@
 //                ::= Di   # char32_t
 //                ::= Ds   # char16_t
 //                ::= Da   # auto (in dependent new-expressions)
+//                ::= Dc   # decltype(auto)
 //                ::= Dn   # std::nullptr_t (i.e., decltype(nullptr))
 //                ::= u <source-name>    # vendor extended type
 
@@ -487,6 +493,10 @@
                     db.names.push_back("auto");
                     first += 2;
                     break;
+                case 'c':
+                    db.names.push_back("decltype(auto)");
+                    first += 2;
+                    break;
                 case 'n':
                     db.names.push_back("std::nullptr_t");
                     first += 2;
@@ -539,6 +549,8 @@
         {
             if (first[1] == '_')
             {
+                if (db.template_param.empty())
+                    return first;
                 if (!db.template_param.back().empty())
                 {
                     for (auto& t : db.template_param.back().front())
@@ -561,7 +573,7 @@
                     sub *= 10;
                     sub += static_cast<size_t>(*t - '0');
                 }
-                if (t == last || *t != '_')
+                if (t == last || *t != '_' || db.template_param.empty())
                     return first;
                 ++sub;
                 if (sub < db.template_param.back().size())
@@ -596,6 +608,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto expr = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back() = "const_cast<" + db.names.back().move_full() + ">(" + expr + ")";
@@ -620,6 +634,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto expr = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back() = "dynamic_cast<" + db.names.back().move_full() + ">(" + expr + ")";
@@ -644,6 +660,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto expr = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back() = "reinterpret_cast<" + db.names.back().move_full() + ">(" + expr + ")";
@@ -668,6 +686,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto expr = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back() = "static_cast<" + db.names.back().move_full() + ">(" + expr + ")";
@@ -704,6 +724,8 @@
         const char* t = parse_type(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back() = "sizeof (" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -722,6 +744,8 @@
         const char* t = parse_expression(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back() = "sizeof (" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -813,6 +837,8 @@
         const char* t = parse_function_param(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back() = "sizeof...(" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -836,6 +862,8 @@
             t = parse_type(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back() = "typeid(" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -854,6 +882,8 @@
         const char* t = parse_expression(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back() = "throw " + db.names.back().move_full();
             first = t;
         }
@@ -875,6 +905,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto expr = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first += ".*" + expr;
@@ -899,6 +931,8 @@
             const char* t1 = parse_template_args(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto args = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first += std::move(args);
@@ -945,6 +979,8 @@
             t = parse_decltype(first, last, db);
             if (t != first)
             {
+                if (db.names.empty())
+                    return first;
                 db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                 first = t;
             }
@@ -960,6 +996,8 @@
                     t = parse_unqualified_name(first+2, last, db);
                     if (t != first+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first.insert(0, "std::");
                         db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                         first = t;
@@ -986,6 +1024,8 @@
             t = parse_simple_id(first, last, db);
         if (t != first)
         {
+            if (db.names.empty())
+                return first;
             db.names.back().first.insert(0, "~");
             first = t;
         }
@@ -1017,6 +1057,8 @@
                     first = parse_template_args(t, last, db);
                     if (first != t)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto args = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first += std::move(args);
@@ -1041,6 +1083,8 @@
                     first = parse_template_args(t, last, db);
                     if (first != t)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto args = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first += std::move(args);
@@ -1090,7 +1134,11 @@
         if (t2 != t)
         {
             if (global)
+            {
+                if (db.names.empty())
+                    return first;
                 db.names.back().first.insert(0, "::");
+            }
             first = t2;
         }
         else if (last - t > 2 && t[0] == 's' && t[1] == 'r')
@@ -1105,6 +1153,8 @@
                 t1 = parse_template_args(t, last, db);
                 if (t1 != t)
                 {
+                    if (db.names.size() < 2)
+                        return first;
                     auto args = db.names.back().move_full();
                     db.names.pop_back();
                     db.names.back().first += std::move(args);
@@ -1118,7 +1168,7 @@
                 while (*t != 'E')
                 {
                     t1 = parse_unresolved_qualifier_level(t, last, db);
-                    if (t1 == t || t1 == last)
+                    if (t1 == t || t1 == last || db.names.size() < 2)
                         return first;
                     auto s = db.names.back().move_full();
                     db.names.pop_back();
@@ -1129,9 +1179,12 @@
                 t1 = parse_base_unresolved_name(t, last, db);
                 if (t1 == t)
                 {
-                    db.names.pop_back();
+                    if (!db.names.empty())
+                        db.names.pop_back();
                     return first;
                 }
+                if (db.names.size() < 2)
+                    return first;
                 auto s = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first += "::" + std::move(s);
@@ -1147,6 +1200,8 @@
                     t1 = parse_template_args(t, last, db);
                     if (t1 != t)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto args = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first += std::move(args);
@@ -1155,9 +1210,12 @@
                     t1 = parse_base_unresolved_name(t, last, db);
                     if (t1 == t)
                     {
-                        db.names.pop_back();
+                        if (!db.names.empty())
+                            db.names.pop_back();
                         return first;
                     }
+                    if (db.names.size() < 2)
+                        return first;
                     auto s = db.names.back().move_full();
                     db.names.pop_back();
                     db.names.back().first += "::" + std::move(s);
@@ -1170,11 +1228,15 @@
                         return first;
                     t = t1;
                     if (global)
+                    {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first.insert(0, "::");
+                    }
                     while (*t != 'E')
                     {
                         t1 = parse_unresolved_qualifier_level(t, last, db);
-                        if (t1 == t || t1 == last)
+                        if (t1 == t || t1 == last || db.names.size() < 2)
                             return first;
                         auto s = db.names.back().move_full();
                         db.names.pop_back();
@@ -1185,9 +1247,12 @@
                     t1 = parse_base_unresolved_name(t, last, db);
                     if (t1 == t)
                     {
-                        db.names.pop_back();
+                        if (!db.names.empty())
+                            db.names.pop_back();
                         return first;
                     }
+                    if (db.names.size() < 2)
+                        return first;
                     auto s = db.names.back().move_full();
                     db.names.pop_back();
                     db.names.back().first += "::" + std::move(s);
@@ -1213,6 +1278,8 @@
             const char* t1 = parse_unresolved_name(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto name = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first += "." + name;
@@ -1236,6 +1303,8 @@
         {
             if (t == last)
                 return first;
+            if (db.names.empty())
+                return first;
             db.names.back().first += db.names.back().second;
             db.names.back().second = typename C::String();
             db.names.back().first.append("(");
@@ -1245,10 +1314,14 @@
                 const char* t1 = parse_expression(t, last, db);
                 if (t1 == t || t1 == last)
                     return first;
+                if (db.names.empty())
+                    return first;
                 auto tmp = db.names.back().move_full();
                 db.names.pop_back();
                 if (!tmp.empty())
                 {
+                    if (db.names.empty())
+                        return first;
                     if (!first_expr)
                     {
                         db.names.back().first.append(", ");
@@ -1259,6 +1332,8 @@
                 t = t1;
             }
             ++t;
+            if (db.names.empty())
+                return first;
             db.names.back().first.append(")");
             first = t;
         }
@@ -1301,10 +1376,14 @@
                 has_expr_list = true;
                 if (!first_expr)
                 {
+                    if (db.names.empty())
+                        return first;
                     auto tmp = db.names.back().move_full();
                     db.names.pop_back();
                     if (!tmp.empty())
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first.append(", ");
                         db.names.back().first.append(tmp);
                         first_expr = false;
@@ -1330,10 +1409,14 @@
                         return first;
                     if (!first_expr)
                     {
+                        if (db.names.empty())
+                            return first;
                         auto tmp = db.names.back().move_full();
                         db.names.pop_back();
                         if (!tmp.empty())
                         {
+                            if (db.names.empty())
+                                return first;
                             db.names.back().first.append(", ");
                             db.names.back().first.append(tmp);
                             first_expr = false;
@@ -1347,14 +1430,20 @@
             typename C::String init_list;
             if (has_init)
             {
+                if (db.names.empty())
+                    return first;
                 init_list = db.names.back().move_full();
                 db.names.pop_back();
             }
+            if (db.names.empty())
+                return first;
             auto type = db.names.back().move_full();
             db.names.pop_back();
             typename C::String expr_list;
             if (has_expr_list)
             {
+                if (db.names.empty())
+                    return first;
                 expr_list = db.names.back().move_full();
                 db.names.pop_back();
             }
@@ -1416,10 +1505,14 @@
                             return first;
                         if (!first_expr)
                         {
+                            if (db.names.empty())
+                                return first;
                             auto tmp = db.names.back().move_full();
                             db.names.pop_back();
                             if (!tmp.empty())
                             {
+                                if (db.names.empty())
+                                    return first;
                                 db.names.back().first.append(", ");
                                 db.names.back().first.append(tmp);
                                 first_expr = false;
@@ -1430,6 +1523,8 @@
                 }
                 ++t;
             }
+            if (db.names.size() < 2)
+                return first;
             auto tmp = db.names.back().move_full();
             db.names.pop_back();
             db.names.back() = "(" + db.names.back().move_full() + ")(" + tmp + ")";
@@ -1453,6 +1548,8 @@
             const char* t1 = parse_expression(t, last, db);
             if (t1 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto tmp = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first += "->";
@@ -1545,6 +1642,8 @@
                     sig += " &&";
                     break;
                 }
+                if (db.names.empty())
+                    return first;
                 db.names.back().first += " ";
                 db.names.back().second.insert(0, sig);
                 first = t;
@@ -1568,6 +1667,8 @@
             const char* t2 = parse_type(t, last, db);
             if (t2 != t)
             {
+                if (db.names.size() < 2)
+                    return first;
                 auto func = std::move(db.names.back());
                 db.names.pop_back();
                 auto class_type = std::move(db.names.back());
@@ -1602,6 +1703,8 @@
             const char* t = parse_type(first+2, last, db);
             if (t != first+2)
             {
+                if (db.names.empty())
+                    return first;
                 if (db.names.back().second.substr(0, 2) == " [")
                     db.names.back().second.erase(0, 1);
                 db.names.back().second.insert(0, " []");
@@ -1616,6 +1719,8 @@
                 const char* t2 = parse_type(t+1, last, db);
                 if (t2 != t+1)
                 {
+                    if (db.names.empty())
+                        return first;
                     if (db.names.back().second.substr(0, 2) == " [")
                         db.names.back().second.erase(0, 1);
                     db.names.back().second.insert(0, " [" + typename C::String(first+1, t) + "]");
@@ -1631,6 +1736,8 @@
                 const char* t2 = parse_type(++t, last, db);
                 if (t2 != t)
                 {
+                    if (db.names.size() < 2)
+                        return first;
                     auto type = std::move(db.names.back());
                     db.names.pop_back();
                     auto expr = std::move(db.names.back());
@@ -1663,6 +1770,8 @@
                 const char* t = parse_expression(first+2, last, db);
                 if (t != first+2 && t != last && *t == 'E')
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back() = "decltype(" + db.names.back().move_full() + ")";
                     first = t+1;
                 }
@@ -1700,6 +1809,8 @@
                     const char* t1 = parse_type(t, last, db);
                     if (t1 != t)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first += " vector[" + typename C::String(num, sz) + "]";
                         first = t1;
                     }
@@ -1721,6 +1832,8 @@
                 const char* t = parse_expression(t1, last, db);
                 if (t != t1)
                 {
+                    if (db.names.empty())
+                        return first;
                     num = db.names.back().move_full();
                     db.names.pop_back();
                     t1 = t;
@@ -1731,6 +1844,8 @@
                 const char* t = parse_type(t1, last, db);
                 if (t != t1)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first += " vector[" + num + "]";
                     first = t;
                 }
@@ -1841,6 +1956,8 @@
                         t = parse_array_type(first, last, db);
                         if (t != first)
                         {
+                            if (db.names.empty())
+                                return first;
                             first = t;
                             db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                         }
@@ -1849,6 +1966,8 @@
                         t = parse_type(first+1, last, db);
                         if (t != first+1)
                         {
+                            if (db.names.empty())
+                                return first;
                             db.names.back().first.append(" complex");
                             first = t;
                             db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
@@ -1858,6 +1977,8 @@
                         t = parse_function_type(first, last, db);
                         if (t != first)
                         {
+                            if (db.names.empty())
+                                return first;
                             first = t;
                             db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                         }
@@ -1866,6 +1987,8 @@
                         t = parse_type(first+1, last, db);
                         if (t != first+1)
                         {
+                            if (db.names.empty())
+                                return first;
                             db.names.back().first.append(" imaginary");
                             first = t;
                             db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
@@ -1875,6 +1998,8 @@
                         t = parse_pointer_to_member_type(first, last, db);
                         if (t != first)
                         {
+                            if (db.names.empty())
+                                return first;
                             first = t;
                             db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                         }
@@ -2002,6 +2127,8 @@
                                 const char* t2 = parse_type(t, last, db);
                                 if (t2 != t)
                                 {
+                                    if (db.names.size() < 2)
+                                        return first;
                                     auto type = db.names.back().move_full();
                                     db.names.pop_back();
                                     if (db.names.back().first.substr(0, 9) != "objcproto")
@@ -2034,6 +2161,8 @@
                             t = parse_name(first, last, db);
                             if (t != first)
                             {
+                                if (db.names.empty())
+                                    return first;
                                 db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                                 first = t;
                             }
@@ -2049,6 +2178,8 @@
                                 t = parse_template_args(first, last, db);
                                 if (t != first)
                                 {
+                                    if (db.names.size() < 2)
+                                        return first;
                                     auto template_args = db.names.back().move_full();
                                     db.names.pop_back();
                                     db.names.back().first += template_args;
@@ -2084,6 +2215,8 @@
                                 t = parse_decltype(first, last, db);
                                 if (t != first)
                                 {
+                                    if (db.names.empty())
+                                        return first;
                                     db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                                     first = t;
                                     return first;
@@ -2093,6 +2226,8 @@
                                 t = parse_vector_type(first, last, db);
                                 if (t != first)
                                 {
+                                    if (db.names.empty())
+                                        return first;
                                     db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                                     first = t;
                                     return first;
@@ -2114,6 +2249,8 @@
                             t = parse_name(first, last, db);
                             if (t != first)
                             {
+                                if (db.names.empty())
+                                    return first;
                                 db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                                 first = t;
                             }
@@ -2150,6 +2287,7 @@
 //                   ::= gt    # >             
 //                   ::= ix    # []            
 //                   ::= le    # <=            
+//                   ::= li <source-name>  # operator ""
 //                   ::= ls    # <<            
 //                   ::= lS    # <<=           
 //                   ::= lt    # <             
@@ -2232,6 +2370,8 @@
                     db.try_to_parse_template_args = try_to_parse_template_args;
                     if (t != first+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first.insert(0, "operator ");
                         db.parsed_ctor_dtor_cv = true;
                         first = t;
@@ -2309,6 +2449,18 @@
                 db.names.push_back("operator<=");
                 first += 2;
                 break;
+            case 'i':
+                {
+                    const char* t = parse_source_name(first+2, last, db);
+                    if (t != first+2)
+                    {
+                        if (db.names.empty())
+                            return first;
+                        db.names.back().first.insert(0, "operator\"\" ");
+                        first = t;
+                    }
+                }
+                break;
             case 's':
                 db.names.push_back("operator<<");
                 first += 2;
@@ -2453,6 +2605,8 @@
                 const char* t = parse_source_name(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "operator ");
                     first = t;
                 }
@@ -2662,6 +2816,8 @@
                             ;
                         if (n != t && n != last && *n == 'E')
                         {
+                            if (db.names.empty())
+                                return first;
                             db.names.back() = "(" + db.names.back().move_full() + ")" + typename C::String(t, n);
                             first = n+1;
                             break;
@@ -2762,6 +2918,8 @@
             case '2':
             case '3':
             case '5':
+                if (db.names.empty())
+                    return first;
                 db.names.push_back(base_name(db.names.back().first));
                 first += 2;
                 db.parsed_ctor_dtor_cv = true;
@@ -2775,6 +2933,8 @@
             case '1':
             case '2':
             case '5':
+                if (db.names.empty())
+                    return first;
                 db.names.push_back("~" + base_name(db.names.back().first));
                 first += 2;
                 db.parsed_ctor_dtor_cv = true;
@@ -2845,6 +3005,8 @@
                     db.names.pop_back();
                     return first;
                 }
+                if (db.names.size() < 2)
+                    return first;
                 auto tmp = db.names.back().move_full();
                 db.names.pop_back();
                 db.names.back().first.append(tmp);
@@ -2854,6 +3016,8 @@
                     t1 = parse_type(t0, last, db);
                     if (t1 == t0)
                         break;
+                    if (db.names.size() < 2)
+                        return first;
                     tmp = db.names.back().move_full();
                     db.names.pop_back();
                     if (!tmp.empty())
@@ -2968,7 +3132,11 @@
         if (t1 != t0)
         {
             if (St)
+            {
+                if (db.names.empty())
+                    return first;
                 db.names.back().first.insert(0, "std::");
+            }
             first = t1;
         }
     }
@@ -2986,6 +3154,8 @@
         const char* t = parse_type(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back().first = "alignof (" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -3004,6 +3174,8 @@
         const char* t = parse_expression(first+2, last, db);
         if (t != first+2)
         {
+            if (db.names.empty())
+                return first;
             db.names.back().first = "alignof (" + db.names.back().move_full() + ")";
             first = t;
         }
@@ -3018,6 +3190,8 @@
     const char* t1 = parse_expression(first, last, db);
     if (t1 != first)
     {
+        if (db.names.empty())
+            return first;
         db.names.back().first =  "noexcept (" + db.names.back().move_full() + ")";
         first = t1;
     }
@@ -3031,6 +3205,8 @@
     const char* t1 = parse_expression(first, last, db);
     if (t1 != first)
     {
+        if (db.names.empty())
+            return first;
         db.names.back().first =  op + "(" + db.names.back().move_full() + ")";
         first = t1;
     }
@@ -3047,6 +3223,8 @@
         const char* t2 = parse_expression(t1, last, db);
         if (t2 != t1)
         {
+            if (db.names.size() < 2)
+                return first;
             auto op2 = db.names.back().move_full();
             db.names.pop_back();
             auto op1 = db.names.back().move_full();
@@ -3197,6 +3375,8 @@
                     const char* t1 = parse_expression(t+2, last, db);
                     if (t1 != t+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first = (parsed_gs ? typename C::String("::") : typename C::String()) +
                                           "delete[] " + db.names.back().move_full();
                         first = t1;
@@ -3216,6 +3396,8 @@
                     const char* t1 = parse_expression(t+2, last, db);
                     if (t1 != t+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back().first = (parsed_gs ? typename C::String("::") : typename C::String()) +
                                           "delete " + db.names.back().move_full();
                         first = t1;
@@ -3286,6 +3468,8 @@
                     const char* t2 = parse_expression(t1, last, db);
                     if (t2 != t1)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto op2 = db.names.back().move_full();
                         db.names.pop_back();
                         auto op1 = db.names.back().move_full();
@@ -3357,6 +3541,8 @@
                     const char* t1 = parse_expression(first+2, last, db);
                     if (t1 != first+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back() = "(" + db.names.back().move_full() + ")--";
                         first = t1;
                     }
@@ -3445,6 +3631,8 @@
                     const char* t1 = parse_expression(first+2, last, db);
                     if (t1 != first+2)
                     {
+                        if (db.names.empty())
+                            return first;
                         db.names.back() = "(" + db.names.back().move_full() + ")++";
                         first = t1;
                     }
@@ -3472,6 +3660,8 @@
                         const char* t3 = parse_expression(t2, last, db);
                         if (t3 != t2)
                         {
+                            if (db.names.size() < 3)
+                                return first;
                             auto op3 = db.names.back().move_full();
                             db.names.pop_back();
                             auto op2 = db.names.back().move_full();
@@ -3708,7 +3898,8 @@
 
 template <class C>
 const char*
-parse_nested_name(const char* first, const char* last, C& db)
+parse_nested_name(const char* first, const char* last, C& db,
+                  bool* ends_with_template_args)
 {
     if (first != last && *first == 'N')
     {
@@ -3739,8 +3930,10 @@
             return first;
         }
         bool pop_subs = false;
+        bool component_ends_with_template_args = false;
         while (*t0 != 'E')
         {
+            component_ends_with_template_args = false;
             const char* t1;
             switch (*t0)
             {
@@ -3810,6 +4003,7 @@
                     db.names.back().first += name;
                     db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                     t0 = t1;
+                    component_ends_with_template_args = true;
                 }
                 else
                     return first;
@@ -3841,6 +4035,8 @@
         db.cv = cv;
         if (pop_subs && !db.subs.empty())
             db.subs.pop_back();
+        if (ends_with_template_args)
+            *ends_with_template_args = component_ends_with_template_args;
     }
     return first;
 }
@@ -3888,7 +4084,8 @@
 
 template <class C>
 const char*
-parse_local_name(const char* first, const char* last, C& db)
+parse_local_name(const char* first, const char* last, C& db,
+                 bool* ends_with_template_args)
 {
     if (first != last && *first == 'Z')
     {
@@ -3899,6 +4096,8 @@
             {
             case 's':
                 first = parse_discriminator(t+1, last);
+                if (db.names.empty())
+                    return first;
                 db.names.back().first.append("::string literal");
                 break;
             case 'd':
@@ -3908,9 +4107,12 @@
                     if (t1 != last && *t1 == '_')
                     {
                         t = t1 + 1;
-                        t1 = parse_name(t, last, db);
+                        t1 = parse_name(t, last, db,
+                                        ends_with_template_args);
                         if (t1 != t)
                         {
+                            if (db.names.size() < 2)
+                                return first;
                             auto name = db.names.back().move_full();
                             db.names.pop_back();
                             db.names.back().first.append("::");
@@ -3924,11 +4126,14 @@
                 break;
             default:
                 {
-                    const char* t1 = parse_name(t, last, db);
+                    const char* t1 = parse_name(t, last, db,
+                                                ends_with_template_args);
                     if (t1 != t)
                     {
                         // parse but ignore discriminator
                         first = parse_discriminator(t1, last);
+                        if (db.names.size() < 2)
+                            return first;
                         auto name = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first.append("::");
@@ -3954,7 +4159,8 @@
 
 template <class C>
 const char*
-parse_name(const char* first, const char* last, C& db)
+parse_name(const char* first, const char* last, C& db,
+           bool* ends_with_template_args)
 {
     if (last - first >= 2)
     {
@@ -3966,14 +4172,16 @@
         {
         case 'N':
           {
-            const char* t1 = parse_nested_name(t0, last, db);
+            const char* t1 = parse_nested_name(t0, last, db,
+                                               ends_with_template_args);
             if (t1 != t0)
                 first = t1;
             break;
           }
         case 'Z':
           {
-            const char* t1 = parse_local_name(t0, last, db);
+            const char* t1 = parse_local_name(t0, last, db,
+                                              ends_with_template_args);
             if (t1 != t0)
                 first = t1;
             break;
@@ -3985,15 +4193,21 @@
             {
                 if (t1 != last && *t1 == 'I')  // <unscoped-template-name> <template-args>
                 {
+                    if (db.names.empty())
+                        return first;
                     db.subs.push_back(typename C::sub_type(1, db.names.back(), db.names.get_allocator()));
                     t0 = t1;
                     t1 = parse_template_args(t0, last, db);
                     if (t1 != t0)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto tmp = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first += tmp;
                         first = t1;
+                        if (ends_with_template_args)
+                            *ends_with_template_args = true;
                     }
                 }
                 else   // <unscoped-name>
@@ -4008,10 +4222,14 @@
                     t1 = parse_template_args(t0, last, db);
                     if (t1 != t0)
                     {
+                        if (db.names.size() < 2)
+                            return first;
                         auto tmp = db.names.back().move_full();
                         db.names.pop_back();
                         db.names.back().first += tmp;
                         first = t1;
+                        if (ends_with_template_args)
+                            *ends_with_template_args = true;
                     }
                 }
             }
@@ -4093,6 +4311,8 @@
                 t = parse_type(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "vtable for ");
                     first = t;
                 }
@@ -4102,6 +4322,8 @@
                 t = parse_type(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "VTT for ");
                     first = t;
                 }
@@ -4111,6 +4333,8 @@
                 t = parse_type(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "typeinfo for ");
                     first = t;
                 }
@@ -4120,6 +4344,8 @@
                 t = parse_type(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "typeinfo name for ");
                     first = t;
                 }
@@ -4136,6 +4362,8 @@
                 t = parse_encoding(t1, last, db);
                 if (t != t1)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "covariant return thunk to ");
                     first = t;
                 }
@@ -4152,6 +4380,8 @@
                         const char* t1 = parse_type(++t0, last, db);
                         if (t1 != t0)
                         {
+                            if (db.names.size() < 2)
+                                return first;
                             auto left = db.names.back().move_full();
                             db.names.pop_back();
                             db.names.back().first = "construction vtable for " +
@@ -4171,6 +4401,8 @@
                 t = parse_encoding(t0, last, db);
                 if (t != t0)
                 {
+                    if (db.names.empty())
+                        return first;
                     if (first[2] == 'v')
                     {
                         db.names.back().first.insert(0, "virtual thunk to ");
@@ -4194,6 +4426,8 @@
                 t = parse_name(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "guard variable for ");
                     first = t;
                 }
@@ -4203,6 +4437,8 @@
                 t = parse_name(first+2, last, db);
                 if (t != first+2)
                 {
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first.insert(0, "reference temporary for ");
                     first = t;
                 }
@@ -4214,6 +4450,26 @@
     return first;
 }
 
+template <class T>
+class save_value
+{
+    T& restore_;
+    T original_value_;
+public:
+    save_value(T& restore)
+        : restore_(restore),
+          original_value_(restore)
+        {}
+
+    ~save_value()
+    {
+        restore_ = std::move(original_value_);
+    }
+
+    save_value(const save_value&) = delete;
+    save_value& operator=(const save_value&) = delete;
+};
+
 // <encoding> ::= <function name> <bare-function-type>
 //            ::= <data name>
 //            ::= <special-name>
@@ -4224,6 +4480,11 @@
 {
     if (first != last)
     {
+        save_value<decltype(db.encoding_depth)> su(db.encoding_depth);
+        ++db.encoding_depth;
+        save_value<decltype(db.tag_templates)> sb(db.tag_templates);
+        if (db.encoding_depth > 1)
+            db.tag_templates = true;
         switch (*first)
         {
         case 'G':
@@ -4232,24 +4493,31 @@
             break;
         default:
           {
-            const char* t = parse_name(first, last, db);
+            bool ends_with_template_args = false;
+            const char* t = parse_name(first, last, db,
+                                       &ends_with_template_args);
             unsigned cv = db.cv;
             unsigned ref = db.ref;
             if (t != first)
             {
                 if (t != last && *t != 'E' && *t != '.')
                 {
-                    bool tag_templates = db.tag_templates;
+                    save_value<bool> sb2(db.tag_templates);
                     db.tag_templates = false;
                     const char* t2;
                     typename C::String ret2;
+                    if (db.names.empty())
+                        return first;
                     const typename C::String& nm = db.names.back().first;
-                    if (!db.parsed_ctor_dtor_cv && nm.back() == '>' && nm[nm.size()-2] != '-'
-                                                                    && nm[nm.size()-2] != '>')
+                    if (nm.empty())
+                        return first;
+                    if (!db.parsed_ctor_dtor_cv && ends_with_template_args)
                     {
                         t2 = parse_type(t, last, db);
                         if (t2 == t)
                             return first;
+                        if (db.names.size() < 2)
+                            return first;
                         auto ret1 = std::move(db.names.back().first);
                         ret2 = std::move(db.names.back().second);
                         if (ret2.empty())
@@ -4286,6 +4554,8 @@
                                     db.names.pop_back();
                                 if (!tmp.empty())
                                 {
+                                    if (db.names.empty())
+                                        return first;
                                     if (!first_arg)
                                         db.names.back().first += ", ";
                                     else
@@ -4296,6 +4566,8 @@
                             t = t2;
                         }
                     }
+                    if (db.names.empty())
+                        return first;
                     db.names.back().first += ')';
                     if (cv & 1)
                         db.names.back().first.append(" const");
@@ -4309,7 +4581,6 @@
                         db.names.back().first.append(" &&");
                     db.names.back().first += ret2;
                     first = t;
-                    db.tag_templates = tag_templates;
                 }
                 else
                     first = t;
@@ -4351,6 +4622,8 @@
             while (t != last && isdigit(*t))
                 ++t;
         }
+        if (db.names.empty())
+            return first;
         db.names.back().first.insert(0, "invocation function for block in ");
         first = t;
     }
@@ -4366,6 +4639,8 @@
 {
     if (first != last && *first == '.')
     {
+        if (db.names.empty())
+            return first;
         db.names.back().first += " (" + typename C::String(first, last) + ")";
         first = last;
     }
@@ -4572,29 +4847,54 @@
 const size_t bs = 4 * 1024;
 template <class T> using Alloc = short_alloc<T, bs>;
 template <class T> using Vector = std::vector<T, Alloc<T>>;
-using String = std::basic_string<char, std::char_traits<char>, malloc_alloc<char>>;
 
+template <class StrT>
 struct string_pair
 {
-    String first;
-    String second;
+    StrT first;
+    StrT second;
 
     string_pair() = default;
-    string_pair(String f) : first(std::move(f)) {}
-    string_pair(String f, String s)
+    string_pair(StrT f) : first(std::move(f)) {}
+    string_pair(StrT f, StrT s)
         : first(std::move(f)), second(std::move(s)) {}
     template <size_t N>
         string_pair(const char (&s)[N]) : first(s, N-1) {}
 
     size_t size() const {return first.size() + second.size();}
-    String full() const {return first + second;}
-    String move_full() {return std::move(first) + std::move(second);}
+    StrT full() const {return first + second;}
+    StrT move_full() {return std::move(first) + std::move(second);}
+};
+
+struct Db
+{
+    typedef std::basic_string<char, std::char_traits<char>,
+                              malloc_alloc<char>> String;
+    typedef Vector<string_pair<String>> sub_type;
+    typedef Vector<sub_type> template_param_type;
+    sub_type names;
+    template_param_type subs;
+    Vector<template_param_type> template_param;
+    unsigned cv;
+    unsigned ref;
+    unsigned encoding_depth;
+    bool parsed_ctor_dtor_cv;
+    bool tag_templates;
+    bool fix_forward_references;
+    bool try_to_parse_template_args;
+
+    template <size_t N>
+    Db(arena<N>& ar) :
+        names(ar),
+        subs(0, names, ar),
+        template_param(0, subs, ar)
+    {}
 };
 
 }  // unnamed namespace
 
-__attribute__ ((__visibility__("default")))
 extern "C"
+__attribute__ ((__visibility__("default")))
 char*
 __cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status)
 {
@@ -4606,31 +4906,10 @@
     }
     size_t internal_size = buf != nullptr ? *n : 0;
     arena<bs> a;
-    struct Db
-    {
-        typedef String String;
-        typedef Vector<string_pair> sub_type;
-        typedef Vector<sub_type> template_param_type;
-        Vector<string_pair> names;
-        Vector<sub_type> subs;
-        Vector<template_param_type> template_param;
-        unsigned cv;
-        unsigned ref;
-        bool parsed_ctor_dtor_cv;
-        bool tag_templates;
-        bool fix_forward_references;
-        bool try_to_parse_template_args;
-
-        template <size_t N>
-        Db(arena<N>& ar) :
-            names(ar),
-            subs(0, names, ar),
-            template_param(0, subs, ar)
-        {}
-    };
     Db db(a);
     db.cv = 0;
     db.ref = 0;
+    db.encoding_depth = 0;
     db.parsed_ctor_dtor_cv = false;
     db.tag_templates = true;
     db.template_param.emplace_back(a);
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.cpp
index c43777c..31ddc51 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.cpp
@@ -7,17 +7,19 @@
 //
 //  
 //  This file implements the "Exception Handling APIs"
-//  http://www.codesourcery.com/public/cxx-abi/abi-eh.html
+//  http://mentorembedded.github.io/cxx-abi/abi-eh.html
 //  
 //===----------------------------------------------------------------------===//
 
+#include "config.h"
 #include "cxxabi.h"
 
 #include <exception>        // for std::terminate
 #include <cstdlib>          // for malloc, free
 #include <cstring>          // for memset
-#include <pthread.h>
-
+#if !LIBCXXABI_SINGLE_THREADED
+#  include <pthread.h>      // for fallback_malloc.ipp's mutexes
+#endif
 #include "cxa_exception.hpp"
 #include "cxa_handlers.hpp"
 
@@ -232,7 +234,7 @@
     globals->uncaughtExceptions += 1;   // Not atomically, since globals are thread-local
 
     exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
     _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
 #else
     _Unwind_RaiseException(&exception_header->unwindHeader);
@@ -254,11 +256,102 @@
 void*
 __cxa_get_exception_ptr(void* unwind_exception) throw()
 {
+#if LIBCXXABI_ARM_EHABI
+    return reinterpret_cast<void*>(
+           static_cast<_Unwind_Control_Block*>(unwind_exception)->barrier_cache.bitpattern[0]);
+#else
     return cxa_exception_from_exception_unwind_exception
            (
                static_cast<_Unwind_Exception*>(unwind_exception)
            )->adjustedPtr;
+#endif
 }
+
+#if LIBCXXABI_ARM_EHABI
+/*
+The routine to be called before the cleanup.  This will save __cxa_exception in
+__cxa_eh_globals, so that __cxa_end_cleanup() can recover later.
+*/
+bool
+__cxa_begin_cleanup(void* unwind_arg) throw ()
+{
+    _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg);
+    __cxa_eh_globals* globals = __cxa_get_globals();
+    __cxa_exception* exception_header =
+        cxa_exception_from_exception_unwind_exception(unwind_exception);
+
+    if (isOurExceptionClass(unwind_exception))
+    {
+        if (0 == exception_header->propagationCount)
+        {
+            exception_header->nextPropagatingException = globals->propagatingExceptions;
+            globals->propagatingExceptions = exception_header;
+        }
+        ++exception_header->propagationCount;
+    }
+    else
+    {
+        // If the propagatingExceptions stack is not empty, since we can't
+        // chain the foreign exception, terminate it.
+        if (NULL != globals->propagatingExceptions)
+            std::terminate();
+        globals->propagatingExceptions = exception_header;
+    }
+    return true;
+}
+
+/*
+The routine to be called after the cleanup has been performed.  It will get the
+propagating __cxa_exception from __cxa_eh_globals, and continue the stack
+unwinding with _Unwind_Resume.
+
+According to ARM EHABI 8.4.1, __cxa_end_cleanup() should not clobber any
+register, thus we have to write this function in assembly so that we can save
+{r1, r2, r3}.  We don't have to save r0 because it is the return value and the
+first argument to _Unwind_Resume().  In addition, we are saving r4 in order to
+align the stack to 16 bytes, even though it is a callee-save register.
+*/
+__attribute__((used)) static _Unwind_Exception *
+__cxa_end_cleanup_impl()
+{
+    __cxa_eh_globals* globals = __cxa_get_globals();
+    __cxa_exception* exception_header = globals->propagatingExceptions;
+    if (NULL == exception_header)
+    {
+        // It seems that __cxa_begin_cleanup() is not called properly.
+        // We have no choice but terminate the program now.
+        std::terminate();
+    }
+
+    if (isOurExceptionClass(&exception_header->unwindHeader))
+    {
+        --exception_header->propagationCount;
+        if (0 == exception_header->propagationCount)
+        {
+            globals->propagatingExceptions = exception_header->nextPropagatingException;
+            exception_header->nextPropagatingException = NULL;
+        }
+    }
+    else
+    {
+        globals->propagatingExceptions = NULL;
+    }
+    return &exception_header->unwindHeader;
+}
+
+asm (
+    "	.pushsection	.text.__cxa_end_cleanup\n"
+    "	.globl	__cxa_end_cleanup\n"
+    "	.type	__cxa_end_cleanup,%function\n"
+    "__cxa_end_cleanup:\n"
+    "	push	{r1, r2, r3, r4}\n"
+    "	bl	__cxa_end_cleanup_impl\n"
+    "	pop	{r1, r2, r3, r4}\n"
+    "	bl	_Unwind_Resume\n"
+    "	bl	abort\n"
+    "	.popsection"
+);
+#endif  // LIBCXXABI_ARM_EHABI
     
 /*
 This routine can catch foreign or native exceptions.  If native, the exception
@@ -318,7 +411,11 @@
             globals->caughtExceptions = exception_header;
         }
         globals->uncaughtExceptions -= 1;   // Not atomically, since globals are thread-local
+#if LIBCXXABI_ARM_EHABI
+        return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
+#else
         return exception_header->adjustedPtr;
+#endif
     }
     // Else this is a foreign exception
     // If the caughtExceptions stack is not empty, terminate
@@ -352,6 +449,10 @@
 {
     static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception),
                   "sizeof(__cxa_exception) must be equal to sizeof(__cxa_dependent_exception)");
+    static_assert(offsetof(__cxa_exception, referenceCount) == offsetof(__cxa_dependent_exception, primaryException),
+                  "the layout of __cxa_exception must match the layout of __cxa_dependent_exception");
+    static_assert(offsetof(__cxa_exception, handlerCount) == offsetof(__cxa_dependent_exception, handlerCount),
+                  "the layout of __cxa_exception must match the layout of __cxa_dependent_exception");
     __cxa_eh_globals* globals = __cxa_get_globals_fast(); // __cxa_get_globals called in __cxa_begin_catch
     __cxa_exception* exception_header = globals->caughtExceptions;
     // If we've rethrown a foreign exception, then globals->caughtExceptions
@@ -465,7 +566,7 @@
         //   nothing
         globals->caughtExceptions = 0;
     }
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
     _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
 #else
     _Unwind_RaiseException(&exception_header->unwindHeader);
@@ -594,7 +695,7 @@
         setDependentExceptionClass(&dep_exception_header->unwindHeader);
         __cxa_get_globals()->uncaughtExceptions += 1;
         dep_exception_header->unwindHeader.exception_cleanup = dependent_exception_cleanup;
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
         _Unwind_SjLj_RaiseException(&dep_exception_header->unwindHeader);
 #else
         _Unwind_RaiseException(&dep_exception_header->unwindHeader);
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.hpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.hpp
index 66f05c4..9b22ce3 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.hpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception.hpp
@@ -7,7 +7,7 @@
 //
 //  
 //  This file implements the "Exception Handling APIs"
-//  http://www.codesourcery.com/public/cxx-abi/abi-eh.html
+//  http://mentorembedded.github.io/cxx-abi/abi-eh.html
 //  
 //===----------------------------------------------------------------------===//
 
@@ -26,98 +26,100 @@
 static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
 static const uint64_t get_vendor_and_language =     0xFFFFFFFFFFFFFF00; // mask for CLNGC++
                                                     
-    struct __cxa_exception { 
-#if __LP64__
+struct __cxa_exception { 
+#if __LP64__ || LIBCXXABI_ARM_EHABI
     // This is a new field to support C++ 0x exception_ptr.
     // For binary compatibility it is at the start of this
     // struct which is prepended to the object thrown in
     // __cxa_allocate_exception.
-        size_t referenceCount;
+    size_t referenceCount;
 #endif
     
     //  Manage the exception object itself.
-        std::type_info *exceptionType;
-        void (*exceptionDestructor)(void *); 
-        std::unexpected_handler unexpectedHandler;
-        std::terminate_handler  terminateHandler;
-        
-         __cxa_exception *nextException;
-        
-         int handlerCount;
-    
-#ifdef __ARM_EABI_UNWINDER__
-         __cxa_exception* nextPropagatingException;
-         int propagationCount;
+    std::type_info *exceptionType;
+    void (*exceptionDestructor)(void *); 
+    std::unexpected_handler unexpectedHandler;
+    std::terminate_handler  terminateHandler;
+
+    __cxa_exception *nextException;
+
+    int handlerCount;
+
+#if LIBCXXABI_ARM_EHABI
+    __cxa_exception* nextPropagatingException;
+    int propagationCount;
 #else
-         int handlerSwitchValue;
-         const unsigned char *actionRecord;
-         const unsigned char *languageSpecificData;
-         void *catchTemp;
-         void *adjustedPtr;
+    int handlerSwitchValue;
+    const unsigned char *actionRecord;
+    const unsigned char *languageSpecificData;
+    void *catchTemp;
+    void *adjustedPtr;
 #endif
 
-#if !__LP64__
+#if !__LP64__ && !LIBCXXABI_ARM_EHABI
     // This is a new field to support C++ 0x exception_ptr.
     // For binary compatibility it is placed where the compiler
     // previously adding padded to 64-bit align unwindHeader.
-        size_t referenceCount;
+    size_t referenceCount;
 #endif
-    
-        _Unwind_Exception unwindHeader;
-        };
+
+    _Unwind_Exception unwindHeader;
+};
 
 // http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html
-    
-    struct __cxa_dependent_exception {
-#if __LP64__
-        void* primaryException;
+// The layout of this structure MUST match the layout of __cxa_exception, with
+// primaryException instead of referenceCount.
+struct __cxa_dependent_exception {
+#if __LP64__ || LIBCXXABI_ARM_EHABI
+    void* primaryException;
 #endif
     
-        std::type_info *exceptionType;
-        void (*exceptionDestructor)(void *); 
-        std::unexpected_handler unexpectedHandler;
-        std::terminate_handler terminateHandler;
+    std::type_info *exceptionType;
+    void (*exceptionDestructor)(void *); 
+    std::unexpected_handler unexpectedHandler;
+    std::terminate_handler terminateHandler;
+
+    __cxa_exception *nextException;
+
+    int handlerCount;
     
-        __cxa_exception *nextException;
-    
-        int handlerCount;
-    
-#ifdef __ARM_EABI_UNWINDER__
-        __cxa_exception* nextPropagatingException;
-        int propagationCount;
+#if LIBCXXABI_ARM_EHABI
+    __cxa_exception* nextPropagatingException;
+    int propagationCount;
 #else
-        int handlerSwitchValue;
-        const unsigned char *actionRecord;
-        const unsigned char *languageSpecificData;
-        void * catchTemp;
-        void *adjustedPtr;
+    int handlerSwitchValue;
+    const unsigned char *actionRecord;
+    const unsigned char *languageSpecificData;
+    void * catchTemp;
+    void *adjustedPtr;
 #endif
     
-#if !__LP64__
-        void* primaryException;
+#if !__LP64__ && !LIBCXXABI_ARM_EHABI
+    void* primaryException;
 #endif
-    
-        _Unwind_Exception unwindHeader;
-        };
-        
-    struct __cxa_eh_globals {
-        __cxa_exception *   caughtExceptions;
-        unsigned int        uncaughtExceptions;
-#ifdef __ARM_EABI_UNWINDER__
-        __cxa_exception* propagatingExceptions;
+
+    _Unwind_Exception unwindHeader;
+};
+
+struct __cxa_eh_globals {
+    __cxa_exception *   caughtExceptions;
+    unsigned int        uncaughtExceptions;
+#if LIBCXXABI_ARM_EHABI
+    __cxa_exception* propagatingExceptions;
 #endif
-    };
+};
 
 #pragma GCC visibility pop
 #pragma GCC visibility push(default)
 
-    extern "C" __cxa_eh_globals * __cxa_get_globals      ();
-    extern "C" __cxa_eh_globals * __cxa_get_globals_fast ();
+extern "C" __cxa_eh_globals * __cxa_get_globals      ();
+extern "C" __cxa_eh_globals * __cxa_get_globals_fast ();
 
-    extern "C" void * __cxa_allocate_dependent_exception ();
-    extern "C" void __cxa_free_dependent_exception (void * dependent_exception);
+extern "C" void * __cxa_allocate_dependent_exception ();
+extern "C" void __cxa_free_dependent_exception (void * dependent_exception);
 
 #pragma GCC visibility pop
-}
+
+}  // namespace __cxxabiv1
 
 #endif  // _CXA_EXCEPTION_H
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception_storage.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception_storage.cpp
index b0b5524..6f902c6 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception_storage.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_exception_storage.cpp
@@ -7,13 +7,25 @@
 //
 //  
 //  This file implements the storage for the "Caught Exception Stack"
-//  http://www.codesourcery.com/public/cxx-abi/abi-eh.html (section 2.2.2)
+//  http://mentorembedded.github.io/cxx-abi/abi-eh.html (section 2.2.2)
 //  
 //===----------------------------------------------------------------------===//
 
 #include "cxa_exception.hpp"
 
-#ifdef HAS_THREAD_LOCAL
+#include "config.h"
+
+#if LIBCXXABI_SINGLE_THREADED
+
+namespace __cxxabiv1 {
+extern "C" {
+    static __cxa_eh_globals eh_globals;
+    __cxa_eh_globals *__cxa_get_globals() { return &eh_globals; }
+    __cxa_eh_globals *__cxa_get_globals_fast() { return &eh_globals; }
+    }
+}
+
+#elif defined(HAS_THREAD_LOCAL)
 
 namespace __cxxabiv1 {
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_guard.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_guard.cpp
index e403b64..c6ac89f 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_guard.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_guard.cpp
@@ -8,8 +8,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "abort_message.h"
+#include "config.h"
 
-#include <pthread.h>
+#if !LIBCXXABI_SINGLE_THREADED
+#  include <pthread.h>
+#endif
 #include <stdint.h>
 
 /*
@@ -59,8 +62,10 @@
 
 #endif
 
+#if !LIBCXXABI_SINGLE_THREADED
 pthread_mutex_t guard_mut = PTHREAD_MUTEX_INITIALIZER;
 pthread_cond_t  guard_cv  = PTHREAD_COND_INITIALIZER;
+#endif
 
 #if defined(__APPLE__) && !defined(__arm__)
 
@@ -161,6 +166,25 @@
 extern "C"
 {
 
+#if LIBCXXABI_SINGLE_THREADED
+int __cxa_guard_acquire(guard_type* guard_object)
+{
+    return !is_initialized(guard_object);
+}
+
+void __cxa_guard_release(guard_type* guard_object)
+{
+    *guard_object = 0;
+    set_initialized(guard_object);
+}
+
+void __cxa_guard_abort(guard_type* guard_object)
+{
+    *guard_object = 0;
+}
+
+#else // !LIBCXXABI_SINGLE_THREADED
+
 int __cxa_guard_acquire(guard_type* guard_object)
 {
     char* initialized = (char*)guard_object;
@@ -226,6 +250,8 @@
         abort_message("__cxa_guard_abort failed to broadcast condition variable");
 }
 
+#endif // !LIBCXXABI_SINGLE_THREADED
+
 }  // extern "C"
 
 }  // __cxxabiv1
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp
index 6c13fcd..674933b 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp
@@ -14,6 +14,7 @@
 #include <new>
 #include <exception>
 #include "abort_message.h"
+#include "config.h"
 #include "cxxabi.h"
 #include "cxa_handlers.hpp"
 #include "cxa_exception.hpp"
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_new_delete.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_new_delete.cpp
index f6db1aa..c2258e2 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_new_delete.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_new_delete.cpp
@@ -230,8 +230,23 @@
     return "bad_array_new_length";
 }
 
+#if 0  // WE DONT WANT NO C++14 FIXME can remove this if 0 now?
+
 // bad_array_length
 
+#ifndef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
+
+class _LIBCPP_EXCEPTION_ABI bad_array_length
+    : public bad_alloc
+{
+public:
+    bad_array_length() _NOEXCEPT;
+    virtual ~bad_array_length() _NOEXCEPT;
+    virtual const char* what() const _NOEXCEPT;
+};
+
+#endif  // _LIBCPP_BAD_ARRAY_LENGTH_DEFINED
+
 bad_array_length::bad_array_length() _NOEXCEPT
 {
 }
@@ -246,4 +261,6 @@
     return "bad_array_length";
 }
 
+#endif // WE DONT WANT NO C++14
+
 }  // std
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_personality.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_personality.cpp
index 97e5800..6a18576 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_personality.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_personality.cpp
@@ -7,11 +7,12 @@
 //
 //  
 //  This file implements the "Exception Handling APIs"
-//  http://www.codesourcery.com/public/cxx-abi/abi-eh.html
+//  http://mentorembedded.github.io/cxx-abi/abi-eh.html
 //  http://www.intel.com/design/itanium/downloads/245358.htm
 //  
 //===----------------------------------------------------------------------===//
 
+#include "config.h"
 #include "unwind.h"
 #include "cxa_exception.hpp"
 #include "cxa_handlers.hpp"
@@ -49,7 +50,7 @@
 +------------------+--+-----+-----+------------------------+--------------------------+
 | callSiteTableLength | (ULEB128) | Call Site Table length, used to find Action table |
 +---------------------+-----------+---------------------------------------------------+
-#if !__arm__
+#if !__USING_SJLJ_EXCEPTIONS__
 +---------------------+-----------+------------------------------------------------+
 | Beginning of Call Site Table            The current ip lies within the           |
 | ...                                     (start, length) range of one of these    |
@@ -63,7 +64,7 @@
 | +-------------+---------------------------------+------------------------------+ |
 | ...                                                                              |
 +----------------------------------------------------------------------------------+
-#else  // __arm_
+#else  // __USING_SJLJ_EXCEPTIONS__
 +---------------------+-----------+------------------------------------------------+
 | Beginning of Call Site Table            The current ip is a 1-based index into   |
 | ...                                     this table.  Or it is -1 meaning no      |
@@ -76,7 +77,7 @@
 | +-------------+---------------------------------+------------------------------+ |
 | ...                                                                              |
 +----------------------------------------------------------------------------------+
-#endif  // __arm_
+#endif  // __USING_SJLJ_EXCEPTIONS__
 +---------------------------------------------------------------------+
 | Beginning of Action Table       ttypeIndex == 0 : cleanup           |
 | ...                             ttypeIndex  > 0 : catch             |
@@ -307,6 +308,42 @@
     std::terminate();
 }
 
+#if LIBCXXABI_ARM_EHABI
+static const void* read_target2_value(const void* ptr)
+{
+    uintptr_t offset = *reinterpret_cast<const uintptr_t*>(ptr);
+    if (!offset)
+        return 0;
+    // "ARM EABI provides a TARGET2 relocation to describe these typeinfo
+    // pointers. The reason being it allows their precise semantics to be
+    // deferred to the linker. For bare-metal they turn into absolute
+    // relocations. For linux they turn into GOT-REL relocations."
+    // https://gcc.gnu.org/ml/gcc-patches/2009-08/msg00264.html
+#if LIBCXXABI_BARE_METAL
+    return reinterpret_cast<const void*>(reinterpret_cast<uintptr_t>(ptr) + offset);
+#else
+    return *reinterpret_cast<const void**>(reinterpret_cast<uintptr_t>(ptr) + offset);
+#endif
+}
+
+static const __shim_type_info*
+get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo,
+                   uint8_t ttypeEncoding, bool native_exception,
+                   _Unwind_Exception* unwind_exception)
+{
+    if (classInfo == 0)
+    {
+        // this should not happen.  Indicates corrupted eh_table.
+        call_terminate(native_exception, unwind_exception);
+    }
+
+    assert(ttypeEncoding == DW_EH_PE_absptr && "Unexpected TTypeEncoding");
+    (void)ttypeEncoding;
+
+    const uint8_t* ttypePtr = classInfo - ttypeIndex * sizeof(uintptr_t);
+    return reinterpret_cast<const __shim_type_info*>(read_target2_value(ttypePtr));
+}
+#else // !LIBCXXABI_ARM_EHABI
 static
 const __shim_type_info*
 get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo,
@@ -342,6 +379,7 @@
     classInfo -= ttypeIndex;
     return (const __shim_type_info*)readEncodedPointer(&classInfo, ttypeEncoding);
 }
+#endif // !LIBCXXABI_ARM_EHABI
 
 /*
     This is checking a thrown exception type, excpType, against a possibly empty
@@ -352,6 +390,49 @@
     the list will catch a excpType.  If any catchType in the list can catch an
     excpType, then this exception spec does not catch the excpType.
 */
+#if LIBCXXABI_ARM_EHABI
+static
+bool
+exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo,
+                         uint8_t ttypeEncoding, const __shim_type_info* excpType,
+                         void* adjustedPtr, _Unwind_Exception* unwind_exception)
+{
+    if (classInfo == 0)
+    {
+        // this should not happen.   Indicates corrupted eh_table.
+        call_terminate(false, unwind_exception);
+    }
+
+    assert(ttypeEncoding == DW_EH_PE_absptr && "Unexpected TTypeEncoding");
+    (void)ttypeEncoding;
+
+    // specIndex is negative of 1-based byte offset into classInfo;
+    specIndex = -specIndex;
+    --specIndex;
+    const void** temp = reinterpret_cast<const void**>(
+        reinterpret_cast<uintptr_t>(classInfo) +
+        static_cast<uintptr_t>(specIndex) * sizeof(uintptr_t));
+    // If any type in the spec list can catch excpType, return false, else return true
+    //    adjustments to adjustedPtr are ignored.
+    while (true)
+    {
+        // ARM EHABI exception specification table (filter table) consists of
+        // several pointers which will directly point to the type info object
+        // (instead of ttypeIndex).  The table will be terminated with 0.
+        const void** ttypePtr = temp++;
+        if (*ttypePtr == 0)
+            break;
+        // We can get the __shim_type_info simply by performing a
+        // R_ARM_TARGET2 relocation, and cast the result to __shim_type_info.
+        const __shim_type_info* catchType =
+            static_cast<const __shim_type_info*>(read_target2_value(ttypePtr));
+        void* tempPtr = adjustedPtr;
+        if (catchType->can_catch(excpType, tempPtr))
+            return false;
+    }
+    return true;
+}
+#else
 static
 bool
 exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo,
@@ -385,6 +466,7 @@
     }
     return true;
 }
+#endif
 
 static
 void*
@@ -421,15 +503,10 @@
 set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context,
               const scan_results& results)
 {
-#if __arm__
-    _Unwind_SetGR(context, 0, reinterpret_cast<uintptr_t>(unwind_exception));
-    _Unwind_SetGR(context, 1, static_cast<uintptr_t>(results.ttypeIndex));
-#else
     _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
                                  reinterpret_cast<uintptr_t>(unwind_exception));
     _Unwind_SetGR(context, __builtin_eh_return_data_regno(1),
                                     static_cast<uintptr_t>(results.ttypeIndex));
-#endif
     _Unwind_SetIP(context, results.landingPad);
 }
 
@@ -457,7 +534,8 @@
 static
 void
 scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception,
-            _Unwind_Exception* unwind_exception, _Unwind_Context* context)
+            _Unwind_Exception* unwind_exception, _Unwind_Context* context,
+            const uint8_t* lsda)
 {
     // Initialize results to found nothing but an error
     results.ttypeIndex = 0;
@@ -497,7 +575,6 @@
         return;
     }
     // Start scan by getting exception table address
-    const uint8_t* lsda = (const uint8_t*)_Unwind_GetLanguageSpecificData(context);
     if (lsda == 0)
     {
         // There is no exception table
@@ -511,7 +588,7 @@
     // Get beginning current frame's code (as defined by the 
     // emitted dwarf code)
     uintptr_t funcStart = _Unwind_GetRegionStart(context);
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
     if (ip == uintptr_t(-1))
     {
         // no action
@@ -521,9 +598,9 @@
     else if (ip == 0)
         call_terminate(native_exception, unwind_exception);
     // ip is 1-based index into call site table
-#else  // __arm__
+#else  // !__USING_SJLJ_EXCEPTIONS__
     uintptr_t ipOffset = ip - funcStart;
-#endif  // __arm__
+#endif  // !defined(_USING_SLJL_EXCEPTIONS__)
     const uint8_t* classInfo = NULL;
     // Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding
     //       dwarf emission
@@ -544,8 +621,8 @@
     // Walk call-site table looking for range that 
     // includes current PC. 
     uint8_t callSiteEncoding = *lsda++;
-#if __arm__
-    (void)callSiteEncoding;  // On arm callSiteEncoding is never used
+#if __USING_SJLJ_EXCEPTIONS__
+    (void)callSiteEncoding;  // When using SjLj exceptions, callSiteEncoding is never used
 #endif
     uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
     const uint8_t* callSiteTableStart = lsda;
@@ -555,7 +632,7 @@
     while (callSitePtr < callSiteTableEnd)
     {
         // There is one entry per call site.
-#if !__arm__
+#if !__USING_SJLJ_EXCEPTIONS__
         // The call sites are non-overlapping in [start, start+length)
         // The call sites are ordered in increasing value of start
         uintptr_t start = readEncodedPointer(&callSitePtr, callSiteEncoding);
@@ -563,15 +640,15 @@
         uintptr_t landingPad = readEncodedPointer(&callSitePtr, callSiteEncoding);
         uintptr_t actionEntry = readULEB128(&callSitePtr);
         if ((start <= ipOffset) && (ipOffset < (start + length)))
-#else  // __arm__
+#else  // __USING_SJLJ_EXCEPTIONS__
         // ip is 1-based index into this table
         uintptr_t landingPad = readULEB128(&callSitePtr);
         uintptr_t actionEntry = readULEB128(&callSitePtr);
         if (--ip == 0)
-#endif  // __arm__
+#endif  // __USING_SJLJ_EXCEPTIONS__
         {
             // Found the call site containing ip.
-#if !__arm__
+#if !__USING_SJLJ_EXCEPTIONS__
             if (landingPad == 0)
             {
                 // No handler here
@@ -579,9 +656,9 @@
                 return;
             }
             landingPad = (uintptr_t)lpStart + landingPad;
-#else  // __arm__
+#else  // __USING_SJLJ_EXCEPTIONS__
             ++landingPad;
-#endif  // __arm__
+#endif  // __USING_SJLJ_EXCEPTIONS__
             if (actionEntry == 0)
             {
                 // Found a cleanup
@@ -773,7 +850,7 @@
                 action += actionOffset;
             }  // there is no break out of this loop, only return
         }
-#if !__arm__
+#if !__USING_SJLJ_EXCEPTIONS__
         else if (ipOffset < start)
         {
             // There is no call site for this ip
@@ -781,7 +858,7 @@
             // Possible stack corruption.
             call_terminate(native_exception, unwind_exception);
         }
-#endif  // !__arm__
+#endif  // !__USING_SJLJ_EXCEPTIONS__
     }  // there might be some tricky cases which break out of this loop
 
     // It is possible that no eh table entry specify how to handle
@@ -837,8 +914,9 @@
         Else a cleanup is not found: return _URC_CONTINUE_UNWIND
 */
 
+#if !LIBCXXABI_ARM_EHABI
 _Unwind_Reason_Code
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
 __gxx_personality_sj0
 #else
 __gxx_personality_v0
@@ -848,6 +926,7 @@
 {
     if (version != 1 || unwind_exception == 0 || context == 0)
         return _URC_FATAL_PHASE1_ERROR;
+
     bool native_exception = (exceptionClass     & get_vendor_and_language) ==
                             (kOurExceptionClass & get_vendor_and_language);
     scan_results results;
@@ -855,7 +934,8 @@
     {
         // Phase 1 search:  All we're looking for in phase 1 is a handler that
         //   halts unwinding
-        scan_eh_tab(results, actions, native_exception, unwind_exception, context);
+        scan_eh_tab(results, actions, native_exception, unwind_exception, context, 
+                    (const uint8_t*)_Unwind_GetLanguageSpecificData(context));
         if (results.reason == _URC_HANDLER_FOUND)
         {
             // Found one.  Can we cache the results somewhere to optimize phase 2?
@@ -896,7 +976,8 @@
             else
             {
                 // No, do the scan again to reload the results.
-                scan_eh_tab(results, actions, native_exception, unwind_exception, context);
+                scan_eh_tab(results, actions, native_exception, unwind_exception, context,
+                            (const uint8_t*)_Unwind_GetLanguageSpecificData(context));
                 // Phase 1 told us we would find a handler.  Now in Phase 2 we
                 //   didn't find a handler.  The eh table should not be changing!
                 if (results.reason != _URC_HANDLER_FOUND)
@@ -909,7 +990,8 @@
         // Either we didn't do a phase 1 search (due to forced unwinding), or
         //   phase 1 reported no catching-handlers.
         // Search for a (non-catching) cleanup
-        scan_eh_tab(results, actions, native_exception, unwind_exception, context);
+        scan_eh_tab(results, actions, native_exception, unwind_exception, context,
+                    (const uint8_t*)_Unwind_GetLanguageSpecificData(context));
         if (results.reason == _URC_HANDLER_FOUND)
         {
             // Found a non-catching handler.  Jump to it:
@@ -924,6 +1006,170 @@
     // We were called improperly: neither a phase 1 or phase 2 search
     return _URC_FATAL_PHASE1_ERROR;
 }
+#else
+
+// Helper function to unwind one frame.
+// ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the
+// personality routine should update the virtual register set (VRS) according to the
+// corresponding frame unwinding instructions (ARM EHABI 9.3.)
+static _Unwind_Reason_Code continue_unwind(_Unwind_Context* context,
+                                           uint32_t* unwind_opcodes,
+                                           size_t opcode_words)
+{
+    if (_Unwind_VRS_Interpret(context, unwind_opcodes, 1, opcode_words * 4) !=
+        _URC_CONTINUE_UNWIND)
+        return _URC_FAILURE;
+    return _URC_CONTINUE_UNWIND;
+}
+
+// ARM register names
+static const uint32_t REG_UCB = 12;  // Register to save _Unwind_Control_Block
+static const uint32_t REG_SP = 13;
+
+static void save_results_to_barrier_cache(_Unwind_Exception* unwind_exception,
+                                          const scan_results& results)
+{
+    unwind_exception->barrier_cache.bitpattern[0] = (uint32_t)results.adjustedPtr;
+    unwind_exception->barrier_cache.bitpattern[1] = (uint32_t)results.actionRecord;
+    unwind_exception->barrier_cache.bitpattern[2] = (uint32_t)results.languageSpecificData;
+    unwind_exception->barrier_cache.bitpattern[3] = (uint32_t)results.landingPad;
+    unwind_exception->barrier_cache.bitpattern[4] = (uint32_t)results.ttypeIndex;
+}
+
+static void load_results_from_barrier_cache(scan_results& results,
+                                            const _Unwind_Exception* unwind_exception)
+{
+    results.adjustedPtr = (void*)unwind_exception->barrier_cache.bitpattern[0];
+    results.actionRecord = (const uint8_t*)unwind_exception->barrier_cache.bitpattern[1];
+    results.languageSpecificData = (const uint8_t*)unwind_exception->barrier_cache.bitpattern[2];
+    results.landingPad = (uintptr_t)unwind_exception->barrier_cache.bitpattern[3];
+    results.ttypeIndex = (int64_t)(int32_t)unwind_exception->barrier_cache.bitpattern[4];
+}
+
+extern "C" _Unwind_Reason_Code
+__gxx_personality_v0(_Unwind_State state,
+                     _Unwind_Exception* unwind_exception,
+                     _Unwind_Context* context)
+{
+    if (unwind_exception == 0 || context == 0)
+        return _URC_FATAL_PHASE1_ERROR;
+
+    bool native_exception = (unwind_exception->exception_class & get_vendor_and_language) ==
+                            (kOurExceptionClass & get_vendor_and_language);
+
+#if LIBCXXABI_ARM_EHABI
+    // ARM EHABI # 6.2, # 9.2
+    //
+    //  +---- ehtp
+    //  v
+    // +--------------------------------------+
+    // | +--------+--------+--------+-------+ |
+    // | |0| prel31 to __gxx_personality_v0 | |
+    // | +--------+--------+--------+-------+ |
+    // | |      N |      unwind opcodes     | |  <-- UnwindData
+    // | +--------+--------+--------+-------+ |
+    // | | Word 2        unwind opcodes     | |
+    // | +--------+--------+--------+-------+ |
+    // | ...                                  |
+    // | +--------+--------+--------+-------+ |
+    // | | Word N        unwind opcodes     | |
+    // | +--------+--------+--------+-------+ |
+    // | | LSDA                             | |  <-- lsda
+    // | | ...                              | |
+    // | +--------+--------+--------+-------+ |
+    // +--------------------------------------+
+
+    uint32_t *UnwindData = unwind_exception->pr_cache.ehtp + 1;
+    uint32_t FirstDataWord = *UnwindData;
+    size_t N = ((FirstDataWord >> 24) & 0xff);
+    size_t NDataWords = N + 1;
+#endif
+
+    // TODO(ajwong): The "Copy the address" comment was in upstream...do we actually need this in arm?
+    // Copy the address of _Unwind_Control_Block to r12 so that _Unwind_GetLanguageSpecificData()
+
+    const uint8_t *lsda = (const uint8_t*)_Unwind_GetLanguageSpecificData(context);
+
+
+    // TODO(ajwong): _Unwind_GetLanguageSpecificData() doesn't work.
+    // Copy the address of _Unwind_Control_Block to r12 so that _Unwind_GetLanguageSpecificData()
+    // and _Unwind_GetRegionStart() can return correct address.
+    _Unwind_SetGR(context, REG_UCB, reinterpret_cast<uint32_t>(unwind_exception));
+
+    scan_results results;
+    switch (state) {
+    case _US_VIRTUAL_UNWIND_FRAME:
+        // Phase 1 search:  All we're looking for in phase 1 is a handler that halts unwinding
+        scan_eh_tab(results, _UA_SEARCH_PHASE, native_exception, unwind_exception, context, lsda);
+        if (results.reason == _URC_HANDLER_FOUND)
+        {
+            unwind_exception->barrier_cache.sp = _Unwind_GetGR(context, REG_SP);
+            if (native_exception)
+                save_results_to_barrier_cache(unwind_exception, results);
+            return _URC_HANDLER_FOUND;
+        }
+        // Did not find the catch handler
+        if (results.reason == _URC_CONTINUE_UNWIND)
+            return continue_unwind(context, UnwindData, NDataWords);
+        return results.reason;
+
+    case _US_UNWIND_FRAME_STARTING:
+        // Phase 2 search
+        if (unwind_exception->barrier_cache.sp == _Unwind_GetGR(context, REG_SP))
+        {
+            // Found a catching handler in phase 1
+            if (native_exception)
+            {
+                // Load the result from the native exception barrier cache.
+                load_results_from_barrier_cache(results, unwind_exception);
+                results.reason = _URC_HANDLER_FOUND;
+            }
+            else
+            {
+                // Search for the catching handler again for the foreign exception.
+                scan_eh_tab(results, static_cast<_Unwind_Action>(_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME),
+                            native_exception, unwind_exception, context, lsda);
+                if (results.reason != _URC_HANDLER_FOUND)  // phase1 search should guarantee to find one
+                    call_terminate(native_exception, unwind_exception);
+            }
+
+            // Install the context for the catching handler
+            set_registers(unwind_exception, context, results);
+            return _URC_INSTALL_CONTEXT;
+        }
+
+        // Either we didn't do a phase 1 search (due to forced unwinding), or
+        //  phase 1 reported no catching-handlers.
+        // Search for a (non-catching) cleanup
+        scan_eh_tab(results, _UA_CLEANUP_PHASE, native_exception, unwind_exception, context, lsda);
+        if (results.reason == _URC_HANDLER_FOUND)
+        {
+            // Found a non-catching handler
+
+            // ARM EHABI 8.4.2: Before we can jump to the cleanup handler, we have to setup some
+            // internal data structures, so that __cxa_end_cleanup() can get unwind_exception from
+            // __cxa_get_globals().
+            __cxa_begin_cleanup(unwind_exception);
+
+            // Install the context for the cleanup handler
+            set_registers(unwind_exception, context, results);
+            return _URC_INSTALL_CONTEXT;
+        }
+
+        // Did not find any handler
+        if (results.reason == _URC_CONTINUE_UNWIND)
+            return continue_unwind(context, UnwindData, NDataWords);
+        return results.reason;
+
+    case _US_UNWIND_FRAME_RESUME:
+        return continue_unwind(context, UnwindData, NDataWords);
+    }
+
+    // We were called improperly: neither a phase 1 or phase 2 search
+    return _URC_FATAL_PHASE1_ERROR;
+}
+#endif
+
 
 __attribute__((noreturn))
 void
@@ -948,8 +1194,13 @@
         u_handler = old_exception_header->unexpectedHandler;
         // If std::__unexpected(u_handler) rethrows the same exception,
         //   these values get overwritten by the rethrow.  So save them now:
+#if LIBCXXABI_ARM_EHABI
+        ttypeIndex = (int64_t)(int32_t)unwind_exception->barrier_cache.bitpattern[4];
+        lsda = (const uint8_t*)unwind_exception->barrier_cache.bitpattern[2];
+#else
         ttypeIndex = old_exception_header->handlerSwitchValue;
         lsda = old_exception_header->languageSpecificData;
+#endif
     }
     else
     {
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_vector.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_vector.cpp
index c2292ef..3c9b535 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_vector.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_vector.cpp
@@ -7,7 +7,7 @@
 //
 //  
 //  This file implements the "Array Construction and Destruction APIs"
-//  http://www.codesourcery.com/public/cxx-abi/abi.html#array-ctor
+//  http://mentorembedded.github.io/cxx-abi/abi.html#array-ctor
 //  
 //===----------------------------------------------------------------------===//
 
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/fallback_malloc.ipp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/fallback_malloc.ipp
index e04fb15..a97f3fd 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/fallback_malloc.ipp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/fallback_malloc.ipp
@@ -7,10 +7,12 @@
 //
 //  
 //  This file implements the "Exception Handling APIs"
-//  http://www.codesourcery.com/public/cxx-abi/abi-eh.html
+//  http://mentorembedded.github.io/cxx-abi/abi-eh.html
 //  
 //===----------------------------------------------------------------------===//
 
+#include "config.h"
+
 //  A small, simple heap manager based (loosely) on 
 //  the startup heap manager from FreeBSD, optimized for space.
 //
@@ -23,16 +25,28 @@
 
 namespace {
 
+// When POSIX threads are not available, make the mutex operations a nop
+#if LIBCXXABI_SINGLE_THREADED
+static void * heap_mutex = 0;
+#else
 static pthread_mutex_t heap_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
 
 class mutexor {
 public:
+#if LIBCXXABI_SINGLE_THREADED
+    mutexor ( void * ) {}
+    ~mutexor () {}
+#else
     mutexor ( pthread_mutex_t *m ) : mtx_(m) { pthread_mutex_lock ( mtx_ ); }
     ~mutexor () { pthread_mutex_unlock ( mtx_ ); }
+#endif
 private:
     mutexor ( const mutexor &rhs );
     mutexor & operator = ( const mutexor &rhs );
+#if !LIBCXXABI_SINGLE_THREADED
     pthread_mutex_t *mtx_;
+#endif
     };
 
         
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/private_typeinfo.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/private_typeinfo.cpp
index 640ff8c..c65dcab 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/private_typeinfo.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/private_typeinfo.cpp
@@ -27,7 +27,7 @@
 // The current implementation of _LIBCXX_DYNAMIC_FALLBACK requires a
 // printf-like function called syslog:
 // 
-//     void syslog(const char* format, ...);
+//     void syslog(int facility_priority, const char* format, ...);
 // 
 // If you want this functionality but your platform doesn't have syslog,
 // just implement it in terms of fprintf(stderr, ...).
@@ -40,6 +40,18 @@
 #include <sys/syslog.h>
 #endif
 
+// On Windows, typeids are different between DLLs and EXEs, so comparing
+// type_info* will work for typeids from the same compiled file but fail
+// for typeids from a DLL and an executable. Among other things, exceptions
+// are not caught by handlers since can_catch() returns false.
+//
+// Defining _LIBCXX_DYNAMIC_FALLBACK does not help since can_catch() calls 
+// is_equal() with use_strcmp=false so the string names are not compared.
+
+#ifdef _WIN32
+#include <string.h>
+#endif
+
 namespace __cxxabiv1
 {
 
@@ -62,7 +74,11 @@
 bool
 is_equal(const std::type_info* x, const std::type_info* y, bool)
 {
+#ifndef _WIN32
     return x == y;
+#else
+    return (x == y) || (strcmp(x->name(), y->name()) == 0);
+#endif    
 }
 
 #endif  // _LIBCXX_DYNAMIC_FALLBACK
@@ -285,17 +301,20 @@
                                                     void* adjustedPtr,
                                                     int path_below) const
 {
-    ptrdiff_t offset_to_base = __offset_flags >> __offset_shift;
-    if (__offset_flags & __virtual_mask)
+    ptrdiff_t offset_to_base = 0;
+    if (adjustedPtr != nullptr)
     {
-        const char* vtable = *static_cast<const char*const*>(adjustedPtr);
-        offset_to_base = *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base);
+        offset_to_base = __offset_flags >> __offset_shift;
+        if (__offset_flags & __virtual_mask)
+        {
+            const char* vtable = *static_cast<const char*const*>(adjustedPtr);
+            offset_to_base = *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base);
+        }
     }
-    __base_type->has_unambiguous_public_base(info,
-                                             static_cast<char*>(adjustedPtr) + offset_to_base,
-                                             (__offset_flags & __public_mask) ?
-                                                 path_below :
-                                                 not_public_path);
+    __base_type->has_unambiguous_public_base(
+            info,
+            static_cast<char*>(adjustedPtr) + offset_to_base,
+            (__offset_flags & __public_mask) ? path_below : not_public_path);
 }
 
 void
@@ -342,7 +361,8 @@
                                void*& adjustedPtr) const
 {
     // Do the dereference adjustment
-    adjustedPtr = *static_cast<void**>(adjustedPtr);
+    if (adjustedPtr != NULL)
+        adjustedPtr = *static_cast<void**>(adjustedPtr);
     // bullets 1 and 4
     if (__pbase_type_info::can_catch(thrown_type, adjustedPtr))
         return true;
@@ -372,7 +392,8 @@
     thrown_class_type->has_unambiguous_public_base(&info, adjustedPtr, public_path);
     if (info.path_dst_ptr_to_static_ptr == public_path)
     {
-        adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
+        if (adjustedPtr != NULL)
+            adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
         return true;
     }
     return false;
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/stdexcept.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/stdexcept.cpp
index 246eea4..bd6789e 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/stdexcept.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/stdexcept.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "__refstring"
 #include "stdexcept"
 #include "new"
 #include <cstdlib>
@@ -14,147 +15,25 @@
 #include <cstdint>
 #include <cstddef>
 
-#if __APPLE__
-#include <dlfcn.h>
-#include <mach-o/dyld.h>
-#endif
-
-// Note:  optimize for size
-
-#pragma GCC visibility push(hidden)
-
-namespace
-{
-
-class __libcpp_nmstr
-{
-private:
-    const char* str_;
-
-    typedef int count_t;
-
-    struct _Rep_base
-    {
-        std::size_t len;
-        std::size_t cap;
-        count_t     count;
-    };
-
-    static const std::ptrdiff_t offset = static_cast<std::ptrdiff_t>(sizeof(_Rep_base));
-
-    count_t& count() const _NOEXCEPT {return ((_Rep_base*)(str_ - offset))->count;}
-
-#if __APPLE__
-    static
-    const void*
-    compute_gcc_empty_string_storage() _NOEXCEPT
-    {
-        void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
-        if (handle == 0)
-            return 0;
-        return (const char*)dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE") + offset;
-    }
-    
-    static
-    const void*
-    get_gcc_empty_string_storage() _NOEXCEPT
-    {
-        static const void* p = compute_gcc_empty_string_storage();
-        return p;
-    }
-#endif
-
-public:
-    explicit __libcpp_nmstr(const char* msg);
-    __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
-    __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
-    ~__libcpp_nmstr();
-    const char* c_str() const _NOEXCEPT {return str_;}
-};
-
-__libcpp_nmstr::__libcpp_nmstr(const char* msg)
-{
-    std::size_t len = strlen(msg);
-    str_ = static_cast<const char*>(::operator new(len + 1 + offset));
-    _Rep_base* c = (_Rep_base*)str_;
-    c->len = c->cap = len;
-    str_ += offset;
-    count() = 0;
-    std::memcpy(const_cast<char*>(c_str()), msg, len + 1);
-}
-
-inline
-__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
-    : str_(s.str_)
-{
-#if __APPLE__
-    if (str_ != get_gcc_empty_string_storage())
-#endif
-        __sync_add_and_fetch(&count(), 1);
-}
-
-__libcpp_nmstr&
-__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
-{
-    const char* p = str_;
-    str_ = s.str_;
-#if __APPLE__
-    if (str_ != get_gcc_empty_string_storage())
-#endif
-        __sync_add_and_fetch(&count(), 1);
-#if __APPLE__
-    if (p != get_gcc_empty_string_storage())
-#endif
-        if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0)
-        {
-            ::operator delete(const_cast<char*>(p-offset));
-        }
-    return *this;
-}
-
-inline
-__libcpp_nmstr::~__libcpp_nmstr()
-{
-#if __APPLE__
-    if (str_ != get_gcc_empty_string_storage())
-#endif
-        if (__sync_add_and_fetch(&count(), count_t(-1)) < 0)
-        {
-            ::operator delete(const_cast<char*>(str_ - offset));
-        }
-}
-
-}
-
-#pragma GCC visibility pop
+static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
 
 namespace std  // purposefully not using versioning namespace
 {
 
-logic_error::~logic_error() _NOEXCEPT
-{
-    __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-    s.~__libcpp_nmstr();
-}
+logic_error::~logic_error() _NOEXCEPT {}
 
 const char*
 logic_error::what() const _NOEXCEPT
 {
-    __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-    return s.c_str();
+    return __imp_.c_str();
 }
 
-runtime_error::~runtime_error() _NOEXCEPT
-{
-    __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-    s.~__libcpp_nmstr();
-}
+runtime_error::~runtime_error() _NOEXCEPT {}
 
 const char*
 runtime_error::what() const _NOEXCEPT
 {
-    __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-    return s.c_str();
+    return __imp_.c_str();
 }
 
 domain_error::~domain_error() _NOEXCEPT {}
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_const_pointer_nullptr.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_const_pointer_nullptr.cpp
index c9d5acf..417a2aa 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_const_pointer_nullptr.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_const_pointer_nullptr.cpp
@@ -1,4 +1,4 @@
-//===--------------------- catch_const_pointer_nullptr.cpp ----------------------===//
+//===--------------------- catch_const_pointer_nullptr.cpp ----------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -53,7 +53,7 @@
         throw nullptr;
         assert(false);
     }
-    catch (const A const*)
+    catch (const A* const)
     {
     }
     catch (A*)
@@ -72,7 +72,7 @@
     catch (A*)
     {
     }
-    catch (const A const*)
+    catch (const A* const)
     {
         assert(false);
     }
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_ptr_02.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_ptr_02.cpp
index d90365e..9421782 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_ptr_02.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/catch_ptr_02.cpp
@@ -33,7 +33,7 @@
 {
     try
      {
-    	throw &a;
+        throw &a;
         assert(false);
     }
     catch ( A* )
@@ -77,10 +77,120 @@
     }
 }
 
+struct base1 {int x;};
+struct base2 {int x;};
+struct derived : base1, base2 {};
+
+void test5 ()
+{
+    try
+    {
+        throw (derived*)0;
+        assert(false);
+    }
+    catch (base2 *p) {
+        assert (p == 0);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+void test6 ()
+{
+    try
+    {
+        throw nullptr;
+        assert(false);
+    }
+    catch (base2 *p) {
+        assert (p == nullptr);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+void test7 ()
+{
+    try
+    {
+        throw (derived*)12;
+        assert(false);
+    }
+    catch (base2 *p) {
+        assert ((unsigned long)p == 12+sizeof(base1));
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+
+struct vBase {};
+struct vDerived : virtual public vBase {};
+
+void test8 ()
+{
+    try
+    {
+        throw new vDerived;
+        assert(false);
+    }
+    catch (vBase *p) {
+        assert(p != 0);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+void test9 ()
+{
+    try
+    {
+        throw nullptr;
+        assert(false);
+    }
+    catch (vBase *p) {
+        assert(p == 0);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+void test10 ()
+{
+    try
+    {
+        throw (vDerived*)0;
+        assert(false);
+    }
+    catch (vBase *p) {
+        assert(p == 0);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
 int main()
 {
     test1();
     test2();
     test3();
     test4();
+    test5();
+    test6();
+    test7();
+    test8();
+    test9();
+    test10();
 }
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/inherited_exception.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/inherited_exception.cpp
new file mode 100644
index 0000000..e9a7e95
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/inherited_exception.cpp
@@ -0,0 +1,147 @@
+//===--------------------- inherited_exception.cpp ------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <assert.h>
+
+struct Base {
+  int b1;
+};
+
+struct Base2 {
+  int b2;
+};
+
+struct Child : public Base, public Base2 {
+  int c;
+};
+
+void f1() {
+  Child child;
+  child.b1 = 10;
+  child.b2 = 11;
+  child.c = 12;
+  throw child;
+}
+
+void f2() {
+  Child child;
+  child.b1 = 10;
+  child.b2 = 11;
+  child.c = 12;
+  throw static_cast<Base2&>(child);
+}
+
+void f3() {
+  Child* child  = new Child;
+  child->b1 = 10;
+  child->b2 = 11;
+  child->c = 12;
+  throw static_cast<Base2*>(child);
+}
+
+int main()
+{
+    try
+    {
+        f1();
+        assert(false);
+    }
+    catch (const Child& c)
+    {
+        assert(true);
+    }
+    catch (const Base& b)
+    {
+        assert(false);
+    }
+    catch (...)
+    {
+        assert(false);
+    }
+
+    try
+    {
+        f1();
+        assert(false);
+    }
+    catch (const Base& c)
+    {
+        assert(true);
+    }
+    catch (const Child& b)
+    {
+        assert(false);
+    }
+    catch (...)
+    {
+        assert(false);
+    }
+
+    try
+    {
+        f1();
+        assert(false);
+    }
+    catch (const Base2& c)
+    {
+        assert(true);
+    }
+    catch (const Child& b)
+    {
+        assert(false);
+    }
+    catch (...)
+    {
+        assert(false);
+    }
+
+    try
+    {
+        f2();
+        assert(false);
+    }
+    catch (const Child& c)
+    {
+        assert(false);
+    }
+    catch (const Base& b)
+    {
+        assert(false);
+    }
+    catch (const Base2& b)
+    {
+        assert(true);
+    }
+    catch (...)
+    {
+        assert(false);
+    }
+
+    try
+    {
+        f3();
+        assert(false);
+    }
+    catch (const Base* c)
+    {
+        assert(false);
+    }
+    catch (const Child* b)
+    {
+        assert(false);
+    }
+    catch (const Base2* c)
+    {
+        assert(true);
+    }
+    catch (...)
+    {
+        assert(false);
+    }
+}
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_demangle.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_demangle.cpp
index 0b582d3..15cb3a1 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_demangle.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_demangle.cpp
@@ -14,6 +14,9 @@
 #include <cassert>
 #include <chrono>
 
+// Is long double fp80?  (Only x87 extended double has 64-bit mantissa)
+#define LDBL_FP80 (__LDBL_MANT_DIG__ == 64)
+
 const char* cases[][2] =
 {
     {"_Z1A", "A"},
@@ -21,6 +24,8 @@
     {"_Z1A1B1C", "A(B, C)"},
     {"_Z4testI1A1BE1Cv", "C test<A, B>()"},
     {"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"},
+    {"_ZN1SgtEi", "S::operator>(int)"},
+    {"_ZrsI1QEiT_i", "int operator>><Q>(Q, int)"},
     {"_ZN13dyldbootstrap5startEPK12macho_headeriPPKcl", "dyldbootstrap::start(macho_header const*, int, char const**, long)"},
     {"_ZN4dyld17getExecutablePathEv", "dyld::getExecutablePath()"},
     {"_ZN4dyld22mainExecutablePreboundEv", "dyld::mainExecutablePrebound()"},
@@ -29513,7 +29518,9 @@
     {"_ZN5test01fIiEEvT_RAszcl3ovlcvS1__EE_c", "void test0::f<int>(int, char (&) [sizeof (ovl((int)()))])"},
     {"_ZN5test01gIfEEvRAszplcvT__ELf40a00000E_c", "void test0::g<float>(char (&) [sizeof (((float)()) + (0x1.4p+2f))])"},
     {"_ZN5test01hIfEEvRAszplcvT__ELd4014000000000000E_c", "void test0::h<float>(char (&) [sizeof (((float)()) + (0x1.4p+2))])"},
+#if LDBL_FP80
     {"_ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c", "void test0::h<float>(char (&) [(unsigned int)((sizeof (float)) + (0xap-1L))])"},
+#endif
     {"_ZN5test01jINS_1AEEEvRAszdtcvT__E6buffer_c", "void test0::j<test0::A>(char (&) [sizeof ((test0::A)().buffer)])"},
     {"_ZN5test11fINS_1XEiEEvT_IT0_E", "void test1::f<test1::X, int>(test1::X<int>)"},
     {"_ZN5test211read_memberINS_1AEEEDtptcvPT_Li0E6memberERS2_", "decltype((test2::A*)(0)->member) test2::read_member<test2::A>(test2::A&)"},
@@ -29583,6 +29590,9 @@
     {"_Z1fPU11objcproto1A11objc_object", "f(id<A>)"},
     {"_Z1fPKU11objcproto1A7NSArray", "f(NSArray<A> const*)"},
     {"_ZNK1AIJ1Z1Y1XEEcv1BIJDpPT_EEIJS2_S1_S0_EEEv", "A<Z, Y, X>::operator B<X*, Y*, Z*><X, Y, Z>() const"},
+    {"_ZNK3Ncr6Silver7Utility6detail12CallOnThreadIZ53-[DeploymentSetupController handleManualServerEntry:]E3$_5EclIJEEEDTclclL_ZNS2_4getTIS4_EERT_vEEspclsr3stdE7forwardIT_Efp_EEEDpOSA_", "decltype(-[DeploymentSetupController handleManualServerEntry:]::$_5& Ncr::Silver::Utility::detail::getT<-[DeploymentSetupController handleManualServerEntry:]::$_5>()()(std::forward<-[DeploymentSetupController handleManualServerEntry:]::$_5>(fp))) Ncr::Silver::Utility::detail::CallOnThread<-[DeploymentSetupController handleManualServerEntry:]::$_5>::operator()<>(-[DeploymentSetupController handleManualServerEntry:]::$_5&&) const"},
+    {"_Zli2_xy", "operator\"\" _x(unsigned long long)"},
+    {"_Z1fIiEDcT_", "decltype(auto) f<int>(int)"},
 };
 
 const unsigned N = sizeof(cases) / sizeof(cases[0]);
@@ -29594,6 +29604,9 @@
     "NSoERj5E=Y1[uM:ga",
     "Aon_PmKVPDk7?fg4XP5smMUL6;<WsI_mgbf23cCgsHbT<l8EE\0uVRkNOoXDrgdA4[8IU>Vl<>IL8ayHpiVDDDXTY;^o9;i",
     "_ZNSt16allocator_traitsISaIN4llvm3sys2fs18directory_iteratorEEE9constructIS3_IS3_EEEDTcl12_S_constructfp_fp0_spcl7forwardIT0_Efp1_EEERS4_PT_DpOS7_",
+#if !LDBL_FP80
+    "_ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c",
+#endif
 };
 
 const unsigned NI = sizeof(invalid_cases) / sizeof(invalid_cases[0]);
@@ -29663,7 +29676,9 @@
     std::string input;
     while (std::cin)
     {
-        std::cin >> input;
+        std::getline(std::cin, input);
+        if (std::cin.fail())
+            break;
         std::size_t len = 0;
         int status;
         len = 0;
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_exception_storage.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_exception_storage.cpp
index e2b230a..9a01236 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_exception_storage.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_exception_storage.cpp
@@ -7,10 +7,14 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "../src/config.h"
+
 #include <cstdlib>
 #include <algorithm>
 #include <iostream>
-#include <pthread.h>
+#if !LIBCXXABI_SINGLE_THREADED
+#  include <pthread.h>
+#endif
 #include <unistd.h>
 
 #include "../src/cxa_exception.hpp"
@@ -22,22 +26,29 @@
     globals_t *glob1, *glob2;
     
     glob1 = __cxxabiv1::__cxa_get_globals ();
-    if ( NULL == glob1 )
+    if ( NULL == glob1 ) {
         std::cerr << "Got null result from __cxa_get_globals" << std::endl;
+        return 0;
+    }
 
     glob2 = __cxxabiv1::__cxa_get_globals_fast ();
-    if ( glob1 != glob2 )
+    if ( glob1 != glob2 ) {
         std::cerr << "Got different globals!" << std::endl;
-    
+        return 0;
+    }
+
     *result = (size_t) glob1;
+#if !LIBCXXABI_SINGLE_THREADED
     sleep ( 1 );
+#endif
     return parm;
     }
 
-
+#if !LIBCXXABI_SINGLE_THREADED
 #define NUMTHREADS  10
 size_t      thread_globals [ NUMTHREADS ] = { 0 };
 pthread_t   threads        [ NUMTHREADS ];
+#endif
 
 void print_sizes ( size_t *first, size_t *last ) {
     std::cout << "{ " << std::hex;
@@ -49,6 +60,10 @@
 int main ( int argc, char *argv [] ) {
     int retVal = 0;
 
+#if LIBCXXABI_SINGLE_THREADED
+    size_t thread_globals;
+    retVal = thread_code(&thread_globals) != &thread_globals;
+#else
 //  Make the threads, let them run, and wait for them to finish
     for ( int i = 0; i < NUMTHREADS; ++i )
         pthread_create( threads + i, NULL, thread_code, (void *) (thread_globals + i));
@@ -69,6 +84,7 @@
             retVal = 2;
             }
 //  print_sizes ( thread_globals, thread_globals + NUMTHREADS );
-    
+
+#endif
     return retVal;
     }
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_guard.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_guard.cpp
index 96af56a..805ec81 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_guard.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_guard.cpp
@@ -7,10 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "../src/config.h"
 #include "cxxabi.h"
 
 #include <cassert>
-#include <thread>
+#if !LIBCXXABI_SINGLE_THREADED
+#  include <thread>
+#endif
 
 // Ensure that we initialize each variable once and only once.
 namespace test1 {
@@ -72,6 +75,7 @@
     }
 }
 
+#if !LIBCXXABI_SINGLE_THREADED
 // A simple thread test of two threads racing to initialize a variable. This
 // isn't guaranteed to catch any particular threading problems.
 namespace test4 {
@@ -123,12 +127,15 @@
         assert(run_count == 1);
     }
 }
+#endif
 
 int main()
 {
     test1::test();
     test2::test();
     test3::test();
+#if !LIBCXXABI_SINGLE_THREADED
     test4::test();
     test5::test();
+#endif
 }
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_vector1.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_vector1.cpp
index 29d39db..b8bf45c 100644
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_vector1.cpp
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/test_vector1.cpp
@@ -49,7 +49,7 @@
 void throw_construct ( void *p ) { if ( gConstructorCounter   == gConstructorThrowTarget ) throw 1; ++gConstructorCounter; }
 void throw_destruct  ( void *p ) { if ( ++gDestructorCounter  == gDestructorThrowTarget  ) throw 2; }
 
-#if __has_feature(cxx_noexcept)
+#if __cplusplus >= 201103L
 #   define CAN_THROW noexcept(false)
 #else
 #   define CAN_THROW
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit
index 9fa6d3b..99a6c71 100755
--- a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit
@@ -8,9 +8,9 @@
 # //
 # //===--------------------------------------------------------------------===//
 
-if [ -z $CC ]
+if [ -z $CXX ]
 then
-	CC=clang++
+	CXX=clang++
 fi
 
 if [ -z "$OPTIONS" ]
@@ -18,12 +18,17 @@
 	OPTIONS="-std=c++0x -stdlib=libc++"
 fi
 
+if [ -z "$QEMU" ]
+then
+    QEMU=qemu-system-arm
+fi
+
 case $TRIPLE in
   *-*-mingw* | *-*-cygwin* | *-*-win*)
-	TEST_EXE=test.exe
+    TEST_EXE_SUFFIX=.exe
     ;;
   *)
-    TEST_EXE=a.out
+    TEST_EXE_SUFFIX=.out
     ;;
 esac
 
@@ -33,6 +38,39 @@
 IMPLEMENTED_FAIL=0
 IMPLEMENTED_PASS=0
 
+function compile
+{
+  echo "  [COMPILE] $1"
+  echo $CXX $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $LIBS -o $1$TEST_EXE_SUFFIX $1 test_wrapper.cc
+  $CXX $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $LIBS -o $1$TEST_EXE_SUFFIX $1 test_wrapper.cc
+}
+
+function run
+{
+  echo "  [RUN    ] $1"
+  case $TRIPLE in
+    armv4-none-eabi)
+      echo $QEMU -semihosting -M integratorcp -cpu arm1026 -kernel $1
+      $QEMU -semihosting -M integratorcp -cpu arm1026 -kernel $1 | awk 'BEGIN { f=0; } /PASS/ { next } /FAIL/ { f=1; print; next } { print } END { exit f }'
+      ;;
+    thumbv4t-none-eabi)
+      echo $QEMU -semihosting -M integratorcp -cpu arm926 -kernel $1
+      $QEMU -semihosting -M integratorcp -cpu arm1026 -kernel $1 | awk 'BEGIN { f=0; } /PASS/ { next } /FAIL/ { f=1; print; next } { print } END { exit f }'
+      ;;
+    thumbv6m-none-eabi)
+      echo $QEMU -semihosting -M integratorcp -cpu cortex-m3 -kernel $1
+      $QEMU -semihosting -M integratorcp -cpu cortex-m3 -kernel $1 | awk 'BEGIN { f=0; } /PASS/ { next } /FAIL/ { f=1; print; next } { print } END { exit f }'
+      ;;
+    thumbv7t-none-eabi)
+      echo $QEMU -semihosting -M integratorcp -cpu cortex-a8 -kernel $1
+      $QEMU -semihosting -M integratorcp -cpu cortex-a8 -kernel $1 | awk 'BEGIN { f=0; } /PASS/ { next } /FAIL/ { f=1; print; next } { print } END { exit f }'
+      ;;
+    *)
+      $1
+      ;;
+  esac
+}
+
 function afunc
 {
 	fail=0
@@ -40,10 +78,10 @@
 	if (ls *.fail.cpp &> /dev/null)
 	then
 		for FILE in $(ls *.fail.cpp); do
-			if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE &> /dev/null
+			if compile $FILE &> /dev/null
 			then
-				rm ./$TEST_EXE
-				echo "$FILE should not compile"
+				rm $FILE$TEST_EXE_SUFFIX
+				echo "  [FAIL   ] $FILE should not compile"
 				let "fail+=1"
 			else
 				let "pass+=1"
@@ -54,19 +92,17 @@
 	if (ls *.cpp &> /dev/null)
 	then
 		for FILE in $(ls *.cpp); do
-			if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE
+			if compile $FILE
 			then
-				if ./$TEST_EXE
+				if run $FILE$TEST_EXE_SUFFIX
 				then
-					rm ./$TEST_EXE
 					let "pass+=1"
 				else
-					echo "$FILE failed at run time"
+					echo "  [FAIL   ] $FILE failed at run time"
 					let "fail+=1"
-					rm ./$TEST_EXE
 				fi
 			else
-				echo "$FILE failed to compile"
+				echo "  [FAIL   ] $FILE failed to compile"
 				let "fail+=1"
 			fi
 		done
@@ -109,7 +145,7 @@
 
 echo "****************************************************"
 echo "Results for `pwd`:"
-echo "using `$CC --version`"
+echo "using `$CXX --version`"
 echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
 echo "----------------------------------------------------"
 echo "sections without tests   : $UNIMPLEMENTED"
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit_android b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit_android
new file mode 100755
index 0000000..3291b27
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/testit_android
@@ -0,0 +1,520 @@
+#!/bin/bash
+# //===--------------------------- testit ---------------------------------===//
+# //
+# //                     The LLVM Compiler Infrastructure
+# //
+# // This file is distributed under the University of Illinois Open Source
+# // License. See LICENSE.TXT for details.
+# //
+# //===--------------------------------------------------------------------===//
+
+currentpath=`pwd`
+origpath=$currentpath
+currentdir=`basename $currentpath`
+while [ $currentdir != "test" ]; do
+	if [ $currentdir = "/" ]
+	then
+		echo "current directory must be in or under \"test\"."
+		exit 1
+	fi
+	cd ..
+	currentpath=`pwd`
+	currentdir=`basename $currentpath`
+done
+
+cd ..
+LIBCXX_ROOT=`pwd`/../../llvm-libc++/libcxx
+cd $origpath
+
+VERBOSE=1
+
+run () {
+  if [ "$VERBOSE" -gt 1 ]; then
+    echo "COMMAND: $@"
+  fi
+  case $VERBOSE in
+    0|1)
+      # Hide command output and errors.
+      "$@" >/dev/null 2>&1
+      ;;
+    2)
+      # Only hide command output
+      "$@" >/dev/null
+      ;;
+    *)
+      # Show command output and errors.
+      "$@"
+      ;;
+  esac
+}
+
+run2 () {
+  if [ "$VERBOSE" -gt 2 ]; then
+    echo "COMMAND: $@"
+  fi
+  case $VERBOSE in
+    0|1)
+      # Hide command output and errors.
+      "$@" >/dev/null 2>&1
+      ;;
+    2)
+      # Only hide command output
+      "$@" >/dev/null
+      ;;
+    *)
+      # Show command output and errors.
+      "$@"
+      ;;
+  esac
+}
+
+# The list of valid target abis supported by this script.
+VALID_ABIS="armeabi armeabi-v7a armeabi-v7a-hard x86 mips"
+
+DO_HELP=
+DO_STATIC=
+TARGET_ABI=
+TARGET_ARCH=
+if [ -n "$SHARD_TEST_TOOLCHAIN" ]; then
+  TARGET_PATH=/data/local/tmp/libcxx-${SHARD_TEST_TOOLCHAIN}-$(dirname $PWD | sum | cut -d' ' -f1)-$(basename $PWD)
+else
+  TARGET_PATH=/data/local/tmp/libcxx
+fi
+CXX=
+WITH_COMPILER_RT=
+OPTIMIZE=
+for OPT; do
+  case $OPT in
+    --help|-?)
+      DO_HELP=true
+      ;;
+    --abi=*)
+      TARGET_ABI=${OPT##--abi=}
+      ;;
+    --static)
+      DO_STATIC=true
+      ;;
+    --shared)
+      DO_STATIC=
+      ;;
+    --cxx=*)
+      CXX=${OPT##--cxx=}
+      ;;
+    --verbose)
+      VERBOSE=$(( $VERBOSE + 1 ))
+      ;;
+    --with-compiler-rt)
+      WITH_COMPILER_RT=yes
+      ;;
+    -O*)
+      OPTIMIZE=$OPT
+      ;;
+    -*)
+      echo "Unknown option: $OPT. See --help."
+      exit 1
+      ;;
+    *)
+      echo "This script doesn't take parameters. See --help."
+      exit 1
+      ;;
+  esac
+done
+
+if [ "$DO_HELP" ]; then
+  echo \
+"Usage: $(basename $0) [options]
+
+This script is used to run the libc++ test suite for Android.
+You will need the following things:
+
+  - The prebuild libc++ libraries in your NDK install.
+  - A prebuilt Android toolchain in your path.
+  - The 'adb' tool in your path.
+  - An Android device connected to ADB.
+
+The toolchain and device must match your target ABI. For example, if
+you use --abi=armeabi-v7a, your device must run ARMv7-A Android binaries,
+and arm-linux-androideabi-g++ will be used to compile all tests, unless
+you use --cxx=<command> to override it.
+
+Valid options:
+  --help|-?        Display this message.
+  --abi=<name>     Specify target ABI. Use --abi=list for list.
+  --static         Link against static libc++ library.
+  --cxx=<program>  Override C++ compiler/linker.
+  --verbose        Increase verbosity.
+"
+  exit 0
+fi
+
+# Check target ABI.
+if [ "$TARGET_ABI" = "list" ]; then
+  echo "List of valid target ABIs:"
+  for ABI in $VALID_ABIS; do
+    printf " %s" $ABI
+  done
+  printf "\n"
+  exit 0
+fi
+
+if [ -z "$TARGET_ABI" ]; then
+  echo "ERROR: Please specify a target ABI (--abi=<name>)."
+  exit 1
+fi
+
+FOUND_ABI=
+for ABI in $VALID_ABIS; do
+  if [ "$ABI" = "$TARGET_ABI" ]; then
+    FOUND_ABI=true
+    break
+  fi
+done
+
+if [ -z "$FOUND_ABI" ]; then
+  echo "ERROR: Invalid abi '$TARGET_ABI'. Must be one of: $VALID_ABIS"
+  exit 1
+fi
+
+LIBCXX_LIBS=$(cd $LIBCXX_ROOT/.. && pwd)/libs/$TARGET_ABI
+for LIB in libc++_static.a libc++_shared.so; do
+  if [ ! -f "$LIBCXX_LIBS/$LIB" ]; then
+    echo "ERROR: Missing prebuilt library: $LIBCXX_LIBS/$LIB"
+    echo "Please run: build/tools/build-cxx-stl.sh --stl=libc++"
+    exit 1
+  fi
+done
+
+LIBCOMPILER_RT_LIBS=$(cd "$LIBCXX_ROOT"/../../../android/compiler-rt && pwd)/libs/$TARGET_ABI
+if [ "$WITH_COMPILER_RT" = "yes" ]; then
+  for LIB in libcompiler_rt_static.a libcompiler_rt_shared.so; do
+    if [ ! -f "$LIBCOMPILER_RT_LIBS/$LIB" ]; then
+      echo "ERROR: Missing prebuilt library: $LIBCOMPILER_RT_LIBS/$LIB"
+      echo "Please run: build/tools/build-compiler-rt.sh --ndk-dir=$NDK \
+--src-dir=/tmp/ndk-$USER/src/llvm-3.4/compiler-rt --llvm-version=3.4"
+      exit 1
+    fi
+  done
+fi
+
+# Check or detect C++ toolchain.
+TOOLCHAIN_CFLAGS=
+TOOLCHAIN_LDFLAGS=
+THUMB_MODE="-mthumb"
+LIBM="-lm"
+if [ -z "$TOOLCHAIN_PREFIX" ]; then
+  # Compute
+  case $TARGET_ABI in
+    armeabi)
+      TOOLCHAIN_PREFIX=arm-linux-androideabi
+      TOOLCHAIN_CFLAGS="$THUMB_MODE"
+      TOOLCHAIN_LDFLAGS="$THUMB_MODE"
+      ;;
+    armeabi-v7a)
+      TOOLCHAIN_PREFIX=arm-linux-androideabi
+      TOOLCHAIN_CFLAGS="-march=armv7-a $THUMB_MODE -mfpu=vfpv3-d16"
+      TOOLCHAIN_LDFLAGS="-march=armv7-a $THUMB_MODE -Wl,--fix-cortex-a8"
+      ;;
+    armeabi-v7a-hard)
+      TOOLCHAIN_PREFIX=arm-linux-androideabi
+      TOOLCHAIN_CFLAGS="-march=armv7-a $THUMB_MODE -mfpu=vfpv3-d16 -mhard-float -D_NDK_MATH_NO_SOFTFP=1"
+      TOOLCHAIN_LDFLAGS="-march=armv7-a $THUMB_MODE -Wl,--fix-cortex-a8 -Wl,--no-warn-mismatch"
+      LIBM="-lm_hard"
+      ;;
+    x86)
+      TOOLCHAIN_PREFIX=i686-linux-android
+      ;;
+    mips)
+      TOOLCHAIN_PREFIX=mipsel-linux-android
+      ;;
+    *)
+      echo "ERROR: Unknown ABI '$ABI'"
+      exit 1
+      ;;
+  esac
+  if [ -z "$CXX" ]; then
+      CXX=$TOOLCHAIN_PREFIX-g++
+  fi
+fi
+
+REAL_CXX=$(which "$CXX" 2>/dev/null)
+if [ -z "$REAL_CXX" ]; then
+  echo "ERROR: Missing C++ compiler: $CXX"
+  exit 1
+fi
+CC=$CXX
+
+function version_ge {
+    input_string=$1
+    compare_string=$2
+    input_major=$(echo $input_string | cut -d\. -f 1)
+    input_minor=$(echo $input_string | cut -d\. -f 2)
+    compare_major=$(echo $compare_string | cut -d\. -f 1)
+    compare_minor=$(echo $compare_string | cut -d\. -f 2)
+    true=0
+    false=1
+    if [ "$input_major" -gt "$compare_major" ]; then return $true; fi
+    if [ "$input_major" -lt "$compare_major" ]; then return $false; fi
+    if [ "$input_minor" -ge "$compare_minor" ]; then return $true; fi
+    return $false
+}
+
+if [ -z "$OPTIONS" ]
+then
+  OPTIONS="-std=c++11 -g -funwind-tables $OPTIMIZE"
+  # Note that some tests use assert() to check condition but -O2 defines assert() to nothing,
+  # unless we specify -UNDEBUG to bring assert() back.
+  # But currently adding -UNDEBUG crashes both clang3.4 and clang3.3 for test
+  # like libcxx/test/atomics/atomics.types.generic/address.pass.cpp.  Define -UNDEBUG
+  # only when we are not using clang.  ToDo
+  if [ "$CXX" = "${CXX%%*clang++*}" ] ; then
+    OPTIONS="$OPTIONS -UNDEBUG"
+  fi
+  if [ -n "$LLVM_VERSION" ]; then
+    if version_ge "$LLVM_VERSION" "3.4"; then
+      OPTIONS="${OPTIONS} -mllvm -arm-enable-ehabi-descriptors -mllvm -arm-enable-ehabi"
+    fi
+  fi
+fi
+OPTIONS="$OPTIONS $TOOLCHAIN_CFLAGS $TOOLCHAIN_LDFLAGS"
+OPTIONS="$OPTIONS -I$LIBCXX_ROOT/test/support"
+# llvm-libc++/libcxx/test/lit.cfg line #278 defineds the following for testing only on Linux
+OPTIONS="$OPTIONS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
+
+if [ -z "$ADB" ]
+then
+  ADB=adb
+fi
+
+# Run a shell command through ADB, return its status.
+# Variable ERR contains output if $RET is non-zero
+adb_shell () {
+  # We need a temporary file to store the output of our command
+  local CMD_OUT RET
+  ERR=
+  CMD_OUT=$(mktemp /tmp/testit_android-cmdout-XXXXXX)
+  # Run the command, while storing the standard output to CMD_OUT
+  # and appending the exit code as the last line.
+  if [ "$VERBOSE" -gt 2 ]; then
+    echo "COMMAND: $ADB shell $@"
+  fi
+  $ADB shell "$@ ; echo \$?" | sed -e 's![[:cntrl:]]!!g' > $CMD_OUT 2>&1
+  # Get last line in log, which contains the exit code from the command
+  RET=$(sed -e '$!d' $CMD_OUT)
+  # Get output, which corresponds to everything except the last line
+  OUT=$(sed -e '$d' $CMD_OUT)
+  if [ "$RET" != "0" ]; then
+    ERR=$OUT
+  fi
+  if [ "$VERBOSE" -gt 2 ]; then
+    printf "%s" "$OUT"
+  fi
+  rm -f $CMD_OUT
+  return $RET
+}
+
+# Push a given file through ADB.
+# $1: File path
+adb_push () {
+  local FILE=$1
+  local FILE_BASENAME=$(basename "$FILE")
+  run2 $ADB push $FILE $TARGET_PATH/$FILE_BASENAME 2>/dev/null
+}
+
+# Run a given executable through ADB.
+# $1: Executable path
+adb_run () {
+  local EXECUTABLE=$1
+  local EXECUTABLE_BASENAME=$(basename "$EXECUTABLE")
+  run2 $ADB push $EXECUTABLE $TARGET_PATH/$EXECUTABLE_BASENAME 2>/dev/null
+  if [ "$?" != 0 ]; then
+    return 1;
+  fi
+  # Retry up to 10 times if fail is due to "Text file busy"
+  for i in 1 2 3 4 5 6 7 8 9 10; do
+    adb_shell "cd $TARGET_PATH; LD_LIBRARY_PATH=$TARGET_PATH LIBUNWIND_PRINT_UNWINDING=1 ./$EXECUTABLE_BASENAME"
+    if [ "$?" = "0" ]; then
+      return 0
+    fi
+    if ! $(echo $ERR | grep -iq "Text file busy"); then
+      if [ "$i" != "1" ]; then
+        # Dump error message to help diagnostics
+        echo "ERR=$ERR"
+      fi
+      break;
+    fi
+    echo "Text file busy.  Re-try $i"
+    sleep 1
+    run2 $ADB push $EXECUTABLE $TARGET_PATH/$EXECUTABLE_BASENAME 2>/dev/null
+    sleep 2  # try again
+  done
+  return 1
+}
+
+adb_shell "rm -rf $TARGET_PATH"
+adb_shell "mkdir -p $TARGET_PATH"
+
+if [ "$DO_STATIC" ]; then
+  # Statically link to ensure the executable can be run easily through ADB
+  if [ "$WITH_COMPILER_RT" = "yes" ]; then
+    LIBS="-nodefaultlibs -lc++_static -latomic -ldl $LIBM -lc -lcompiler_rt_static"
+  else
+    LIBS="-nodefaultlibs -latomic -ldl $LIBM -lc"
+  fi
+else
+  run2 $ADB push $LIBCXX_LIBS/libc++_shared.so $TARGET_PATH 2>/dev/null
+  if [ $? != 0 ]; then
+    echo "ERROR: Can't push shared libc++ to target device!"
+    exit 1
+  fi
+  if [ "$WITH_COMPILER_RT" = "yes" ]; then
+    run2 $ADB push $LIBCOMPILER_RT_LIBS/libcompiler_rt_shared.so $TARGET_PATH 2>/dev/null
+    if [ $? != 0 ]; then
+      echo "ERROR: Can't push shared libcompiler_rt to target device!"
+      exit 1
+    fi
+    LIBS="-nodefaultlibs -lc++_shared -latomic -ldl $LIBM -lc -lcompiler_rt_shared"
+  else
+    LIBS="-nodefaultlibs -lc++_shared -latomic -ldl $LIBM -lc"
+  fi
+fi
+
+case $TRIPLE in
+  *-*-mingw* | *-*-cygwin* | *-*-win*)
+    TEST_EXE=test.exe
+    ;;
+  *)
+    TEST_EXE=a.out
+    ;;
+esac
+
+TEST_EXE=/tmp/testit_android-$USER-$$-$TEST_EXE
+
+FAIL=0
+PASS=0
+UNIMPLEMENTED=0
+IMPLEMENTED_FAIL=0
+IMPLEMENTED_PASS=0
+
+# Run tests in current directory, recursively
+#
+# Note that file path containing EQ are symlink to the existing tests whose path contain '=',
+# to workaround an issue in ndk-build which doesn't handle LOCAL_SRC_FILES with '='.
+# See tests/device/test-libc++-static-full/jni/Android.mk  We need to filter out path containing
+# EQ such that we don't run same tests twice
+#
+# An alternative is to do "find . -type f", but this doesn't work in NDK windows package
+# where zip turns symlink into physical file it points to.
+#
+# We also sort the test to make the test report comparable to previous test
+#
+
+afunc() {
+	fail=0
+	pass=0
+	if (ls ${TEST_PREFIX}*fail.cpp > /dev/null 2>&1)
+	then
+		for FILE in $(ls ${TEST_PREFIX}*fail.cpp | tr ' ' '\n' | grep -v EQ | sort); do
+			if run $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o $TEST_EXE > /dev/null 2>&1
+			then
+				rm $TEST_EXE
+				echo "$FILE should not compile"
+				fail=$(($fail+1))
+			else
+				pass=$(($pass+1))
+			fi
+		done
+	fi
+
+	if (ls ${TEST_PREFIX}*.cpp > /dev/null 2>&1)
+	then
+		if (ls *.dat > /dev/null 2>&1)
+		then
+			adb_shell "rm -f $TARGET_PATH/*.dat"
+			for FILE in $(ls *.dat | tr ' ' '\n' | grep -v EQ | sort); do
+	                      if [ "$VERBOSE" -gt 1 ]; then
+	                          echo "Pushing data: " $FILE
+			      fi
+			      adb_push $FILE
+			      if [ $? != 0 ]; then
+				  echo "Failed to push file $FILE"
+	                      fi
+			done
+		fi
+		for FILE in $(ls ${TEST_PREFIX}*.cpp | tr ' ' '\n' | grep -v EQ | sort); do
+                      if [ "$VERBOSE" -gt 1 ]; then
+                          echo "Running test: " $FILE
+                      fi
+                        COMMAND="( cd $(pwd) && $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS )"
+			if run $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o $TEST_EXE
+			then
+				if adb_run $TEST_EXE
+				then
+					rm $TEST_EXE
+					pass=$(($pass+1))
+				else
+					echo "`pwd`/$FILE failed at run time"
+					echo "Compile line was: $COMMAND # run-time"
+					fail=$(($fail+1))
+					rm $TEST_EXE
+				fi
+			else
+				echo "`pwd`/$FILE failed to compile"
+				echo "Compile line was: $COMMAND # compile-time"
+				fail=$(($fail+1))
+			fi
+		done
+	fi
+
+	if [ $fail -gt 0 ]
+	then
+		echo "failed $fail tests in `pwd`"
+		IMPLEMENTED_FAIL=$(($IMPLEMENTED_FAIL+1))
+	fi
+	if [ $pass -gt 0 ]
+	then
+		echo "passed $pass tests in `pwd`"
+		if [ $fail -eq 0 ]
+		then
+			IMPLEMENTED_PASS=$((IMPLEMENTED_PASS+1))
+		fi
+	fi
+	if [ $fail -eq 0 -a $pass -eq 0 ]
+	then
+		echo "not implemented:  `pwd`"
+		UNIMPLEMENTED=$(($UNIMPLEMENTED+1))
+	fi
+
+	FAIL=$(($FAIL+$fail))
+	PASS=$(($PASS+$pass))
+
+	for FILE in $(ls | tr ' ' '\n' | grep -v EQ | sort)
+	do
+		if [ -d "$FILE" ];
+		then
+			cd $FILE
+			afunc
+			cd ..
+		fi
+	done
+}
+
+afunc
+
+echo "****************************************************"
+echo "Results for `pwd`:"
+echo "using `$CC --version`"
+echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
+echo "----------------------------------------------------"
+echo "sections without tests   : $UNIMPLEMENTED"
+echo "sections with failures   : $IMPLEMENTED_FAIL"
+echo "sections without failures: $IMPLEMENTED_PASS"
+echo "                       +   ----"
+echo "total number of sections : $(($UNIMPLEMENTED+$IMPLEMENTED_FAIL+$IMPLEMENTED_PASS))"
+echo "----------------------------------------------------"
+echo "number of tests failed   : $FAIL"
+echo "number of tests passed   : $PASS"
+echo "                       +   ----"
+echo "total number of tests    : $(($FAIL+$PASS))"
+echo "****************************************************"
+
+exit $FAIL
diff --git a/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/unwind_06.cpp b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/unwind_06.cpp
new file mode 100644
index 0000000..dd505c8
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/libcxxabi/test/unwind_06.cpp
@@ -0,0 +1,257 @@
+//===------------------------- unwind_06.cpp ------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <exception>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+
+// Compile with -Os to get compiler uses float registers to hold float variables
+
+double get_(int x) { return (double)x; }
+
+double (* volatile get)(int) = get_;
+
+volatile int counter;
+
+double try1(bool v) {
+  double a = get(0);
+  double b = get(1);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b;
+  if (v) throw 10;
+  return get(0)+a+b;
+}
+
+double try2(bool v) {
+  double a = get(0);
+  double b = get(1);
+  double c = get(2);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b + c;
+  if (v) throw 10;
+  return get(0)+a+b+c;
+}
+
+double try3(bool v) {
+  double a = get(0);
+  double b = get(1);
+  double c = get(2);
+  double d = get(3);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b + c + d;
+  if (v) throw 10;
+  return get(0)+a+b+c+d;
+}
+
+double try4(bool v) {
+  double a = get(0);
+  double b = get(0);
+  double c = get(0);
+  double d = get(0);
+  double e = get(0);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b+c+d+e;
+  if (v) throw 10;
+  return get(0)+a+b+c+d+e;
+}
+
+double try5(bool v) {
+  double a = get(0);
+  double b = get(0);
+  double c = get(0);
+  double d = get(0);
+  double e = get(0);
+  double f = get(0);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b+c+d+e+f;
+  if (v) throw 10;
+  return get(0)+a+b+c+d+e+f;
+}
+
+double try6(bool v) {
+  double a = get(0);
+  double b = get(0);
+  double c = get(0);
+  double d = get(0);
+  double e = get(0);
+  double f = get(0);
+  double g = get(0);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b+c+d+e+f+g;
+  if (v) throw 10;
+  return get(0)+a+b+c+d+e+f+g;
+}
+
+double try7(bool v) {
+  double a = get(0);
+  double b = get(0);
+  double c = get(0);
+  double d = get(0);
+  double e = get(0);
+  double f = get(0);
+  double g = get(0);
+  double h = get(0);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b+c+d+e+f+g;
+  if (v) throw 10;
+  return get(0)+a+b+c+d+e+f+g;
+}
+
+double try8(bool v) {
+  double a = get(0);
+  double b = get(0);
+  double c = get(0);
+  double d = get(0);
+  double e = get(0);
+  double f = get(0);
+  double g = get(0);
+  double h = get(0);
+  double i = get(0);
+  for (counter = 100; counter; --counter)
+    a += get(1) + b+c+d+e+f+g+i;
+  if (v) throw 10;
+  return get(0)+a+b+c+d+e+f+g+i;
+}
+
+
+
+
+
+double foo()
+{
+  double a = get(1);
+  double b = get(2);
+  double c = get(3);
+  double d = get(4);
+  double e = get(5);
+  double f = get(6);
+  double g = get(7);
+  double h = get(8);
+  try {
+    try1(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try2(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try3(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try4(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try5(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try6(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try7(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+  
+  try {
+    try8(true);    
+  }
+  catch (int e) {
+  }
+  assert(a == get(1));
+  assert(b == get(2));
+  assert(c == get(3));
+  assert(d == get(4));
+  assert(e == get(5));
+  assert(f == get(6));
+  assert(g == get(7));
+  assert(h == get(8));
+
+  return a+b+c+d+e+f+g+h;
+}
+
+
+
+int main()
+{
+  foo();
+}
diff --git a/sources/cxx-stl/llvm-libc++abi/sources.mk b/sources/cxx-stl/llvm-libc++abi/sources.mk
new file mode 100644
index 0000000..5a460f0
--- /dev/null
+++ b/sources/cxx-stl/llvm-libc++abi/sources.mk
@@ -0,0 +1,30 @@
+libcxxabi_path := $(call my-dir)
+
+libcxxabi_src_files := \
+        libcxxabi/src/abort_message.cpp \
+        libcxxabi/src/cxa_aux_runtime.cpp \
+        libcxxabi/src/cxa_default_handlers.cpp \
+        libcxxabi/src/cxa_demangle.cpp \
+        libcxxabi/src/cxa_exception.cpp \
+        libcxxabi/src/cxa_exception_storage.cpp \
+        libcxxabi/src/cxa_guard.cpp \
+        libcxxabi/src/cxa_handlers.cpp \
+        libcxxabi/src/cxa_new_delete.cpp \
+        libcxxabi/src/cxa_personality.cpp \
+        libcxxabi/src/cxa_unexpected.cpp \
+        libcxxabi/src/cxa_vector.cpp \
+        libcxxabi/src/cxa_virtual.cpp \
+        libcxxabi/src/exception.cpp \
+        libcxxabi/src/private_typeinfo.cpp \
+        libcxxabi/src/stdexcept.cpp \
+        libcxxabi/src/typeinfo.cpp \
+        libcxxabi/src/Unwind/libunwind.cpp \
+        libcxxabi/src/Unwind/Unwind-EHABI.cpp \
+        libcxxabi/src/Unwind/UnwindLevel1.c \
+        libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c \
+        libcxxabi/src/Unwind/UnwindRegistersRestore.S \
+        libcxxabi/src/Unwind/UnwindRegistersSave.S \
+        libcxxabi/src/Unwind/Unwind-sjlj.c
+
+libcxxabi_c_includes := $(libcxxabi_path)/libcxxabi/include
+
diff --git a/tests/build/b14825026-aarch64-FP_LO_REGS/BROKEN_BUILD b/tests/build/b14825026-aarch64-FP_LO_REGS/BROKEN_BUILD
index d139378..6029131 100644
--- a/tests/build/b14825026-aarch64-FP_LO_REGS/BROKEN_BUILD
+++ b/tests/build/b14825026-aarch64-FP_LO_REGS/BROKEN_BUILD
@@ -1 +1 @@
-4.6 clang3.3 clang3.4
\ No newline at end of file
+4.6 4.8 clang3.3 clang3.4
\ No newline at end of file
diff --git a/tests/build/project-properties/jni/Android.mk b/tests/build/project-properties/jni/Android.mk
index 347268b..72e33bb 100644
--- a/tests/build/project-properties/jni/Android.mk
+++ b/tests/build/project-properties/jni/Android.mk
@@ -1,7 +1,14 @@
-WANTED_PLATFORM := android-9
-ifneq ($(TARGET_PLATFORM),$(WANTED_PLATFORM))
-    $(error Incorrect target platform: $(TARGET_PLATFORM) (expecteding $(WANTED_PLATFORM)))
+WANTED_PLATFORM_32 := android-9
+WANTED_PLATFORM_64 := android-L
+
+ifeq (,$(filter %64, $(TARGET_ARCH)))
+  ifneq ($(TARGET_PLATFORM),$(WANTED_PLATFORM_32))
+    $(error Incorrect target platform: $(TARGET_PLATFORM) (expecteding $(WANTED_PLATFORM_32)))
+  endif
+  $(call ndk_log,Test OK: Correct target platform retrieved from project.properties: $(TARGET_PLATFORM))
+else
+  ifneq ($(TARGET_PLATFORM),$(WANTED_PLATFORM_64))
+    $(error Incorrect target platform: $(TARGET_PLATFORM) (expecteding $(WANTED_PLATFORM_64)))
+  endif
+  $(call ndk_log,Test OK: Correct target platform retrieved from project.properties but auto-adjusted: $(TARGET_PLATFORM))
 endif
-
-$(call ndk_log,Test OK: Correct target platform retrieved from project.properties: $(TARGET_PLATFORM))
-
diff --git a/tests/build/stdint-c++/jni/gen-sources.sh b/tests/build/stdint-c++/jni/gen-sources.sh
index 715d7c5..8429aaa 100755
--- a/tests/build/stdint-c++/jni/gen-sources.sh
+++ b/tests/build/stdint-c++/jni/gen-sources.sh
@@ -31,41 +31,50 @@
 gen_cpp_no_macros ()
 {
     echo "/* AUTO-GENERATED FILE - DO NOT MODIFY! */"
+    echo "#include <android/api-level.h>"
+    echo "#if __ANDROID_API__ < 20"
     echo "#include <stdint.h>"
     for MACRO in $LIMITS $CONSTANTS; do
         echo "#ifdef $MACRO"
         echo "#error $MACRO defined!"
         echo "#endif"
     done
+    echo "#endif"
 }
 
 gen_cpp_limit_macros ()
 {
     echo "/* AUTO-GENERATED FILE - DO NOT MODIFY! */"
     echo "#define __STDC_LIMIT_MACROS 1"
+    echo "#include <android/api-level.h>"
     echo "#include <stdint.h>"
     for MACRO in $LIMITS; do
         echo "#ifndef $MACRO"
         echo "#error $MACRO is not defined!"
         echo "#endif"
     done
+    echo "#if __ANDROID_API__ < 20"
     for MACRO in $CONSTANTS; do
         echo "#ifdef $MACRO"
         echo "#error $MACRO is defined!"
         echo "#endif"
     done
+    echo "#endif"
 }
 
 gen_cpp_constant_macros ()
 {
     echo "/* AUTO-GENERATED FILE - DO NOT MODIFY! */"
     echo "#define __STDC_CONSTANT_MACROS 1"
+    echo "#include <android/api-level.h>"
     echo "#include <stdint.h>"
+    echo "#if __ANDROID_API__ < 20"
     for MACRO in $LIMITS; do
         echo "#ifdef $MACRO"
         echo "#error $MACRO is defined!"
         echo "#endif"
     done
+    echo "#endif"
     for MACRO in $CONSTANTS; do
         echo "#ifndef $MACRO"
         echo "#error $MACRO is not defined!"
diff --git a/tests/build/stdint-c++/jni/test_constant_macros.cpp b/tests/build/stdint-c++/jni/test_constant_macros.cpp
index ab33989..a80906e 100644
--- a/tests/build/stdint-c++/jni/test_constant_macros.cpp
+++ b/tests/build/stdint-c++/jni/test_constant_macros.cpp
@@ -1,6 +1,8 @@
 /* AUTO-GENERATED FILE - DO NOT MODIFY! */
 #define __STDC_CONSTANT_MACROS 1
+#include <android/api-level.h>
 #include <stdint.h>
+#if __ANDROID_API__ < 20
 #ifdef INT8_MIN
 #error INT8_MIN is defined!
 #endif
@@ -133,6 +135,7 @@
 #ifdef UINTPTR_MAX
 #error UINTPTR_MAX is defined!
 #endif
+#endif
 #ifndef INT8_C
 #error INT8_C is not defined!
 #endif
diff --git a/tests/build/stdint-c++/jni/test_limit_macros.cpp b/tests/build/stdint-c++/jni/test_limit_macros.cpp
index 686553e..7fd355c 100644
--- a/tests/build/stdint-c++/jni/test_limit_macros.cpp
+++ b/tests/build/stdint-c++/jni/test_limit_macros.cpp
@@ -1,5 +1,6 @@
 /* AUTO-GENERATED FILE - DO NOT MODIFY! */
 #define __STDC_LIMIT_MACROS 1
+#include <android/api-level.h>
 #include <stdint.h>
 #ifndef INT8_MIN
 #error INT8_MIN is not defined!
@@ -133,6 +134,7 @@
 #ifndef UINTPTR_MAX
 #error UINTPTR_MAX is not defined!
 #endif
+#if __ANDROID_API__ < 20
 #ifdef INT8_C
 #error INT8_C is defined!
 #endif
@@ -220,3 +222,4 @@
 #ifdef UINTPTR_C
 #error UINTPTR_C is defined!
 #endif
+#endif
diff --git a/tests/build/stdint-c++/jni/test_no_macros.cpp b/tests/build/stdint-c++/jni/test_no_macros.cpp
index b88c765..8171c4f 100644
--- a/tests/build/stdint-c++/jni/test_no_macros.cpp
+++ b/tests/build/stdint-c++/jni/test_no_macros.cpp
@@ -1,4 +1,6 @@
 /* AUTO-GENERATED FILE - DO NOT MODIFY! */
+#include <android/api-level.h>
+#if __ANDROID_API__ < 20
 #include <stdint.h>
 #ifdef INT8_MIN
 #error INT8_MIN defined!
@@ -219,3 +221,4 @@
 #ifdef UINTPTR_C
 #error UINTPTR_C defined!
 #endif
+#endif
diff --git a/tests/build/wchar_t-size/jni/test_8bit.c b/tests/build/wchar_t-size/jni/test_8bit.c
index c380420..765c477 100644
--- a/tests/build/wchar_t-size/jni/test_8bit.c
+++ b/tests/build/wchar_t-size/jni/test_8bit.c
@@ -1,16 +1,15 @@
+#include <android/api-level.h>
+
+#if !__LP64__ && !defined(__arm__) || __ANDROID_API__ == 3
+
 // This checks that simply including <wchar.h> with
 // _WCHAR_IS_8BIT defined will provice an 8-bit wchar_t
 // and 8-bit WCHAR_MIN/WCHAR_MAX.
-#include <android/api-level.h>
 
 // Force wchar_t to be 8 bits.
 #define _WCHAR_IS_8BIT
 #include <wchar.h>
 
-#if defined(__arm__) && __ANDROID_API__ != 3
-#error "You should target API level 3 when compiling this file!"
-#endif
-
 #define CONCAT(x,y) CONCAT_(x,y)
 #define CONCAT_(x,y) x ## y
 
@@ -29,3 +28,5 @@
 // these constants as signed 32 bit values.
 STATIC_ASSERT(WCHAR_MIN == 0x80000000);
 STATIC_ASSERT(WCHAR_MAX == 0x7fffffff);
+
+#endif
\ No newline at end of file
diff --git a/tests/build/wchar_t-size/jni/test_8bit_cplusplus.cpp b/tests/build/wchar_t-size/jni/test_8bit_cplusplus.cpp
index 2776bf3..28041a6 100644
--- a/tests/build/wchar_t-size/jni/test_8bit_cplusplus.cpp
+++ b/tests/build/wchar_t-size/jni/test_8bit_cplusplus.cpp
@@ -1,23 +1,22 @@
+#include <android/api-level.h>
+
+#if !__LP64__ && !defined(__arm__) || __ANDROID_API__ == 3
+
 // This checks that simply including <wchar.h> with
 // _WCHAR_IS_8BIT defined will provice an 8-bit wchar_t
 // and 8-bit WCHAR_MIN/WCHAR_MAX.
-#include <android/api-level.h>
 
 // Force wchar_t to be 8 bits.
 #define _WCHAR_IS_8BIT
 #include <wchar.h>
 
-#if defined(__arm__) && __ANDROID_API__ != 3
-#error "You should target API level 3 when compiling this file!"
-#endif
-
 #define CONCAT(x,y) CONCAT_(x,y)
 #define CONCAT_(x,y) x ## y
 
 #define STATIC_ASSERT(condition) \
   static char CONCAT(dummy_,__LINE__)[1 - 2*(!(condition))];
 
-#if defined(__arm__) ||  __ANDROID_API__ < 9
+#if defined(__arm__) || __ANDROID_API__ < 9
 STATIC_ASSERT(sizeof(__WCHAR_TYPE__) == 1);
 #else
 STATIC_ASSERT(sizeof(__WCHAR_TYPE__) == 4);
@@ -37,3 +36,5 @@
 STATIC_ASSERT(WCHAR_MIN == 0x80000000);
 STATIC_ASSERT(WCHAR_MAX == 0x7fffffff);
 #endif
+
+#endif
\ No newline at end of file
diff --git a/tests/build/wchar_t-size/jni/test_8bit_cplusplus_stdc_limit_macros.cpp b/tests/build/wchar_t-size/jni/test_8bit_cplusplus_stdc_limit_macros.cpp
index 23eddd4..7d6a024 100644
--- a/tests/build/wchar_t-size/jni/test_8bit_cplusplus_stdc_limit_macros.cpp
+++ b/tests/build/wchar_t-size/jni/test_8bit_cplusplus_stdc_limit_macros.cpp
@@ -1,7 +1,10 @@
+#include <android/api-level.h>
+
+#if !__LP64__ && !defined(__arm__) || __ANDROID_API__ == 3
+
 // This checks that simply including <wchar.h> with
 // _WCHAR_IS_8BIT defined will provice an 8-bit wchar_t
 // and 8-bit WCHAR_MIN/WCHAR_MAX.
-#include <android/api-level.h>
 
 // Force WCHAR_MIN/WCHAR_MAX to 32-bit values.
 #define __STDC_LIMIT_MACROS
@@ -9,10 +12,6 @@
 #define _WCHAR_IS_8BIT
 #include <wchar.h>
 
-#if defined(__arm__) && __ANDROID_API__ != 3
-#error "You should target API level 3 when compiling this file!"
-#endif
-
 #define CONCAT(x,y) CONCAT_(x,y)
 #define CONCAT_(x,y) x ## y
 
@@ -33,3 +32,5 @@
 // _WCHAR_IS_8BIT is defined, so the values are always 32-bit signed.
 STATIC_ASSERT(WCHAR_MIN == 0x80000000);
 STATIC_ASSERT(WCHAR_MAX == 0x7fffffff);
+
+#endif
\ No newline at end of file
diff --git a/tests/build/wchar_t-size/jni/test_always_signed.c b/tests/build/wchar_t-size/jni/test_always_signed.c
index 9e6a1c9..9454ac6 100644
--- a/tests/build/wchar_t-size/jni/test_always_signed.c
+++ b/tests/build/wchar_t-size/jni/test_always_signed.c
@@ -1,3 +1,7 @@
+#include <android/api-level.h>
+
+#if !__LP64__ && !defined(__arm__) || __ANDROID_API__ < 9
+
 // This checks that, by default, wchar_t is 32-bit and
 // WCHAR_MIN/WCHAR_MAX are 32-bit signed on all platforms when
 // _WCHAR_IS_ALWAYS_SIGNED is defined.
@@ -14,3 +18,5 @@
 
 STATIC_ASSERT(WCHAR_MIN == -1-2147483647);
 STATIC_ASSERT(WCHAR_MAX == 2147483647);
+
+#endif
\ No newline at end of file
diff --git a/tests/build/wchar_t-size/jni/test_default.c b/tests/build/wchar_t-size/jni/test_default.c
index 55ed5e7..170b28a 100644
--- a/tests/build/wchar_t-size/jni/test_default.c
+++ b/tests/build/wchar_t-size/jni/test_default.c
@@ -1,12 +1,11 @@
+#include <android/api-level.h>
+
+#if !__LP64__ && !defined(__arm__) || __ANDROID_API__ == 3
+
 // This checks that, by default, wchar_t is 32-bit and
 // WCHAR_MIN/WCHAR_MAX are 32-bit signed on all platforms except ARM.
-#include <android/api-level.h>
 #include <wchar.h>
 
-#if defined(__arm__) && __ANDROID_API__ != 3
-#error "You should target API level 3 when compiling this file!"
-#endif
-
 #define CONCAT(x,y) CONCAT_(x,y)
 #define CONCAT_(x,y) x ## y
 
@@ -15,10 +14,12 @@
 
 STATIC_ASSERT(sizeof(wchar_t) == 4);
 
-#ifdef __arm__
+#if defined(__arm__)
 STATIC_ASSERT(WCHAR_MIN == 0U);
 STATIC_ASSERT(WCHAR_MAX == 2*2147483647U + 1U);
 #else
 STATIC_ASSERT(WCHAR_MIN == -1-2147483647);
 STATIC_ASSERT(WCHAR_MAX == 2147483647);
 #endif
+
+#endif
\ No newline at end of file
diff --git a/tests/device/b8708181-Vector4/jni/Android.mk b/tests/device/b8708181-Vector4/jni/Android.mk
index 4c14ea2..2ebb534 100644
--- a/tests/device/b8708181-Vector4/jni/Android.mk
+++ b/tests/device/b8708181-Vector4/jni/Android.mk
@@ -4,6 +4,12 @@
 LOCAL_MODULE := Vector4
 LOCAL_SRC_FILES := Vector4.cpp
 ifneq ($(filter $(TARGET_ARCH_ABI), armeabi-v7a armeabi-v7a-hard),)
-    LOCAL_CFLAGS := -DHAVE_NEON=1 -march=armv7-a -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp
+    LOCAL_CFLAGS += -DHAVE_NEON=1 -march=armv7-a -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp
 endif
+ifneq ($(filter $(TARGET_ARCH_ABI),x86),)
+# x86 ABI was recently changed to gen SSSE3 by default. Disable it in order
+# for this test to run on emulator-x86 w/o KVM/HAXM
+    LOCAL_CFLAGS += -mno-ssse3 -msse3
+endif
+
 include $(BUILD_EXECUTABLE)
diff --git a/tests/device/b8708181-Vector4/jni/Application.mk b/tests/device/b8708181-Vector4/jni/Application.mk
index 32ec6ad..9c719c8 100644
--- a/tests/device/b8708181-Vector4/jni/Application.mk
+++ b/tests/device/b8708181-Vector4/jni/Application.mk
@@ -1 +1 @@
-APP_ABI := armeabi-v7a x86 mips armeabi-v7a-hard
+APP_ABI := armeabi-v7a x86 mips armeabi-v7a-hard arm64-v8a x86_64 mips64
diff --git a/tests/device/b8708181-Vector4/jni/Vector4.cpp b/tests/device/b8708181-Vector4/jni/Vector4.cpp
index 81142c6..6083a34 100644
--- a/tests/device/b8708181-Vector4/jni/Vector4.cpp
+++ b/tests/device/b8708181-Vector4/jni/Vector4.cpp
@@ -1,13 +1,13 @@
 #include <stdio.h>
 
-#if defined(__arm__)
+#if defined(__arm__) || defined(__aarch64__)
 #include <arm_neon.h>
 #define SP  "sp"
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__x86_64__)
 #include <xmmintrin.h>
 #define SP  "esp"
 typedef __m128 float32x4_t;
-#elif defined(__mips__)
+#elif defined(__mips__)  // mipsel64- defines __mips__ too
 #define SP  "sp"
 typedef float float32x4_t __attribute__ ((__vector_size__ (16)));
 #elif !defined(__le32__)
@@ -53,8 +53,8 @@
 
 int main()
 {
-    register int sp __asm(SP);
-    printf("sp = %x\n", sp);
+    register void *sp __asm(SP);
+    printf("sp = %p\n", sp);
 #if 1
     v = initVector4(f, f, f, f);
 #else
diff --git a/tests/device/crazy_linker/jni/Application.mk b/tests/device/crazy_linker/jni/Application.mk
index b448d58..be98f11 100644
--- a/tests/device/crazy_linker/jni/Application.mk
+++ b/tests/device/crazy_linker/jni/Application.mk
@@ -1,2 +1,3 @@
-APP_ABI := all
+# x86_64 and mips64 aren't supported.  Issues with mips too
+APP_ABI := all32
 APP_PLATFORM := android-9
diff --git a/tests/device/issue42891-boost-1_52/jni/boost/boost/smart_ptr/detail/sp_has_sync.hpp b/tests/device/issue42891-boost-1_52/jni/boost/boost/smart_ptr/detail/sp_has_sync.hpp
index 3f823d2..2b2aeac 100644
--- a/tests/device/issue42891-boost-1_52/jni/boost/boost/smart_ptr/detail/sp_has_sync.hpp
+++ b/tests/device/issue42891-boost-1_52/jni/boost/boost/smart_ptr/detail/sp_has_sync.hpp
@@ -24,7 +24,7 @@
 
 #define BOOST_SP_HAS_SYNC
 
-#if defined( __arm__ )  || defined( __armel__ ) || defined( __le32__ )
+#if defined( __arm__ )  || defined( __armel__ ) || defined( __le32__ ) || defined( __aarch64__)
 #undef BOOST_SP_HAS_SYNC
 #endif
 
diff --git a/tests/device/math/jni/math.c b/tests/device/math/jni/math.c
index a6eb0f3..c9bd16a 100644
--- a/tests/device/math/jni/math.c
+++ b/tests/device/math/jni/math.c
@@ -35,6 +35,7 @@
 int main()
 {
 #if __ANDROID_API__ >= 9
+#if  __ANDROID_API__ < 20
     sincosl(0.73, &ld, &ld1);
     sincos(0.72, &d, &d1);
     sincosf(0.71f, &f, &f1);
@@ -44,6 +45,7 @@
     TEST_EQ(d1, 0.7518057);
     TEST_EQ(f, 0.6518338f);
     TEST_EQ(f1, 0.7583619f);
+#endif
 #if __ANDROID_API__ >= 13
     ldn = nanl("");
     dn = nan("");
diff --git a/tests/device/test-gabi++/BROKEN_BUILD b/tests/device/test-gabi++/BROKEN_BUILD
new file mode 100644
index 0000000..e8ee031
--- /dev/null
+++ b/tests/device/test-gabi++/BROKEN_BUILD
@@ -0,0 +1 @@
+mips64
\ No newline at end of file
diff --git a/tests/device/test-gabi++/jni/Android.mk b/tests/device/test-gabi++/jni/Android.mk
index 1d7ef16..1d9b814 100644
--- a/tests/device/test-gabi++/jni/Android.mk
+++ b/tests/device/test-gabi++/jni/Android.mk
@@ -1 +1,24 @@
+ifeq (,$(filter %mips64,$(TARGET_ARCH_ABI)))
+
 include $(NDK_ROOT)/sources/cxx-stl/gabi++/tests/Android.mk
+
+else
+
+# mips64 fails to compile.
+# /s/mydroid/ndk/sources/cxx-stl/gabi++/tests/catch_const_pointer_nullptr.cpp: In function 'void test5()':
+# /s/mydroid/ndk/sources/cxx-stl/gabi++/tests/catch_const_pointer_nullptr.cpp:81:6: error: dominator of 3 should be 6, not 4
+#  void test5()
+#       ^
+# /s/mydroid/ndk/sources/cxx-stl/gabi++/tests/catch_const_pointer_nullptr.cpp:81:6: internal compiler error: in verify_dominators, at dominance.c:1047
+# Please submit a full bug report,
+# with preprocessed source if appropriate.
+# See <http://source.android.com/source/report-bugs.html> for instructions.
+# make: *** [obj/local/mips64/objs/test_gabixx_shared_catch_const_pointer_nullptr/catch_const_pointer_nullptr.o] Error 1
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE := dummy
+LOCAL_SRC_FILES := dummy.c
+include $(BUILD_EXECUTABLE)
+
+endif
\ No newline at end of file
diff --git a/tests/device/test-gabi++/jni/dummy.c b/tests/device/test-gabi++/jni/dummy.c
new file mode 100644
index 0000000..c13815c
--- /dev/null
+++ b/tests/device/test-gabi++/jni/dummy.c
@@ -0,0 +1,4 @@
+int main()
+{
+   return 0;
+}
diff --git a/tests/device/test-libc++-shared-full/BROKEN_BUILD b/tests/device/test-libc++-shared-full/BROKEN_BUILD
index be9fc83..e69de29 100644
--- a/tests/device/test-libc++-shared-full/BROKEN_BUILD
+++ b/tests/device/test-libc++-shared-full/BROKEN_BUILD
@@ -1 +0,0 @@
-4.6
\ No newline at end of file
diff --git a/tests/device/test-libc++-shared-full/BROKEN_RUN b/tests/device/test-libc++-shared-full/BROKEN_RUN
index cc5d747..b3b7091 100644
--- a/tests/device/test-libc++-shared-full/BROKEN_RUN
+++ b/tests/device/test-libc++-shared-full/BROKEN_RUN
@@ -14,85 +14,11 @@
 #  alias nalibcxxg++="/tmp/ndk-$USER/android-ndk-api14-arm-4.8-clang3.4-libc++/bin/arm-linux-androideabi-g++ -std=c++11 -O2 -g -march=armv7-a -mthumb -mfpu=vfpv3-d16 -march=armv7-a -mthumb -Wl,--fix-cortex-a8 -I$NDK/sources/cxx-stl/llvm-libc++/libcxx/test/support -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
 #
 
-FAIL: containers___sequences___vector___vector.capacity___shrink_to_fit
-  cd ~/libcxx-test/containers/sequences/vector/vector.capacity  # fail: armeabi-v7a  pass: x86, gcc4.8
-    nalibcxxg++  shrink_to_fit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: input.output___file.streams___fstreams___filebuf.virtuals___seekoff
-  cd ~/libcxx-test/input.output/file.streams/fstreams/filebuf.virtuals
-    nalibcxxg++  seekoff.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 000645ac  /data/local/tmp/libc++_shared.so (std::__1::codecvt<wchar_t, char, mbstate_t>::do_out(mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const+39)
-      $NDK/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:1535
-         codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
-             const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
-             extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
-         frm = NULL
-
-FAIL: input.output___iostream.format___output.streams___ostream_sentry___destruct
-  cd ~/libcxx-test/input.output/iostream.format/output.streams/ostream_sentry
-    nalibcxxg++  destruct.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'destruct.pass.cpp:59: int main(): assertion "sync_called == 1" failed'
-
-FAIL: language.support___support.exception___except.nested___assign
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  assign.pass.cpp -lc++_shared -latomic
-      F/libc    (15332): assign.pass.cpp:47: int main(): assertion "e.nested_ptr() != nullptr" failed
-
-FAIL: language.support___support.exception___except.nested___ctor_copy
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  ctor_copy.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ctor_copy.pass.cpp:45: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___except.nested___ctor_default
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  ctor_default.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ctor_default.pass.cpp:43: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___except.nested___rethrow_if_nested
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  rethrow_if_nested.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___except.nested___rethrow_nested
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  rethrow_nested.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'rethrow_nested.pass.cpp:45: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___propagation___current_exception
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  current_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'current_exception.pass.cpp:60: int main(): assertion "p != nullptr" failed'
-
-FAIL: language.support___support.exception___propagation___make_exception_ptr
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  make_exception_ptr.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___propagation___rethrow_exception
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  rethrow_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___uncaught___uncaught_exception
-  cd ~/libcxx-test/language.support/support.exception/uncaught
-    nalibcxxg++  uncaught_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'uncaught_exception.pass.cpp:37: int main(): assertion "!std::uncaught_exception()" failed'
-
-FAIL: localization___locale.categories___category.collate___locale.collate.bynam___transform
+FAIL: localization___locale.categories___category.collate___locale.collate.byname___transform
   cd ~/libcxx-test/localization/locale.categories/category.collate/locale.collate.byname
     nalibcxxg++  transform.pass.cpp -lc++_shared -latomic
       F/libc    (23516): transform.pass.cpp:33: int main(): assertion "f.transform(x.data(), x.data() + x.size()) != x" failed
 
-FAIL: localization___locale.categories___category.ctype___locale.codecvt___locale.codecvt.members___wchar_t_out
-  cd ~/libcxx-test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members
-    nalibcxxg++  wchar_t_out.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'wchar_t_out.pass.cpp:65: int main(): assertion "from_next - from.data() == to.size()-1" failed'
-
 FAIL: localization___locale.categories___category.ctype___locale.ctype.byname___is_1
   cd ~/libcxx-test/localization/locale.categories/category.ctype/locale.ctype.byname
     nalibcxxg++  is_1.pass.cpp -lc++_shared -latomic
@@ -238,11 +164,6 @@
     nalibcxxg++  put_long_double_zh_CN.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'put_long_double_zh_CN.pass.cpp:66: int main(): assertion "ex == "0.00"" failed'
 
-FAIL: localization___locale.categories___category.monetary___locale.money.put___locale.money.put.members___put_string_en_US
-  cd ~/libcxx-test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members
-    nalibcxxg++  put_string_en_US.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'put_string_en_US.pass.cpp:66: int main(): assertion "ex == "0.00"" failed'
-
 FAIL: localization___locale.categories___category.numeric___locale.nm.put___facet.num.put.members___put_double
   cd ~/libcxx-test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members
     nalibcxxg++  put_double.pass.cpp -lc++_shared -latomic
@@ -258,11 +179,6 @@
     nalibcxxg++  put_pointer.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'put_pointer.pass.cpp:41: int main(): assertion "ex == "0x0" || ex == "(nil)"" failed'
 
-FAIL: localization___locale.categories___category.numeric___locale.num.get___facet.num.get.members___get_pointer
-  cd ~/libcxx-test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members
-    nalibcxxg++  get_pointer.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'get_pointer.pass.cpp:59: int main(): assertion "p == (void*)0x73" failed'
-
 FAIL: localization___locale.categories___category.time___locale.time.get.byname___date_order
   cd ~/libcxx-test/localization/locale.categories/category.time/locale.time.get.byname
     nalibcxxg++  date_order.pass.cpp -lc++_shared -latomic
@@ -332,169 +248,3 @@
   cd ~/libcxx-test/localization/locales/locale/locale.cons
     nalibcxxg++  char_pointer.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'char_pointer.pass.cpp:92: int main(): assertion "false" failed'
-
-FAIL: localization___locales___locale.convenience___conversions___conversions.buffer___seekoff
-  cd ~/libcxx-test/localization/locales/locale.convenience/conversions/conversions.buffer
-    nalibcxxg++  seekoff.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00064598  /data/local/tmp/libc++_shared.so (std::__1::codecvt<wchar_t, char, mbstate_t>::do_out(mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const+39)
-
-FAIL: re___re.alg___re.alg.match___basic
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  basic.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'basic.pass.cpp:622: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]", std::regex_constants::basic))" failed'
-
-FAIL: re___re.alg___re.alg.match___ecma
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  ecma.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:583: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.match___extended
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  extended.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:583: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.search___awk -lcompiler_rt_static -latomic
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  awk.pass.cpp -lcompiler_rt_static -latomic
-      I/DEBUG   (   51): Abort message: 'awk.pass.cpp:692: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::awk))" failed'
-
-FAIL: re___re.alg___re.alg.search___basic
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  basic.pass.cpp -lc++_shared -latomic
-      /libc    (16185): basic.pass.cpp:694: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_
-
-FAIL: re___re.alg___re.alg.search___ecma
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  ecma.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:673: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.search___extended
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  extended.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'extended.pass.cpp:692: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::extended))" failed'
-
-FAIL: re___re.traits___isctype
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  isctype.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'isctype.pass.cpp:29: int main(): assertion "!t.isctype(' ', t.lookup_classname(s.begin(), s.end()))" failed'
-
-FAIL: re___re.traits___lookup_collatename
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  lookup_collatename.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'lookup_collatename.pass.cpp:29: void test(const char_type *, const std::basic_string<char_type> &) [char_type = char]: assertion "t.lookup_collatename(F(A), F(A + t.length(A))) == expected" failed'
-
-FAIL: re___re.traits___transform
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  transform.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'transform.pass.cpp:31: int main(): assertion "t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1))" failed'
-
-FAIL: re___re.traits___transform_primary
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  transform_primary.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'transform_primary.pass.cpp:34: int main(): assertion "t.transform_primary(F(A), F(A+1)) == t.transform_primary(F(Aacute), F(Aacute+1))" failed'
-
-FAIL: re___re.traits___translate_nocase
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  translate_nocase.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'translate_nocase.pass.cpp:44: int main(): assertion "t.translate_nocase('\xDA') == '\xFA'" failed'
-
-FAIL: strings___string.conversions___stod
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stod.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: strings___string.conversions___stof
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stof.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:355: wcstof: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoi
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoi.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:361: wcstol: assertion "0" failed'
-
-FAIL: strings___string.conversions___stol
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stol.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:361: wcstol: assertion "0" failed'
-
-FAIL: strings___string.conversions___stold
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stold.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:367: wcstold: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoll
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoll.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:373: wcstoll: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoull
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoull.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:379: wcstoull: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoul
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoul.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:379: wcstoull: assertion "0" failed'
-
-FAIL: thread___futures___futures.promise___dtor
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.promise___set_exception_at_thread_exit
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  set_exception_at_thread_exit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.promise___set_exception
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  set_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.shared_future___dtor
-  cd ~/libcxx-test/thread/futures/futures.shared_future  # gcc4.8 works fine
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.shared_future___get
-  cd ~/libcxx-test/thread/futures/futures.shared_future
-    nalibcxxg++  get.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___dtor
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___make_ready_at_thread_exit
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  make_ready_at_thread_exit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___operator
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  operator.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'operator.pass.cpp:86: int main(): assertion "false" failed'
-
-FAIL: thread___futures___futures.unique_future___dtor
-  cd ~/libcxx-test/thread/futures/futures.unique_future  # gcc4.8 works fine
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.unique_future___get
-  cd ~/libcxx-test/thread/futures/futures.unique_future
-    nalibcxxg++  get.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
diff --git a/tests/device/test-libc++-shared-full/jni/Android.mk b/tests/device/test-libc++-shared-full/jni/Android.mk
index 4080cfa..3496280 100644
--- a/tests/device/test-libc++-shared-full/jni/Android.mk
+++ b/tests/device/test-libc++-shared-full/jni/Android.mk
@@ -9,7 +9,9 @@
 LOCAL_MODULE := $$(subst /,___,$$(__test))
 
 # armeabi and mips needs libatomic to provide "__atomic_is_lock_free"
+ifneq (,$(filter armeabi mips,$(TARGET_ARCH_ABI)))
 LOCAL_LDLIBS += -latomic
+endif
 
 # Enable RTTI and exception handling for some tests
 LOCAL_CPP_FEATURES := rtti exceptions
@@ -29,95 +31,47 @@
 # The following black list contain test can't be compiled under various
 # configuration
 
-black_list_all := \
-    utilities/meta/meta.trans/meta.trans.other/aligned_storage
+black_list_all :=
 
-black_list_clang3_4 :=
+black_list_clang3_4 := \
+    utilities/tuple/tuple.tuple/TupleFunction
 
-black_list_clang3_3 := \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable
+ifeq ($(__shared),true)
+ifeq ($(TARGET_ARCH_ABI),x86)
+#   ToDo: Disabe the following test due to undefined 'scalbln'.  GCC compiles fine.
+black_list_clang3_4 += \
+    depr/depr.c.headers/math_h \
+    numerics/c.math/cmath
+endif
+endif
 
+# gcc4.8 fails atomic_flag_test_and_set_explicit and test_and_set for x86, x86_64, mips, mips64
 black_list_gcc4_8 := \
-    atomics/atomics.fences/atomic_signal_fence \
-    atomics/atomics.fences/atomic_thread_fence \
-    atomics/atomics.flag/atomic_flag_clear \
-    atomics/atomics.flag/atomic_flag_clear_explicit \
-    atomics/atomics.flag/atomic_flag_test_and_set \
     atomics/atomics.flag/atomic_flag_test_and_set_explicit \
-    atomics/atomics.flag/clear \
-    atomics/atomics.flag/default \
-    atomics/atomics.flag/init \
     atomics/atomics.flag/test_and_set \
-    atomics/atomics.general/nothing_to_do \
-    atomics/atomics.lockfree/lockfree \
-    atomics/atomics.order/kill_dependency \
-    atomics/atomics.order/memory_order \
-    atomics/atomics.syn/nothing_to_do \
-    atomics/atomics.types.generic/address \
-    atomics/atomics.types.generic/bool \
-    atomics/atomics.types.generic/cstdint_typedefs \
-    atomics/atomics.types.generic/integral \
-    atomics/atomics.types.generic/integral_typedefs \
-    atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_init \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init \
-    atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do \
-    atomics/atomics.types.operations/nothing_to_do \
-    atomics/version \
-    thread/futures/futures.async/async \
-    thread/futures/futures.overview/launch \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02 \
-    utilities/meta/meta.rel/is_convertible \
-    utilities/meta/meta.trans/meta.trans.other/underlying_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_literal_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivial \
     utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible \
-    utilities/utility/pairs/pairs.pair/copy_ctor \
-    utilities/utility/pairs/pairs.pair/rv_pair_U_V \
-    utilities/utility/pairs/pairs.spec/make_pair
+    utilities/utility/pairs/pairs.pair/copy_ctor
 
+# gcc4.9 segfault on size_size_string_size_size for armeabi
 black_list_gcc4_9 := \
+    $(black_list_gcc4_8) \
+    strings/basic.string/string.ops/string_compare/size_size_string_size_size \
+    utilities/tuple/tuple.tuple/TupleFunction
+
+# gcc4.6 fails all atomics
+black_list_gcc4_6 := \
+    $(black_list_gcc4_8) \
     atomics/atomics.fences/atomic_signal_fence \
     atomics/atomics.fences/atomic_thread_fence \
-    atomics/atomics.flag/atomic_flag_clear \
     atomics/atomics.flag/atomic_flag_clear_explicit \
-    atomics/atomics.flag/atomic_flag_test_and_set \
+    atomics/atomics.flag/atomic_flag_clear \
     atomics/atomics.flag/atomic_flag_test_and_set_explicit \
+    atomics/atomics.flag/atomic_flag_test_and_set \
     atomics/atomics.flag/clear \
     atomics/atomics.flag/default \
     atomics/atomics.flag/init \
@@ -135,71 +89,33 @@
     atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do \
     atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do \
     atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_init \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init \
     atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do \
     atomics/atomics.types.operations/nothing_to_do \
     atomics/version \
-    thread/futures/futures.async/async \
-    thread/futures/futures.overview/launch \
-    utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue \
-    utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue \
-    utilities/function.objects/func.memfn/member_function_const \
-    utilities/function.objects/func.memfn/member_function_const_volatile \
-    utilities/function.objects/func.memfn/member_function_volatile \
-    utilities/function.objects/func.require/invoke \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke_int_0 \
-    utilities/function.objects/refwrap/refwrap.invoke/invoke \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02 \
-    utilities/meta/meta.rel/is_convertible \
-    utilities/meta/meta.trans/meta.trans.other/result_of \
-    utilities/meta/meta.trans/meta.trans.other/underlying_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_literal_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivial \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible \
-    utilities/utility/pairs/pairs.pair/copy_ctor \
-    utilities/utility/pairs/pairs.pair/rv_pair_U_V \
-    utilities/utility/pairs/pairs.spec/make_pair
 
-black_list_x86 := \
-    language.support/support.types/max_align_t
 
 # Compute the back_list in this particular configuration: "all | compiler | arch"
 
@@ -209,19 +125,20 @@
 black_list += $(black_list_clang3_4)
 else
 ifeq (clang3.3,$(NDK_TOOLCHAIN_VERSION))
-black_list += $(black_list_clang3_3)
+$(error clang3.3 is not tested against libc++.  Please upgrade to clang3.4 or after, or use gcc4.8)
 else
 ifeq (4.8,$(NDK_TOOLCHAIN_VERSION))
 black_list += $(black_list_gcc4_8)
-endif
+else
 ifeq (4.9,$(NDK_TOOLCHAIN_VERSION))
 black_list += $(black_list_gcc4_9)
+else
+ifeq (4.6,$(NDK_TOOLCHAIN_VERSION))
+black_list += $(black_list_gcc4_6)
 endif
 endif
 endif
-
-ifeq ($(TARGET_ARCH_ABI),x86)
-black_list += $(black_list_x86)
+endif
 endif
 
 # Function  gen-test
@@ -993,6 +910,7 @@
 $(call gen-test, containers/sequences/vector.bool/swap)
 $(call gen-test, containers/sequences/vector.bool/types)
 $(call gen-test, containers/sequences/vector.bool/vector_bool)
+$(call gen-test, containers/sequences/vector/asan) # newnew
 $(call gen-test, containers/sequences/vector/const_value_type)
 $(call gen-test, containers/sequences/vector/db_back)
 $(call gen-test, containers/sequences/vector/db_cback)
@@ -1027,6 +945,7 @@
 $(call gen-test, containers/sequences/vector/vector.cons/copy_alloc)
 $(call gen-test, containers/sequences/vector/vector.cons/copy)
 $(call gen-test, containers/sequences/vector/vector.cons/default_noexcept)
+$(call gen-test, containers/sequences/vector/vector.cons/default.recursive) # new
 $(call gen-test, containers/sequences/vector/vector.cons/dtor_noexcept)
 $(call gen-test, containers/sequences/vector/vector.cons/initializer_list_alloc)
 $(call gen-test, containers/sequences/vector/vector.cons/initializer_list)
@@ -1543,6 +1462,8 @@
 $(call gen-test, diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string)
 $(call gen-test, diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do)
 $(call gen-test, diagnostics/syserr/version)
+$(call gen-test, extensions/hash/specializations) # new
+$(call gen-test, extensions/nothing_to_do) # new
 $(call gen-test, input.output/file.streams/c.files/cinttypes)
 $(call gen-test, input.output/file.streams/c.files/cstdio)
 $(call gen-test, input.output/file.streams/c.files/version_ccstdio)
@@ -1992,6 +1913,7 @@
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere)
+$(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator) # new
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test)
@@ -3434,6 +3356,7 @@
 $(call gen-test, re/re.traits/length)
 $(call gen-test, re/re.traits/lookup_classname)
 $(call gen-test, re/re.traits/lookup_collatename)
+$(call gen-test, re/re.traits/lookup_collatename.xlocale)
 $(call gen-test, re/re.traits/transform)
 $(call gen-test, re/re.traits/transform_primary)
 $(call gen-test, re/re.traits/translate_nocase)
@@ -3786,6 +3709,8 @@
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/destructor)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/notify_all)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/notify_one)
+$(call gen-test, thread/thread.condition/thread.condition.condvarany/wait.exception) # new
+$(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for.exception) # new
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for_pred)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait)
@@ -3864,16 +3789,16 @@
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock_shared)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_for)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_for)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_until)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_until)
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until) # path-change
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock)
@@ -3939,6 +3864,7 @@
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/max_size)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction)
+$(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers) # new
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment)
@@ -4074,6 +4000,7 @@
 $(call gen-test, utilities/memory/default.allocator/allocator.members/allocate)
 $(call gen-test, utilities/memory/default.allocator/allocator.members/construct)
 $(call gen-test, utilities/memory/default.allocator/allocator.members/max_size)
+$(call gen-test, utilities/memory/default.allocator/allocator_pointers) # new
 $(call gen-test, utilities/memory/default.allocator/allocator_types)
 $(call gen-test, utilities/memory/default.allocator/allocator_void)
 $(call gen-test, utilities/memory/pointer.traits/difference_type)
@@ -4324,6 +4251,7 @@
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_default_constructible)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_destructible)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_empty)
+$(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_final) # new
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_literal_type)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_move_assignable)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_move_constructible)
@@ -4535,7 +4463,9 @@
 $(call gen-test, utilities/time/time.traits/time.traits.specializations/time_point)
 $(call gen-test, utilities/time/version)
 $(call gen-test, utilities/tuple/tuple.general/nothing_to_do)
+$(call gen-test, utilities/tuple/tuple.general/tuple.smartptr) # new
 $(call gen-test, utilities/tuple/tuple.tuple/empty_member)
+$(call gen-test, utilities/tuple/tuple.tuple/TupleFunction) # new
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/const_pair)
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/convert_copy)
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/convert_move)
diff --git a/tests/device/test-libc++-static-full/BROKEN_BUILD b/tests/device/test-libc++-static-full/BROKEN_BUILD
index be9fc83..e69de29 100644
--- a/tests/device/test-libc++-static-full/BROKEN_BUILD
+++ b/tests/device/test-libc++-static-full/BROKEN_BUILD
@@ -1 +0,0 @@
-4.6
\ No newline at end of file
diff --git a/tests/device/test-libc++-static-full/BROKEN_RUN b/tests/device/test-libc++-static-full/BROKEN_RUN
index cc5d747..b3b7091 100644
--- a/tests/device/test-libc++-static-full/BROKEN_RUN
+++ b/tests/device/test-libc++-static-full/BROKEN_RUN
@@ -14,85 +14,11 @@
 #  alias nalibcxxg++="/tmp/ndk-$USER/android-ndk-api14-arm-4.8-clang3.4-libc++/bin/arm-linux-androideabi-g++ -std=c++11 -O2 -g -march=armv7-a -mthumb -mfpu=vfpv3-d16 -march=armv7-a -mthumb -Wl,--fix-cortex-a8 -I$NDK/sources/cxx-stl/llvm-libc++/libcxx/test/support -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
 #
 
-FAIL: containers___sequences___vector___vector.capacity___shrink_to_fit
-  cd ~/libcxx-test/containers/sequences/vector/vector.capacity  # fail: armeabi-v7a  pass: x86, gcc4.8
-    nalibcxxg++  shrink_to_fit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: input.output___file.streams___fstreams___filebuf.virtuals___seekoff
-  cd ~/libcxx-test/input.output/file.streams/fstreams/filebuf.virtuals
-    nalibcxxg++  seekoff.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 000645ac  /data/local/tmp/libc++_shared.so (std::__1::codecvt<wchar_t, char, mbstate_t>::do_out(mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const+39)
-      $NDK/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:1535
-         codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
-             const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
-             extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
-         frm = NULL
-
-FAIL: input.output___iostream.format___output.streams___ostream_sentry___destruct
-  cd ~/libcxx-test/input.output/iostream.format/output.streams/ostream_sentry
-    nalibcxxg++  destruct.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'destruct.pass.cpp:59: int main(): assertion "sync_called == 1" failed'
-
-FAIL: language.support___support.exception___except.nested___assign
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  assign.pass.cpp -lc++_shared -latomic
-      F/libc    (15332): assign.pass.cpp:47: int main(): assertion "e.nested_ptr() != nullptr" failed
-
-FAIL: language.support___support.exception___except.nested___ctor_copy
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  ctor_copy.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ctor_copy.pass.cpp:45: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___except.nested___ctor_default
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  ctor_default.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ctor_default.pass.cpp:43: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___except.nested___rethrow_if_nested
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  rethrow_if_nested.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___except.nested___rethrow_nested
-  cd ~/libcxx-test/language.support/support.exception/except.nested
-    nalibcxxg++  rethrow_nested.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'rethrow_nested.pass.cpp:45: int main(): assertion "e.nested_ptr() != nullptr" failed'
-
-FAIL: language.support___support.exception___propagation___current_exception
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  current_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'current_exception.pass.cpp:60: int main(): assertion "p != nullptr" failed'
-
-FAIL: language.support___support.exception___propagation___make_exception_ptr
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  make_exception_ptr.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___propagation___rethrow_exception
-  cd ~/libcxx-test/language.support/support.exception/propagation
-    nalibcxxg++  rethrow_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: language.support___support.exception___uncaught___uncaught_exception
-  cd ~/libcxx-test/language.support/support.exception/uncaught
-    nalibcxxg++  uncaught_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'uncaught_exception.pass.cpp:37: int main(): assertion "!std::uncaught_exception()" failed'
-
-FAIL: localization___locale.categories___category.collate___locale.collate.bynam___transform
+FAIL: localization___locale.categories___category.collate___locale.collate.byname___transform
   cd ~/libcxx-test/localization/locale.categories/category.collate/locale.collate.byname
     nalibcxxg++  transform.pass.cpp -lc++_shared -latomic
       F/libc    (23516): transform.pass.cpp:33: int main(): assertion "f.transform(x.data(), x.data() + x.size()) != x" failed
 
-FAIL: localization___locale.categories___category.ctype___locale.codecvt___locale.codecvt.members___wchar_t_out
-  cd ~/libcxx-test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members
-    nalibcxxg++  wchar_t_out.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'wchar_t_out.pass.cpp:65: int main(): assertion "from_next - from.data() == to.size()-1" failed'
-
 FAIL: localization___locale.categories___category.ctype___locale.ctype.byname___is_1
   cd ~/libcxx-test/localization/locale.categories/category.ctype/locale.ctype.byname
     nalibcxxg++  is_1.pass.cpp -lc++_shared -latomic
@@ -238,11 +164,6 @@
     nalibcxxg++  put_long_double_zh_CN.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'put_long_double_zh_CN.pass.cpp:66: int main(): assertion "ex == "0.00"" failed'
 
-FAIL: localization___locale.categories___category.monetary___locale.money.put___locale.money.put.members___put_string_en_US
-  cd ~/libcxx-test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members
-    nalibcxxg++  put_string_en_US.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'put_string_en_US.pass.cpp:66: int main(): assertion "ex == "0.00"" failed'
-
 FAIL: localization___locale.categories___category.numeric___locale.nm.put___facet.num.put.members___put_double
   cd ~/libcxx-test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members
     nalibcxxg++  put_double.pass.cpp -lc++_shared -latomic
@@ -258,11 +179,6 @@
     nalibcxxg++  put_pointer.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'put_pointer.pass.cpp:41: int main(): assertion "ex == "0x0" || ex == "(nil)"" failed'
 
-FAIL: localization___locale.categories___category.numeric___locale.num.get___facet.num.get.members___get_pointer
-  cd ~/libcxx-test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members
-    nalibcxxg++  get_pointer.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'get_pointer.pass.cpp:59: int main(): assertion "p == (void*)0x73" failed'
-
 FAIL: localization___locale.categories___category.time___locale.time.get.byname___date_order
   cd ~/libcxx-test/localization/locale.categories/category.time/locale.time.get.byname
     nalibcxxg++  date_order.pass.cpp -lc++_shared -latomic
@@ -332,169 +248,3 @@
   cd ~/libcxx-test/localization/locales/locale/locale.cons
     nalibcxxg++  char_pointer.pass.cpp -lc++_shared -latomic
       I/DEBUG   (   51): Abort message: 'char_pointer.pass.cpp:92: int main(): assertion "false" failed'
-
-FAIL: localization___locales___locale.convenience___conversions___conversions.buffer___seekoff
-  cd ~/libcxx-test/localization/locales/locale.convenience/conversions/conversions.buffer
-    nalibcxxg++  seekoff.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00064598  /data/local/tmp/libc++_shared.so (std::__1::codecvt<wchar_t, char, mbstate_t>::do_out(mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const+39)
-
-FAIL: re___re.alg___re.alg.match___basic
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  basic.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'basic.pass.cpp:622: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]", std::regex_constants::basic))" failed'
-
-FAIL: re___re.alg___re.alg.match___ecma
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  ecma.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:583: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.match___extended
-  cd ~/libcxx-test/re/re.alg/re.alg.match
-    nalibcxxg++  extended.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:583: int main(): assertion "std::regex_match(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.search___awk -lcompiler_rt_static -latomic
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  awk.pass.cpp -lcompiler_rt_static -latomic
-      I/DEBUG   (   51): Abort message: 'awk.pass.cpp:692: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::awk))" failed'
-
-FAIL: re___re.alg___re.alg.search___basic
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  basic.pass.cpp -lc++_shared -latomic
-      /libc    (16185): basic.pass.cpp:694: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_
-
-FAIL: re___re.alg___re.alg.search___ecma
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  ecma.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'ecma.pass.cpp:673: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]"))" failed'
-
-FAIL: re___re.alg___re.alg.search___extended
-  cd ~/libcxx-test/re/re.alg/re.alg.search
-    nalibcxxg++  extended.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'extended.pass.cpp:692: int main(): assertion "std::regex_search(s, m, std::regex("[a[=M=]z]", std::regex_constants::extended))" failed'
-
-FAIL: re___re.traits___isctype
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  isctype.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'isctype.pass.cpp:29: int main(): assertion "!t.isctype(' ', t.lookup_classname(s.begin(), s.end()))" failed'
-
-FAIL: re___re.traits___lookup_collatename
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  lookup_collatename.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'lookup_collatename.pass.cpp:29: void test(const char_type *, const std::basic_string<char_type> &) [char_type = char]: assertion "t.lookup_collatename(F(A), F(A + t.length(A))) == expected" failed'
-
-FAIL: re___re.traits___transform
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  transform.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'transform.pass.cpp:31: int main(): assertion "t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1))" failed'
-
-FAIL: re___re.traits___transform_primary
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  transform_primary.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'transform_primary.pass.cpp:34: int main(): assertion "t.transform_primary(F(A), F(A+1)) == t.transform_primary(F(Aacute), F(Aacute+1))" failed'
-
-FAIL: re___re.traits___translate_nocase
-  cd ~/libcxx-test/re/re.traits
-    nalibcxxg++  translate_nocase.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'translate_nocase.pass.cpp:44: int main(): assertion "t.translate_nocase('\xDA') == '\xFA'" failed'
-
-FAIL: strings___string.conversions___stod
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stod.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: strings___string.conversions___stof
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stof.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:355: wcstof: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoi
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoi.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:361: wcstol: assertion "0" failed'
-
-FAIL: strings___string.conversions___stol
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stol.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:361: wcstol: assertion "0" failed'
-
-FAIL: strings___string.conversions___stold
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stold.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:367: wcstold: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoll
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoll.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:373: wcstoll: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoull
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoull.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:379: wcstoull: assertion "0" failed'
-
-FAIL: strings___string.conversions___stoul
-  cd ~/libcxx-test/strings/string.conversions
-    nalibcxxg++  stoul.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: '/tmp/ndk-andrewhsieh/tmp/build-10543/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../../android/support/src/wchar_support.c:379: wcstoull: assertion "0" failed'
-
-FAIL: thread___futures___futures.promise___dtor
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.promise___set_exception_at_thread_exit
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  set_exception_at_thread_exit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.promise___set_exception
-  cd ~/libcxx-test/thread/futures/futures.promise
-    nalibcxxg++  set_exception.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.shared_future___dtor
-  cd ~/libcxx-test/thread/futures/futures.shared_future  # gcc4.8 works fine
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.shared_future___get
-  cd ~/libcxx-test/thread/futures/futures.shared_future
-    nalibcxxg++  get.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___dtor
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___make_ready_at_thread_exit
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  make_ready_at_thread_exit.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.tas___futures.task.members___operator
-  cd ~/libcxx-test/thread/futures/futures.tas/futures.task.members
-    nalibcxxg++  operator.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51): Abort message: 'operator.pass.cpp:86: int main(): assertion "false" failed'
-
-FAIL: thread___futures___futures.unique_future___dtor
-  cd ~/libcxx-test/thread/futures/futures.unique_future  # gcc4.8 works fine
-    nalibcxxg++  dtor.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
-FAIL: thread___futures___futures.unique_future___get
-  cd ~/libcxx-test/thread/futures/futures.unique_future
-    nalibcxxg++  get.pass.cpp -lc++_shared -latomic
-      I/DEBUG   (   51):     #00  pc 00035e66  /data/local/tmp/libc++_shared.so (__gabixx::__default_terminate()+13)
-      I/DEBUG   (   51):     #01  pc 00035e7d  /data/local/tmp/libc++_shared.so (__gabixx::__terminate(void (*)())+16)
-
diff --git a/tests/device/test-libc++-static-full/jni/Android.mk b/tests/device/test-libc++-static-full/jni/Android.mk
index 4080cfa..9e512bd 100644
--- a/tests/device/test-libc++-static-full/jni/Android.mk
+++ b/tests/device/test-libc++-static-full/jni/Android.mk
@@ -9,7 +9,9 @@
 LOCAL_MODULE := $$(subst /,___,$$(__test))
 
 # armeabi and mips needs libatomic to provide "__atomic_is_lock_free"
+ifneq (,$(filter armeabi mips,$(TARGET_ARCH_ABI)))
 LOCAL_LDLIBS += -latomic
+endif
 
 # Enable RTTI and exception handling for some tests
 LOCAL_CPP_FEATURES := rtti exceptions
@@ -29,95 +31,38 @@
 # The following black list contain test can't be compiled under various
 # configuration
 
-black_list_all := \
-    utilities/meta/meta.trans/meta.trans.other/aligned_storage
+black_list_all :=
 
-black_list_clang3_4 :=
+black_list_clang3_4 := \
+    utilities/tuple/tuple.tuple/TupleFunction
 
-black_list_clang3_3 := \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable
-
+# gcc4.8 fails atomic_flag_test_and_set_explicit and test_and_set for x86, x86_64, mips, mips64
 black_list_gcc4_8 := \
-    atomics/atomics.fences/atomic_signal_fence \
-    atomics/atomics.fences/atomic_thread_fence \
-    atomics/atomics.flag/atomic_flag_clear \
-    atomics/atomics.flag/atomic_flag_clear_explicit \
-    atomics/atomics.flag/atomic_flag_test_and_set \
     atomics/atomics.flag/atomic_flag_test_and_set_explicit \
-    atomics/atomics.flag/clear \
-    atomics/atomics.flag/default \
-    atomics/atomics.flag/init \
     atomics/atomics.flag/test_and_set \
-    atomics/atomics.general/nothing_to_do \
-    atomics/atomics.lockfree/lockfree \
-    atomics/atomics.order/kill_dependency \
-    atomics/atomics.order/memory_order \
-    atomics/atomics.syn/nothing_to_do \
-    atomics/atomics.types.generic/address \
-    atomics/atomics.types.generic/bool \
-    atomics/atomics.types.generic/cstdint_typedefs \
-    atomics/atomics.types.generic/integral \
-    atomics/atomics.types.generic/integral_typedefs \
-    atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_init \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init \
-    atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do \
-    atomics/atomics.types.operations/nothing_to_do \
-    atomics/version \
-    thread/futures/futures.async/async \
-    thread/futures/futures.overview/launch \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02 \
-    utilities/meta/meta.rel/is_convertible \
-    utilities/meta/meta.trans/meta.trans.other/underlying_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_literal_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivial \
     utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable \
     utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible \
-    utilities/utility/pairs/pairs.pair/copy_ctor \
-    utilities/utility/pairs/pairs.pair/rv_pair_U_V \
-    utilities/utility/pairs/pairs.spec/make_pair
+    utilities/utility/pairs/pairs.pair/copy_ctor
 
+# gcc4.9 segfault on size_size_string_size_size for armeabi
 black_list_gcc4_9 := \
+    $(black_list_gcc4_8) \
+    strings/basic.string/string.ops/string_compare/size_size_string_size_size \
+    utilities/tuple/tuple.tuple/TupleFunction
+
+# gcc4.6 fails all atomics
+black_list_gcc4_6 := \
+    $(black_list_gcc4_8) \
     atomics/atomics.fences/atomic_signal_fence \
     atomics/atomics.fences/atomic_thread_fence \
-    atomics/atomics.flag/atomic_flag_clear \
     atomics/atomics.flag/atomic_flag_clear_explicit \
-    atomics/atomics.flag/atomic_flag_test_and_set \
+    atomics/atomics.flag/atomic_flag_clear \
     atomics/atomics.flag/atomic_flag_test_and_set_explicit \
+    atomics/atomics.flag/atomic_flag_test_and_set \
     atomics/atomics.flag/clear \
     atomics/atomics.flag/default \
     atomics/atomics.flag/init \
@@ -135,71 +80,33 @@
     atomics/atomics.types.operations/atomics.types.operations.arith/nothing_to_do \
     atomics/atomics.types.operations/atomics.types.operations.general/nothing_to_do \
     atomics/atomics.types.operations/atomics.types.operations.pointer/nothing_to_do \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_exchange \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_and \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_or \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor_explicit \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_xor \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_init \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_load_explicit \
-    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_load \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_store_explicit \
+    atomics/atomics.types.operations/atomics.types.operations.req/atomic_store \
     atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init \
     atomics/atomics.types.operations/atomics.types.operations.templ/nothing_to_do \
     atomics/atomics.types.operations/nothing_to_do \
     atomics/version \
-    thread/futures/futures.async/async \
-    thread/futures/futures.overview/launch \
-    utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue \
-    utilities/function.objects/bind/func.bind/func.bind.bind/invoke_rvalue \
-    utilities/function.objects/func.memfn/member_function_const \
-    utilities/function.objects/func.memfn/member_function_const_volatile \
-    utilities/function.objects/func.memfn/member_function_volatile \
-    utilities/function.objects/func.require/invoke \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke \
-    utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke_int_0 \
-    utilities/function.objects/refwrap/refwrap.invoke/invoke \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default02 \
-    utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/pointer02 \
-    utilities/meta/meta.rel/is_convertible \
-    utilities/meta/meta.trans/meta.trans.other/result_of \
-    utilities/meta/meta.trans/meta.trans.other/underlying_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_literal_type \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivial \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable \
-    utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible \
-    utilities/utility/pairs/pairs.pair/copy_ctor \
-    utilities/utility/pairs/pairs.pair/rv_pair_U_V \
-    utilities/utility/pairs/pairs.spec/make_pair
 
-black_list_x86 := \
-    language.support/support.types/max_align_t
 
 # Compute the back_list in this particular configuration: "all | compiler | arch"
 
@@ -209,19 +116,20 @@
 black_list += $(black_list_clang3_4)
 else
 ifeq (clang3.3,$(NDK_TOOLCHAIN_VERSION))
-black_list += $(black_list_clang3_3)
+$(error clang3.3 is not tested against libc++.  Please upgrade to clang3.4 or after, or use gcc4.8)
 else
 ifeq (4.8,$(NDK_TOOLCHAIN_VERSION))
 black_list += $(black_list_gcc4_8)
-endif
+else
 ifeq (4.9,$(NDK_TOOLCHAIN_VERSION))
 black_list += $(black_list_gcc4_9)
+else
+ifeq (4.6,$(NDK_TOOLCHAIN_VERSION))
+black_list += $(black_list_gcc4_6)
 endif
 endif
 endif
-
-ifeq ($(TARGET_ARCH_ABI),x86)
-black_list += $(black_list_x86)
+endif
 endif
 
 # Function  gen-test
@@ -993,6 +901,7 @@
 $(call gen-test, containers/sequences/vector.bool/swap)
 $(call gen-test, containers/sequences/vector.bool/types)
 $(call gen-test, containers/sequences/vector.bool/vector_bool)
+$(call gen-test, containers/sequences/vector/asan) # newnew
 $(call gen-test, containers/sequences/vector/const_value_type)
 $(call gen-test, containers/sequences/vector/db_back)
 $(call gen-test, containers/sequences/vector/db_cback)
@@ -1027,6 +936,7 @@
 $(call gen-test, containers/sequences/vector/vector.cons/copy_alloc)
 $(call gen-test, containers/sequences/vector/vector.cons/copy)
 $(call gen-test, containers/sequences/vector/vector.cons/default_noexcept)
+$(call gen-test, containers/sequences/vector/vector.cons/default.recursive) # new
 $(call gen-test, containers/sequences/vector/vector.cons/dtor_noexcept)
 $(call gen-test, containers/sequences/vector/vector.cons/initializer_list_alloc)
 $(call gen-test, containers/sequences/vector/vector.cons/initializer_list)
@@ -1543,6 +1453,8 @@
 $(call gen-test, diagnostics/syserr/syserr.syserr/syserr.syserr.members/ctor_int_error_category_string)
 $(call gen-test, diagnostics/syserr/syserr.syserr/syserr.syserr.overview/nothing_to_do)
 $(call gen-test, diagnostics/syserr/version)
+$(call gen-test, extensions/hash/specializations) # new
+$(call gen-test, extensions/nothing_to_do) # new
 $(call gen-test, input.output/file.streams/c.files/cinttypes)
 $(call gen-test, input.output/file.streams/c.files/cstdio)
 $(call gen-test, input.output/file.streams/c.files/version_ccstdio)
@@ -1992,6 +1904,7 @@
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.conv/tested_elsewhere)
+$(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator) # new
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type)
 $(call gen-test, iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test)
@@ -3434,6 +3347,7 @@
 $(call gen-test, re/re.traits/length)
 $(call gen-test, re/re.traits/lookup_classname)
 $(call gen-test, re/re.traits/lookup_collatename)
+$(call gen-test, re/re.traits/lookup_collatename.xlocale)
 $(call gen-test, re/re.traits/transform)
 $(call gen-test, re/re.traits/transform_primary)
 $(call gen-test, re/re.traits/translate_nocase)
@@ -3786,6 +3700,8 @@
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/destructor)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/notify_all)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/notify_one)
+$(call gen-test, thread/thread.condition/thread.condition.condvarany/wait.exception) # new
+$(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for.exception) # new
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait_for_pred)
 $(call gen-test, thread/thread.condition/thread.condition.condvarany/wait)
@@ -3864,16 +3780,16 @@
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/nothing_to_do)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/default)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/lock_shared)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_for)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_for)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_shared_until)
-$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedmutex.requirements/thread.sharedmutex.class/try_lock_until)
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/nothing_to_do) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until) # path-change
+$(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until) # path-change
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/nothing_to_do)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/default)
 $(call gen-test, thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock)
@@ -3939,6 +3855,7 @@
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/max_size)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/outer_allocator)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.members/select_on_container_copy_construction)
+$(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers) # new
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/inner_allocator_type)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_copy_assignment)
 $(call gen-test, utilities/allocator.adaptor/allocator.adaptor.types/propagate_on_container_move_assignment)
@@ -4074,6 +3991,7 @@
 $(call gen-test, utilities/memory/default.allocator/allocator.members/allocate)
 $(call gen-test, utilities/memory/default.allocator/allocator.members/construct)
 $(call gen-test, utilities/memory/default.allocator/allocator.members/max_size)
+$(call gen-test, utilities/memory/default.allocator/allocator_pointers) # new
 $(call gen-test, utilities/memory/default.allocator/allocator_types)
 $(call gen-test, utilities/memory/default.allocator/allocator_void)
 $(call gen-test, utilities/memory/pointer.traits/difference_type)
@@ -4324,6 +4242,7 @@
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_default_constructible)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_destructible)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_empty)
+$(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_final) # new
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_literal_type)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_move_assignable)
 $(call gen-test, utilities/meta/meta.unary/meta.unary.prop/is_move_constructible)
@@ -4535,7 +4454,9 @@
 $(call gen-test, utilities/time/time.traits/time.traits.specializations/time_point)
 $(call gen-test, utilities/time/version)
 $(call gen-test, utilities/tuple/tuple.general/nothing_to_do)
+$(call gen-test, utilities/tuple/tuple.general/tuple.smartptr) # new
 $(call gen-test, utilities/tuple/tuple.tuple/empty_member)
+$(call gen-test, utilities/tuple/tuple.tuple/TupleFunction) # new
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/const_pair)
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/convert_copy)
 $(call gen-test, utilities/tuple/tuple.tuple/tuple.assign/convert_move)
diff --git a/tests/device/test-libc++/BROKEN_BUILD b/tests/device/test-libc++/BROKEN_BUILD
new file mode 100644
index 0000000..be9fc83
--- /dev/null
+++ b/tests/device/test-libc++/BROKEN_BUILD
@@ -0,0 +1 @@
+4.6
\ No newline at end of file
diff --git a/tests/device/test-stlport-rtti/jni/Application.mk b/tests/device/test-stlport-rtti/jni/Application.mk
index 1032bbd..6b99812 100644
--- a/tests/device/test-stlport-rtti/jni/Application.mk
+++ b/tests/device/test-stlport-rtti/jni/Application.mk
@@ -4,5 +4,4 @@
 #       was forgotten.
 #
 APP_ABI := all
-
 APP_STL := stlport_shared
diff --git a/tests/device/test-wait/jni/Application.mk b/tests/device/test-wait/jni/Application.mk
index a252a72..98f988e 100644
--- a/tests/device/test-wait/jni/Application.mk
+++ b/tests/device/test-wait/jni/Application.mk
@@ -1 +1 @@
-APP_ABI := all
+APP_ABI := all32
diff --git a/tests/device/whole-static-libs/jni/main.c b/tests/device/whole-static-libs/jni/main.c
index f5223ac..67a4bc7 100644
--- a/tests/device/whole-static-libs/jni/main.c
+++ b/tests/device/whole-static-libs/jni/main.c
@@ -4,13 +4,15 @@
  * image.
  */
 #include <stdio.h>
+#include <unistd.h>
 #include <dlfcn.h>
 
-int main(void)
+int main(int argc, char *argv[])
 {
     void*  lib;
-
-    lib = dlopen("/data/local/tmp/ndk-tests/libbar.so", RTLD_NOW);
+    char buf[PATH_MAX];
+    sprintf(buf, "%s/libbar.so", getcwd(NULL, 0));
+    lib = dlopen(buf, RTLD_NOW);
     if (lib == NULL) {
         fprintf(stderr, "Could not dlopen(\"libbar.so\"): %s\n", dlerror());
         return 1;
diff --git a/tests/rs/cppallocation/jni/Android.mk b/tests/rs/cppallocation/jni/Android.mk
deleted file mode 100644
index 726e3f2..0000000
--- a/tests/rs/cppallocation/jni/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-	multiply.rs \
-	compute.cpp
-
-LOCAL_LDFLAGS += -L$(call host-path,$(TARGET_C_INCLUDES)/../lib/rs)
-LOCAL_LDLIBS := -llog -ldl -lRScpp_static
-
-LOCAL_MODULE:= rstest-cppallocation
-
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs/cpp
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs
-LOCAL_C_INCLUDES += $(TARGET_OBJS)/$(LOCAL_MODULE)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/rs/cppallocation/jni/Application.mk b/tests/rs/cppallocation/jni/Application.mk
deleted file mode 100644
index adf5697..0000000
--- a/tests/rs/cppallocation/jni/Application.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-APP_ABI := armeabi-v7a x86 #mips
-APP_PLATFORM := android-19
-APP_STL := stlport_static
diff --git a/tests/rs/cppallocation/jni/compute.cpp b/tests/rs/cppallocation/jni/compute.cpp
deleted file mode 100644
index d176958..0000000
--- a/tests/rs/cppallocation/jni/compute.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-
-#include "RenderScript.h"
-
-#include "ScriptC_multiply.h"
-
-using namespace android;
-using namespace RSC;
-
-int main(int argc, char** argv)
-{
-
-    uint32_t numElems = 1024;
-
-    if (argc >= 2) {
-        int tempNumElems = atoi(argv[1]);
-        if (tempNumElems < 1) {
-            printf("numElems must be greater than 0\n");
-            return 1;
-        }
-        numElems = (uint32_t) tempNumElems;
-    }
-
-    sp<RS> rs = new RS();
-
-    bool r = rs->init("/system/bin");
-
-    sp<const Element> e = Element::U32(rs);
-
-    Type::Builder tb(rs, e);
-    tb.setX(numElems);
-    sp<const Type> t = tb.create();
-
-    sp<Allocation> ain = Allocation::createTyped(rs, t);
-    sp<Allocation> aout = Allocation::createTyped(rs, t);
-
-    sp<ScriptC_multiply> sc = new ScriptC_multiply(rs);
-
-    uint32_t* buf = new uint32_t[numElems];
-    for (uint32_t ct=0; ct < numElems; ct++) {
-        buf[ct] = (uint32_t)ct;
-    }
-
-    ain->copy1DRangeFrom(0, numElems, buf);
-
-    sc->forEach_multiply(ain, aout);
-
-    aout->copy1DRangeTo(0, numElems, buf);
-
-    for (uint32_t ct=0; ct < numElems; ct++) {
-        if (buf[ct] !=  ct * 2) {
-            printf("Mismatch at location %d: %u\n", ct, buf[ct]);
-            return 1;
-        }
-    }
-
-    printf("Test successful with %u elems!\n", numElems);
-
-    sc.clear();
-    t.clear();
-    e.clear();
-    ain.clear();
-    aout.clear();
-}
diff --git a/tests/rs/cppallocation/jni/multiply.rs b/tests/rs/cppallocation/jni/multiply.rs
deleted file mode 100644
index d1ffefb..0000000
--- a/tests/rs/cppallocation/jni/multiply.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma version(1)
-#pragma rs java_package_name(unused)
-#pragma rs_fp_relaxed
-
-uint32_t __attribute__((kernel)) multiply(uint32_t in) {
-    return in * 2;
-}
-
-
diff --git a/tests/rs/cppbasic/jni/Android.mk b/tests/rs/cppbasic/jni/Android.mk
deleted file mode 100644
index 1e5134b..0000000
--- a/tests/rs/cppbasic/jni/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-	mono.rs \
-	compute.cpp
-
-LOCAL_LDFLAGS += -L$(call host-path,$(TARGET_C_INCLUDES)/../lib/rs)
-LOCAL_LDLIBS := -llog -ldl -lRScpp_static
-
-LOCAL_MODULE:= rstest-compute
-
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs/cpp
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs
-LOCAL_C_INCLUDES += $(TARGET_OBJS)/$(LOCAL_MODULE)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/rs/cppbasic/jni/Application.mk b/tests/rs/cppbasic/jni/Application.mk
deleted file mode 100644
index adf5697..0000000
--- a/tests/rs/cppbasic/jni/Application.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-APP_ABI := armeabi-v7a x86 #mips
-APP_PLATFORM := android-19
-APP_STL := stlport_static
diff --git a/tests/rs/cppbasic/jni/compute.cpp b/tests/rs/cppbasic/jni/compute.cpp
deleted file mode 100644
index d93b453..0000000
--- a/tests/rs/cppbasic/jni/compute.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-
-#include "RenderScript.h"
-
-#include "ScriptC_mono.h"
-
-using namespace android;
-using namespace RSC;
-
-int test_compute()
-{
-    bool failed = false;
-
-    {
-        sp<RS> rs = new RS();
-        printf("New RS %p\n", rs.get());
-
-        // only legitimate because this is a standalone executable
-        bool r = rs->init("/system/bin");
-        printf("Init returned %i\n", r);
-
-        sp<const Element> e = Element::RGBA_8888(rs);
-        printf("Element %p\n", e.get());
-
-        Type::Builder tb(rs, e);
-        tb.setX(128);
-        tb.setY(128);
-        sp<const Type> t = tb.create();
-        printf("Type %p\n", t.get());
-
-
-        sp<Allocation> a1 = Allocation::createSized(rs, e, 1000);
-        printf("Allocation %p\n", a1.get());
-
-        sp<Allocation> ain = Allocation::createTyped(rs, t);
-        sp<Allocation> aout = Allocation::createTyped(rs, t);
-        printf("Allocation %p %p\n", ain.get(), aout.get());
-
-        sp<ScriptC_mono> sc = new ScriptC_mono(rs);
-        printf("new script\n");
-
-        sc->set_alloc(a1);
-        sc->set_elem(e);
-        sc->set_type(t);
-        sc->set_script(sc);
-        sc->set_script(NULL);
-        sp<const Sampler> samp = Sampler::CLAMP_NEAREST(rs);
-        sc->set_sampler(samp);
-
-        // We read back the status from the script-side via a "failed" allocation.
-        sp<const Element> failed_e = Element::BOOLEAN(rs);
-        Type::Builder failed_tb(rs, failed_e);
-        failed_tb.setX(1);
-        sp<const Type> failed_t = failed_tb.create();
-        sp<Allocation> failed_alloc = Allocation::createTyped(rs, failed_t);
-
-        failed_alloc->copy1DRangeFrom(0, failed_t->getCount(), &failed);
-        sc->bind_failed(failed_alloc);
-
-        uint32_t *buf = new uint32_t[t->getCount()];
-        for (uint32_t ct=0; ct < t->getCount(); ct++) {
-            buf[ct] = ct | (ct << 16);
-        }
-        ain->copy1DRangeFrom(0, t->getCount(), buf);
-        delete [] buf;
-
-        sc->forEach_root(ain, aout);
-
-        sc->invoke_foo(99, 3.1f);
-        sc->set_g_f(39.9f);
-        sc->set_g_i(-14);
-        sc->invoke_foo(99, 3.1f);
-        printf("for each done\n");
-
-        sc->invoke_bar(47, -3, 'c', -7, 14, -8);
-
-        // Verify a simple kernel.
-        {
-            static const uint32_t xDim = 7;
-            static const uint32_t yDim = 7;
-            sp<const Element> e = Element::I32(rs);
-            Type::Builder tb(rs, e);
-            tb.setX(xDim);
-            tb.setY(yDim);
-            sp<const Type> t = tb.create();
-            sp<Allocation> kern1_in = Allocation::createTyped(rs, t);
-            sp<Allocation> kern1_out = Allocation::createTyped(rs, t);
-
-            int *buf = new int[t->getCount()];
-            for (uint32_t ct=0; ct < t->getCount(); ct++) {
-                buf[ct] = 5;
-            }
-            kern1_in->copy2DRangeFrom(0, 0, xDim, yDim, buf);
-            delete [] buf;
-
-            sc->forEach_kern1(kern1_in, kern1_out);
-            sc->forEach_verify_kern1(kern1_out);
-
-            rs->finish();
-            failed_alloc->copy1DTo(&failed);
-        }
-    }
-
-    return failed;
-}
-
-int main() {
-    bool failed = test_compute();
-
-    if (failed) {
-        printf("TEST FAILED!\n");
-    } else {
-        printf("TEST PASSED!\n");
-    }
-
-    return failed;
-}
diff --git a/tests/rs/cppbasic/jni/mono.rs b/tests/rs/cppbasic/jni/mono.rs
deleted file mode 100644
index 9e262e7..0000000
--- a/tests/rs/cppbasic/jni/mono.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma version(1)
-#pragma rs java_package_name(com.android.rs.cppbasic)
-#pragma rs_fp_relaxed
-
-int g_i = 4;
-
-float g_f = 5.9;
-
-const static float3 gMonoMult = {0.299f, 0.587f, 0.114f};
-
-bool *failed;
-
-#define _RS_ASSERT(b) \
-do { \
-    if (!(b)) { \
-        *failed = true; \
-        rsDebug(#b " FAILED", 0); \
-    } \
-\
-} while (0)
-
-struct myStruct {
-    int i;
-    int j;
-    float f;
-    char c[3];
-};
-
-rs_allocation alloc;
-rs_element elem;
-rs_type type;
-rs_sampler sampler;
-rs_script script;
-
-void root(const uchar4 *v_in, uchar4 *v_out) {
-    float4 f4 = rsUnpackColor8888(*v_in);
-
-    float3 mono = dot(f4.rgb, gMonoMult);
-    *v_out = rsPackColorTo8888(mono);
-}
-
-void foo(int i, float f) {
-    rsDebug("g_i", g_i);
-    rsDebug("g_f", g_f);
-    rsDebug("i", i);
-    rsDebug("f", f);
-}
-
-void bar(int i, int j, char k, int l, int m, int n) {
-    _RS_ASSERT(i == 47);
-    _RS_ASSERT(j == -3);
-    _RS_ASSERT(k == 'c');
-    _RS_ASSERT(l == -7);
-    _RS_ASSERT(m == 14);
-    _RS_ASSERT(n == -8);
-}
-
-int __attribute__((kernel)) kern1(int i, uint32_t x, uint32_t y) {
-    return i + 10 * x + 100 *y;
-}
-
-void __attribute__((kernel)) verify_kern1(int i, uint32_t x, uint32_t y) {
-    _RS_ASSERT(i == (5 + 10 * x + 100 * y));
-    rsDebug("i ", i);
-}
-
diff --git a/tests/rs/cppstrided/jni/Android.mk b/tests/rs/cppstrided/jni/Android.mk
deleted file mode 100644
index d7a0dae..0000000
--- a/tests/rs/cppstrided/jni/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-	multiply.rs \
-	compute.cpp
-
-LOCAL_LDFLAGS += -L$(call host-path,$(TARGET_C_INCLUDES)/../lib/rs)
-LOCAL_LDLIBS := -llog -ldl -lRScpp_static
-
-LOCAL_MODULE:= rstest-cppstrided
-
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs/cpp
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs
-LOCAL_C_INCLUDES += $(TARGET_OBJS)/$(LOCAL_MODULE)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/rs/cppstrided/jni/Application.mk b/tests/rs/cppstrided/jni/Application.mk
deleted file mode 100644
index adf5697..0000000
--- a/tests/rs/cppstrided/jni/Application.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-APP_ABI := armeabi-v7a x86 #mips
-APP_PLATFORM := android-19
-APP_STL := stlport_static
diff --git a/tests/rs/cppstrided/jni/compute.cpp b/tests/rs/cppstrided/jni/compute.cpp
deleted file mode 100644
index 819bcdc..0000000
--- a/tests/rs/cppstrided/jni/compute.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-
-#include "RenderScript.h"
-
-#include "ScriptC_multiply.h"
-
-using namespace android;
-using namespace RSC;
-
-int main(int argc, char** argv)
-{
-
-    uint32_t numElems = 1024;
-    uint32_t stride = 1025;
-
-    if (argc >= 2) {
-        int tempStride = atoi(argv[1]);
-        if (tempStride < 1024) {
-            printf("stride must be greater than or equal to 1024\n");
-            return 1;
-        }
-        stride = (uint32_t) tempStride;
-    }
-
-    sp<RS> rs = new RS();
-
-    bool r = rs->init("/system/bin");
-
-    sp<const Element> e = Element::U32(rs);
-
-    Type::Builder tb(rs, e);
-    tb.setX(numElems);
-    tb.setY(numElems);
-    sp<const Type> t = tb.create();
-
-    sp<Allocation> ain = Allocation::createTyped(rs, t);
-    sp<Allocation> aout = Allocation::createTyped(rs, t);
-
-    sp<ScriptC_multiply> sc = new ScriptC_multiply(rs);
-
-    uint32_t* buf = (uint32_t*) malloc(stride * numElems * sizeof(uint32_t));
-    if (!buf) {
-        printf("malloc failed\n");
-        return 1;
-    }
-
-    for (uint32_t i = 0; i < numElems; i++) {
-        for (uint32_t ct=0; ct < numElems; ct++) {
-            *(buf+(stride*i)+ct) = (uint32_t)ct + (i * numElems);
-        }
-    }
-
-    ain->copy2DStridedFrom(buf, stride * sizeof(uint32_t));
-
-    sc->forEach_multiply(ain, aout);
-
-    aout->copy2DStridedTo(buf, stride * sizeof(uint32_t));
-
-    for (uint32_t i = 0; i < numElems; i++) {
-        for (uint32_t ct=0; ct < numElems; ct++) {
-            if (*(buf+(stride*i)+ct) != (uint32_t)(ct + (i * numElems)) * 2) {
-                printf("Mismatch at location %d, %d: %u\n", i, ct, *(buf+(stride*i)+ct));
-                return 1;
-            }
-        }
-    }
-
-    printf("Test successful with %u stride!\n", stride);
-
-    sc.clear();
-    t.clear();
-    e.clear();
-    ain.clear();
-    aout.clear();
-}
diff --git a/tests/rs/cppstrided/jni/multiply.rs b/tests/rs/cppstrided/jni/multiply.rs
deleted file mode 100644
index d1ffefb..0000000
--- a/tests/rs/cppstrided/jni/multiply.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma version(1)
-#pragma rs java_package_name(unused)
-#pragma rs_fp_relaxed
-
-uint32_t __attribute__((kernel)) multiply(uint32_t in) {
-    return in * 2;
-}
-
-
diff --git a/tests/rs/latency/jni/Android.mk b/tests/rs/latency/jni/Android.mk
deleted file mode 100644
index b4f0b25..0000000
--- a/tests/rs/latency/jni/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-	latency.rs \
-	test-latency.cpp
-
-LOCAL_LDFLAGS += -L$(call host-path,$(TARGET_C_INCLUDES)/../lib/rs)
-LOCAL_LDLIBS := -llog -ldl -lRScpp_static
-
-LOCAL_MODULE:= rstest-latency
-
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs/cpp
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs
-LOCAL_C_INCLUDES += $(TARGET_OBJS)/$(LOCAL_MODULE)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/rs/latency/jni/Application.mk b/tests/rs/latency/jni/Application.mk
deleted file mode 100644
index adf5697..0000000
--- a/tests/rs/latency/jni/Application.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-APP_ABI := armeabi-v7a x86 #mips
-APP_PLATFORM := android-19
-APP_STL := stlport_static
diff --git a/tests/rs/latency/jni/latency.rs b/tests/rs/latency/jni/latency.rs
deleted file mode 100644
index 6fc4bfd..0000000
--- a/tests/rs/latency/jni/latency.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma version(1)
-#pragma rs java_package_name(com.android.rs.cpptests)
-#pragma rs_fp_relaxed
-
-void root(const uint32_t *v_in, uint32_t *v_out) {
-
-}
-
-
diff --git a/tests/rs/latency/jni/test-latency.cpp b/tests/rs/latency/jni/test-latency.cpp
deleted file mode 100644
index 05337be..0000000
--- a/tests/rs/latency/jni/test-latency.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "RenderScript.h"
-#include <sys/time.h>
-
-#include "ScriptC_latency.h"
-
-using namespace android;
-using namespace RSC;
-
-int main(int argc, char** argv)
-{
-    int iters = 100;
-    int numElems = 1000;
-    bool forceCpu = false;
-    bool synchronous = false;
-
-    if (argc >= 2) {
-        iters = atoi(argv[1]);
-        if (iters <= 0) {
-            printf("iters must be positive\n");
-            return 1;
-        }
-    }
-
-    printf("iters = %d\n", iters);
-
-    if (argc >= 3) {
-        numElems = atoi(argv[2]);
-        if (numElems <= 0) {
-            printf("numElems must be positive\n");
-            return 1;
-        }
-    }
-
-    if (argc >= 4) {
-        int temp = atoi(argv[3]);
-        if (temp != 0)
-            forceCpu = true;
-    }
-
-    if (argc >= 5) {
-        int temp = atoi(argv[4]);
-        if (temp != 0)
-            synchronous = true;
-    }
-
-    if (forceCpu)
-        printf("forcing CPU\n");
-
-    if (synchronous)
-        printf("forcing synchronous\n");
-
-    printf("numElems = %d\n", numElems);
-
-    sp<RS> rs = new RS();
-
-    uint32_t flags = 0;
-    if (forceCpu) flags |= RS_INIT_LOW_LATENCY;
-    if (synchronous) flags |= RS_INIT_SYNCHRONOUS;
-
-    bool r = rs->init("/system/bin", flags);
-
-    sp<const Element> e = Element::U32(rs);
-
-    Type::Builder tb(rs, e);
-    tb.setX(numElems);
-    sp<const Type> t = tb.create();
-
-    uint32_t *buf = new uint32_t[numElems];
-
-    sp<Allocation> ain = Allocation::createTyped(rs, t);
-    sp<Allocation> aout = Allocation::createTyped(rs, t);
-
-    sp<ScriptC_latency> sc = new ScriptC_latency(rs);
-
-    struct timeval start, stop;
-
-    gettimeofday(&start, NULL);
-
-    for (int i = 0; i < iters; i++) {
-        sc->forEach_root(ain, aout);
-    }
-
-    rs->finish();
-
-    gettimeofday(&stop, NULL);
-
-    long long elapsed = (stop.tv_sec * 1000000) - (start.tv_sec * 1000000) + (stop.tv_usec - start.tv_usec);
-    printf("elapsed time : %lld microseconds\n", elapsed);
-    printf("time per iter: %f microseconds\n", (double)elapsed / iters);
-
-    gettimeofday(&start, NULL);
-
-    for (int i = 0; i < iters; i++) {
-        ain->copy1DFrom(buf);
-        sc->forEach_root(ain, aout);
-        aout->copy1DTo(buf);
-    }
-
-    rs->finish();
-
-    gettimeofday(&stop, NULL);
-    elapsed = (stop.tv_sec * 1000000) - (start.tv_sec * 1000000) + (stop.tv_usec - start.tv_usec);
-    printf("elapsed time with copy : %lld microseconds\n", elapsed);
-    printf("time per iter with copy: %f microseconds\n", (double)elapsed / iters);
-
-    sc.clear();
-    t.clear();
-    e.clear();
-    ain.clear();
-    aout.clear();
-}
diff --git a/tests/rs/typecheck/jni/Android.mk b/tests/rs/typecheck/jni/Android.mk
deleted file mode 100644
index 68b9f04..0000000
--- a/tests/rs/typecheck/jni/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-	kernels.rs \
-	typecheck.cpp
-
-LOCAL_LDFLAGS += -L$(call host-path,$(TARGET_C_INCLUDES)/../lib/rs)
-LOCAL_LDLIBS := -llog -ldl -lRScpp_static
-
-LOCAL_MODULE:= rstest-typecheck
-
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs/cpp
-LOCAL_C_INCLUDES += $(TARGET_C_INCLUDES)/rs
-LOCAL_C_INCLUDES += $(TARGET_OBJS)/$(LOCAL_MODULE)
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/tests/rs/typecheck/jni/Application.mk b/tests/rs/typecheck/jni/Application.mk
deleted file mode 100644
index adf5697..0000000
--- a/tests/rs/typecheck/jni/Application.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-APP_ABI := armeabi-v7a x86 #mips
-APP_PLATFORM := android-19
-APP_STL := stlport_static
diff --git a/tests/rs/typecheck/jni/kernels.rs b/tests/rs/typecheck/jni/kernels.rs
deleted file mode 100644
index 5bf3499..0000000
--- a/tests/rs/typecheck/jni/kernels.rs
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma version(1)
-#pragma rs java_package_name(com.android.rs.typecheck)
-#pragma rs_fp_relaxed
-
-// Test initialized and uninitialized variables
-char c1;
-char c1i = 1;
-char2 c2;
-char2 c2i = {1, 2};
-char3 c3;
-char3 c3i = {1, 2, 3};
-char4 c4;
-char4 c4i = {1, 2, 3, 4};
-
-uchar uc1;
-uchar uc1i = 1;
-uchar2 uc2;
-uchar2 uc2i = {1, 2};
-uchar3 uc3;
-uchar3 uc3i = {1, 2, 3};
-uchar4 uc4;
-uchar4 uc4i = {1, 2, 3, 4};
-
-short s1;
-short s1i = 1;
-short2 s2;
-short2 s2i = {1, 2};
-short3 s3;
-short3 s3i = {1, 2, 3};
-short4 s4;
-short4 s4i = {1, 2, 3, 4};
-
-ushort us1;
-ushort us1i = 1;
-ushort2 us2;
-ushort2 us2i = {1, 2};
-ushort3 us3;
-ushort3 us3i = {1, 2, 3};
-ushort4 us4;
-ushort4 us4i = {1, 2, 3, 4};
-
-int i1;
-int i1i = 1;
-int2 i2;
-int2 i2i = {1, 2};
-int3 i3;
-int3 i3i = {1, 2, 3};
-int4 i4;
-int4 i4i = {1, 2, 3, 4};
-
-uint ui1;
-uint ui1i = 1;
-uint2 ui2;
-uint2 ui2i = {1, 2};
-uint3 ui3;
-uint3 ui3i = {1, 2, 3};
-uint4 ui4;
-uint4 ui4i = {1, 2, 3, 4};
-
-long l1;
-long l1i = 1;
-long2 l2;
-long2 l2i = {1, 2};
-long3 l3;
-long3 l3i = {1, 2, 3};
-long4 l4;
-long4 l4i = {1, 2, 3, 4};
-
-ulong ul1;
-ulong ul1i = 1;
-ulong2 ul2;
-ulong2 ul2i = {1, 2};
-ulong3 ul3;
-ulong3 ul3i = {1, 2, 3};
-ulong4 ul4;
-ulong4 ul4i = {1, 2, 3, 4};
-
-float f1;
-float f1i = 3.141592265358979f;
-float2 f2;
-float2 f2i = {1.f, 2.f};
-float3 f3;
-float3 f3i = {1.f, 2.f, 3.f};
-float4 f4;
-float4 f4i = {1.f, 2.f, 3.f, 4.f};
-
-double d1;
-double d1i = 3.141592265358979;
-double2 d2;
-double2 d2i = {1, 2};
-double3 d3;
-double3 d3i = {1, 2, 3};
-double4 d4;
-double4 d4i = {1, 2, 3, 4};
-
-
-void __attribute__((kernel)) test_BOOLEAN(bool in) {
-}
-
-void __attribute__((kernel)) test_I8(char in) {
-}
-
-void __attribute__((kernel)) test_U8(uchar in) {
-}
-
-void __attribute__((kernel)) test_I16(short in) {
-}
-
-void __attribute__((kernel)) test_U16(ushort in) {
-}
-
-void __attribute__((kernel)) test_I32(int in) {
-}
-
-void __attribute__((kernel)) test_U32(uint in) {
-}
-
-void __attribute__((kernel)) test_I64(long in) {
-}
-
-void __attribute__((kernel)) test_U64(ulong in) {
-}
-
-void __attribute__((kernel)) test_F32(float in) {
-}
-
-void __attribute__((kernel)) test_F64(double in) {
-}
-
diff --git a/tests/rs/typecheck/jni/typecheck.cpp b/tests/rs/typecheck/jni/typecheck.cpp
deleted file mode 100644
index 76ae16f..0000000
--- a/tests/rs/typecheck/jni/typecheck.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "RenderScript.h"
-#include "ScriptC_kernels.h"
-
-using namespace android;
-using namespace RSC;
-
-const static uint32_t x = 7;
-
-sp<Allocation> createAlloc(sp<RS> rs, sp<const Element> e) {
-    Type::Builder tb(rs, e);
-    tb.setX(x);
-    sp<const Type> t = tb.create();
-    return Allocation::createTyped(rs, t);
-}
-
-#define TEST_ELEM(KERNELNAME, ENAME) \
-bool test_elem_##KERNELNAME##_##ENAME() { \
-    printf("Verifying forEach_test_" #KERNELNAME "() with " #ENAME "\n"); \
-    sp<RS> rs = new RS(); \
-    bool r = rs->init("/system/bin"); \
-    sp<Allocation> a = createAlloc(rs, Element::ENAME(rs)); \
-    ScriptC_kernels sc(rs); \
-    sc.forEach_test_##KERNELNAME(a); \
-    rs->finish(); \
-    bool shouldPass = !strcmp(#KERNELNAME, #ENAME); \
-    if (shouldPass != (rs->getError() == RS_SUCCESS)) { \
-        printf("Failed forEach_test_" #KERNELNAME "() with " #ENAME "\n"); \
-        return true; \
-    } \
-    return false; \
-}
-
-#define TEST_ELEM_ALL(ENAME) \
-TEST_ELEM(ENAME, BOOLEAN) \
-TEST_ELEM(ENAME, I8) \
-TEST_ELEM(ENAME, U8) \
-TEST_ELEM(ENAME, I16) \
-TEST_ELEM(ENAME, U16) \
-TEST_ELEM(ENAME, I32) \
-TEST_ELEM(ENAME, U32) \
-TEST_ELEM(ENAME, I64) \
-TEST_ELEM(ENAME, U64) \
-TEST_ELEM(ENAME, F32) \
-TEST_ELEM(ENAME, F64)
-
-TEST_ELEM_ALL(BOOLEAN)
-TEST_ELEM_ALL(I8)
-TEST_ELEM_ALL(U8)
-TEST_ELEM_ALL(I16)
-TEST_ELEM_ALL(U16)
-TEST_ELEM_ALL(I32)
-TEST_ELEM_ALL(U32)
-TEST_ELEM_ALL(I64)
-TEST_ELEM_ALL(U64)
-TEST_ELEM_ALL(F32)
-TEST_ELEM_ALL(F64)
-
-int main()
-{
-    bool failed = false;
-
-#define EXECUTE_TEST_ELEM_ALL(ENAME) \
-    failed |= test_elem_##ENAME##_BOOLEAN(); \
-    failed |= test_elem_##ENAME##_I8(); \
-    failed |= test_elem_##ENAME##_U8(); \
-    failed |= test_elem_##ENAME##_I16(); \
-    failed |= test_elem_##ENAME##_U16(); \
-    failed |= test_elem_##ENAME##_I32(); \
-    failed |= test_elem_##ENAME##_U32(); \
-    failed |= test_elem_##ENAME##_I64(); \
-    failed |= test_elem_##ENAME##_U64(); \
-    failed |= test_elem_##ENAME##_F32(); \
-    failed |= test_elem_##ENAME##_F64(); \
-
-    EXECUTE_TEST_ELEM_ALL(BOOLEAN);
-    EXECUTE_TEST_ELEM_ALL(I8);
-    EXECUTE_TEST_ELEM_ALL(U8);
-    EXECUTE_TEST_ELEM_ALL(I16);
-    EXECUTE_TEST_ELEM_ALL(U16);
-    EXECUTE_TEST_ELEM_ALL(I32);
-    EXECUTE_TEST_ELEM_ALL(U32);
-    EXECUTE_TEST_ELEM_ALL(I64);
-    EXECUTE_TEST_ELEM_ALL(U64);
-    EXECUTE_TEST_ELEM_ALL(F32);
-    EXECUTE_TEST_ELEM_ALL(F64);
-
-    if (failed) {
-        printf("TEST FAILED!\n");
-    } else {
-        printf("TEST PASSED!\n");
-    }
-
-    return failed;
-}
diff --git a/tests/run-tests-all.sh b/tests/run-tests-all.sh
index 0b43144..ab82ecc 100755
--- a/tests/run-tests-all.sh
+++ b/tests/run-tests-all.sh
@@ -179,7 +179,7 @@
 }
 
 API32=14
-API64=20
+API64=L
 for ARCH in $(commas_to_spaces $DEFAULT_ARCHS); do
     if [ "$ARCH" = "${ARCH%%64*}" ]; then
         API=$API32
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index afa8009..7cbbc60 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -36,7 +36,10 @@
 # directoy and tested separately from armeabi-v7a.  Some tests are now compiled with both
 # APP_ABI=armeabi-v7a and APP_ABI=armeabi-v7a-hard. Without _NDK_TESTING_ALL_=yes, tests
 # may fail to install due to race condition on the same libs/armeabi-v7a
-export _NDK_TESTING_ALL_=yes
+if [ -z "$_NDK_TESTING_ALL_" ]; then
+   _NDK_TESTING_ALL_=all
+fi
+export _NDK_TESTING_ALL_
 
 # The list of tests that are too long to be part of a normal run of
 # run-tests.sh. Most of these do not run properly at the moment.
@@ -61,6 +64,12 @@
 NDK_PACKAGE=
 WINE=
 CONTINUE_ON_BUILD_FAIL=
+if [ -z "$TEST_DIR" ]; then
+    TEST_DIR="/tmp/ndk-$USER/tests"
+fi
+if [ -z "$TARGET_TEST_SUBDIR" ]; then
+    TARGET_TEST_SUBDIR="ndk-tests"
+fi
 
 while [ -n "$1" ]; do
     opt="$1"
@@ -81,6 +90,9 @@
             ;;
         --platform=*)
             PLATFORM="$optarg"
+	    ;;
+        --test-dir=*)
+            TEST_DIR="$optarg"
             ;;
         --ndk=*)
             NDK_ROOT="$optarg"
@@ -271,7 +283,6 @@
 fi # !FULL_TESTS
 
 
-TEST_DIR="/tmp/ndk-$USER/tests"
 mkdir -p $TEST_DIR
 setup_default_log_file "$TEST_DIR/build-tests.log"
 
@@ -774,7 +785,7 @@
         local TEST=$3
         local TEST_NAME="$(basename $TEST)"
         local SRCDIR
-        local DSTDIR="$4/ndk-tests"
+        local DSTDIR="$4/$TARGET_TEST_SUBDIR"
         local SRCFILE
         local DSTFILE
         local PROGRAM
diff --git a/toolchains/aarch64-linux-android-4.9/setup.mk b/toolchains/aarch64-linux-android-4.9/setup.mk
index 90089c3..0c5f29a 100644
--- a/toolchains/aarch64-linux-android-4.9/setup.mk
+++ b/toolchains/aarch64-linux-android-4.9/setup.mk
@@ -58,5 +58,5 @@
 TARGET-process-src-files-tags = \
 $(eval __debug_sources := $(call get-src-files-with-tag,debug)) \
 $(eval __release_sources := $(call get-src-files-without-tag,debug)) \
-$(call set-src-files-target-cflags, $(__debug_sources), $(TARGET_x86_64_debug_CFLAGS)) \
-$(call set-src-files-target-cflags, $(__release_sources),$(TARGET_x86_64_release_CFLAGS)) \
+$(call set-src-files-target-cflags, $(__debug_sources), $(TARGET_arm64_debug_CFLAGS)) \
+$(call set-src-files-target-cflags, $(__release_sources),$(TARGET_arm64_release_CFLAGS)) \
diff --git a/toolchains/mips64el-linux-android-clang3.4/setup.mk b/toolchains/mips64el-linux-android-clang3.4/setup.mk
index f0d3e6c..4e4b07b 100644
--- a/toolchains/mips64el-linux-android-clang3.4/setup.mk
+++ b/toolchains/mips64el-linux-android-clang3.4/setup.mk
@@ -34,7 +34,7 @@
 LLVM_TOOLCHAIN_PREFIX := $(LLVM_TOOLCHAIN_PREBUILT_ROOT)/bin/
 
 TOOLCHAIN_VERSION := 4.9
-TOOLCHAIN_NAME := mip64sel-linux-android-$(TOOLCHAIN_VERSION)
+TOOLCHAIN_NAME := mips64el-linux-android-$(TOOLCHAIN_VERSION)
 TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(TOOLCHAIN_NAME)
 TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(TOOLCHAIN_ROOT))
 TOOLCHAIN_PREFIX := $(TOOLCHAIN_PREBUILT_ROOT)/bin/mips64el-linux-android-