Revert "Use proprety_socket_for_system if permissions allow" am: 78973da8ef am: 30537bd10a

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/24028889

Change-Id: Ie7d4ff74ebd72e5388016f4e897a7b88152302d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/README.md b/README.md
index 8d8e583..113ffd7 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,9 @@
 #### tests/ --- unit tests
 
 The `tests/` directory contains unit tests. Roughly arranged as one file per
-publicly-exported header file.
+publicly-exported header file. `tests/headers/` contains compile-only tests
+that just check that things are _in_ the headers, whereas the "real" tests
+check actual _behavior_.
 
 #### benchmarks/ --- benchmarks
 
@@ -132,9 +134,9 @@
   tzcode/
     # A modified superset of the IANA tzcode. Most of the modifications relate
     # to Android's use of a single file (with corresponding index) to contain
-    # time zone data.
+    # timezone data.
   zoneinfo/
-    # Android-format time zone data.
+    # Android-format timezone data.
     # See 'Updating tzdata' later.
 ```
 
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
index 17d2d68..f31e127 100644
--- a/benchmarks/Android.bp
+++ b/benchmarks/Android.bp
@@ -154,7 +154,13 @@
         "libbase",
         "libBionicBenchmarksUtils",
     ],
-    data: ["test_suites/*"],
+    data: [
+        "test_suites/*",
+        "suites/*",
+        ":bionic-benchmarks",
+    ],
+    test_suites: ["device-tests"],
+    require_root: true,
 }
 
 cc_binary {
diff --git a/benchmarks/TEST_MAPPING b/benchmarks/TEST_MAPPING
new file mode 100644
index 0000000..1864b2b
--- /dev/null
+++ b/benchmarks/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+  "presubmit": [
+    {
+      "name": "bionic-benchmarks-tests"
+    }
+  ]
+}
diff --git a/benchmarks/bionic_benchmarks.cpp b/benchmarks/bionic_benchmarks.cpp
index 187ee76..74966c0 100644
--- a/benchmarks/bionic_benchmarks.cpp
+++ b/benchmarks/bionic_benchmarks.cpp
@@ -336,16 +336,36 @@
     return to_populate;
   }
 
-  to_populate->push_back(std::vector<int64_t>());
-  std::stringstream sstream(args);
-  std::string argstr;
-  while (sstream >> argstr) {
-    char* check_null;
-    int converted = static_cast<int>(strtol(argstr.c_str(), &check_null, 10));
-    if (*check_null) {
-      errx(1, "ERROR: Args str %s contains an invalid macro or int.", args.c_str());
+  std::string trimmed_args = android::base::Trim(args);
+  if (!trimmed_args.empty()) {
+    std::stringstream sstream(trimmed_args);
+    std::string argstr;
+    while (sstream >> argstr) {
+      char* check_null;
+      int converted = static_cast<int>(strtol(argstr.c_str(), &check_null, 10));
+      if (*check_null == '\0') {
+        to_populate->emplace_back(std::vector<int64_t>{converted});
+        continue;
+      } else if (*check_null == '/') {
+        // The only supported format with a / is \d+(/\d+)\s*. Example 8/8/8 or 16/23.
+        std::vector<int64_t> test_args{converted};
+        while (true) {
+          converted = static_cast<int>(strtol(check_null + 1, &check_null, 10));
+          test_args.push_back(converted);
+          if (*check_null == '\0') {
+            to_populate->emplace_back(std::move(test_args));
+            break;
+          } else if (*check_null != '/') {
+            errx(1, "ERROR: Args str %s contains an invalid macro or int.", args.c_str());
+          }
+        }
+      } else {
+        errx(1, "ERROR: Args str %s contains an invalid macro or int.", args.c_str());
+      }
     }
-    (*to_populate)[0].push_back(converted);
+  } else {
+    // No arguments, only the base benchmark.
+    to_populate->emplace_back(std::vector<int64_t>{});
   }
   return to_populate;
 }
diff --git a/benchmarks/linker_relocation/gen/Android.bp b/benchmarks/linker_relocation/gen/Android.bp
index c8f0b4a..d07ebf7 100644
--- a/benchmarks/linker_relocation/gen/Android.bp
+++ b/benchmarks/linker_relocation/gen/Android.bp
@@ -1,8 +1,5 @@
 // AUTO-GENERATED BY gen_bench.py -- do not edit
-package {
-    default_applicable_licenses: ["bionic_benchmarks_license"],
-}
-
+package { default_applicable_licenses: ["bionic_benchmarks_license"], }
 cc_defaults {
     name: "linker_reloc_bench_all_libs",
     runtime_libs: [
diff --git a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_000.S b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_000.S
index c0ad782..f04726f 100644
--- a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_000.S
+++ b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_000.S
@@ -7572,7 +7572,6 @@
 CALL(b_wavGuebjRkprcgvbaSzg)
 CALL(b__MAX7naqebvq9MvcSvyrEB12trgRagelVasbRCiCgCwF3_CyF3_F3_)
 CALL(mktime)
-CALL(lstat64)
 CALL(b_pep32)
 CALL(read)
 CALL(close)
@@ -9757,7 +9756,6 @@
 .weak b__MAFg3__16__gerrVAF_12__inyhr_glcrVAF_12onfvp_fgevatVpAF_11pune_genvgfVpRRAF_9nyybpngbeVpRRRRAF_10funerq_cgeVA7zvavxva14SbagPbyyrpgvbaRRRRRAF_19__znc_inyhr_pbzcnerVF7_FP_AF_4yrffVF7_RRYo1RRRAF5_VFP_RRR12__svaq_rdhnyVF7_RRECAF_16__gerr_abqr_onfrVCiRRECAF_15__gerr_raq_abqrVFA_RREXG_
 CALL(b__MAFg3__16__gerrVAF_12__inyhr_glcrVAF_12onfvp_fgevatVpAF_11pune_genvgfVpRRAF_9nyybpngbeVpRRRRAF_10funerq_cgeVA7zvavxva14SbagPbyyrpgvbaRRRRRAF_19__znc_inyhr_pbzcnerVF7_FP_AF_4yrffVF7_RRYo1RRRAF5_VFP_RRR12__svaq_rdhnyVF7_RRECAF_16__gerr_abqr_onfrVCiRRECAF_15__gerr_raq_abqrVFA_RREXG_)
 CALL(b__MA6FxQngn17ZnxrHavavgvnyvmrqRz)
-CALL(lseek64)
 CALL(longjmp)
 CALL(b__MA22fxwcrt_qrfgvangvba_zteP1RC9FxJFgernz)
 CALL(b_wcrt_fgq_reebe)
diff --git a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_001.S b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_001.S
index c2d5ef2..61b9a55 100644
--- a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_001.S
+++ b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_001.S
@@ -3798,7 +3798,6 @@
 CALL(b__MA7naqebvq4onfr10YbtZrffntrQ1Ri)
 CALL(b__MA7naqebvq9NcxNffrgf19PerngrNffrgSebzSvyrREXAFg3__112onfvp_fgevatVpAF1_11pune_genvgfVpRRAF1_9nyybpngbeVpRRRR)
 CALL(b__MA7naqebvq11YbnqrqVqznc4YbnqREXAF_16OnfvpFgevatCvrprVpRR)
-CALL(lseek64)
 CALL(b__MA7naqebvq7SvyrZncP1Ri)
 CALL(b__MA7naqebvq7SvyrZnc6perngrRCXpvyzo)
 CALL(b__MA7naqebvq5Nffrg25perngrSebzHapbzcerffrqZncRAFg3__110havdhr_cgeVAF_7SvyrZncRAF1_14qrsnhyg_qryrgrVF3_RRRRAF0_10NpprffZbqrR)
@@ -4301,7 +4300,6 @@
 CALL(b_pep32)
 CALL(b__MA7naqebvq16OnpxhcQngnJevgre17JevgrRagvglUrnqreREXAF_7Fgevat8Rz)
 CALL(b__MA7naqebvq16OnpxhcQngnJevgre15JevgrRagvglQngnRCXiz)
-CALL(lstat64)
 CALL(b__MA7naqebvq16OnpxhcQngnErnqre16ErnqRagvglUrnqreRCAF_7Fgevat8RCz)
 CALL(b__MA7naqebvq16OnpxhcQngnErnqre14ErnqRagvglQngnRCiz)
 CALL(open)
diff --git a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_070.S b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_070.S
index 7a8310d..ddfc3d4 100644
--- a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_070.S
+++ b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_070.S
@@ -2299,16 +2299,14 @@
 DATA_WORD(local_label)
 .space (__SIZEOF_POINTER__ * 2)
 DATA_WORD(local_label)
-DATA_WORD(pread64)
-.space (__SIZEOF_POINTER__ * 1)
+.space (__SIZEOF_POINTER__ * 2)
 DATA_WORD(local_label)
 DATA_WORD(write)
 .space (__SIZEOF_POINTER__ * 1)
 DATA_WORD(local_label)
 .space (__SIZEOF_POINTER__ * 2)
 DATA_WORD(local_label)
-DATA_WORD(pwrite64)
-.space (__SIZEOF_POINTER__ * 1)
+.space (__SIZEOF_POINTER__ * 2)
 DATA_WORD(local_label)
 DATA_WORD(fchmod)
 .space (__SIZEOF_POINTER__ * 1)
diff --git a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_074.S b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_074.S
index 340a9cf..471bed0 100644
--- a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_074.S
+++ b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_074.S
@@ -460,7 +460,6 @@
 CALL(__stack_chk_fail)
 CALL(open)
 CALL(strerror)
-CALL(lseek64)
 CALL(b__MA10MvcNepuvirQ2Ri)
 CALL(memcpy)
 CALL(b__MAXFg3__121__onfvp_fgevat_pbzzbaVYo1RR20__guebj_yratgu_reebeRi)
diff --git a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_081.S b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_081.S
index 410c57a..ac7bd42 100644
--- a/benchmarks/linker_relocation/gen/liblinker_reloc_bench_081.S
+++ b/benchmarks/linker_relocation/gen/liblinker_reloc_bench_081.S
@@ -272,11 +272,9 @@
 CALL(b__MA7naqebvq4onfr10YbtZrffntrQ1Ri)
 CALL(__stack_chk_fail)
 CALL(b__MA7naqebvq7zrzvasb8CntrNppg12VavgCntrNppgRo)
-CALL(pread64)
 CALL(b__MAFg3__113onfvp_bfgernzVpAF_11pune_genvgfVpRRRyfRz)
 CALL(b__MAX7naqebvq7zrzvasb8CntrNppg12ZnexCntrVqyrRz)
 CALL(b__MAX7naqebvq7zrzvasb8CntrNppg11TrgCntrVqyrRz)
-CALL(pwrite64)
 CALL(b__MAFg3__113onfvp_bfgernzVpAF_11pune_genvgfVpRRR6fragelP1REF3_)
 CALL(b__MAXFg3__18vbf_onfr6trgybpRi)
 CALL(b__MAXFg3__16ybpnyr9hfr_snprgREAF0_2vqR)
diff --git a/benchmarks/linker_relocation/regen/gen_bench.py b/benchmarks/linker_relocation/regen/gen_bench.py
index 6533189..d34a9a9 100755
--- a/benchmarks/linker_relocation/regen/gen_bench.py
+++ b/benchmarks/linker_relocation/regen/gen_bench.py
@@ -115,9 +115,13 @@
     'getprogname',
     'gettid',
     'isnanf',
+    'lseek64',
+    'lstat64',
     'mallinfo',
     'malloc_info',
+    'pread64',
     'pthread_gettid_np',
+    'pwrite64',
     'res_mkquery',
     'strlcpy',
     'strtoll_l',
diff --git a/benchmarks/malloc_benchmark.cpp b/benchmarks/malloc_benchmark.cpp
index e733cd0..258343f 100644
--- a/benchmarks/malloc_benchmark.cpp
+++ b/benchmarks/malloc_benchmark.cpp
@@ -29,6 +29,10 @@
 #include <malloc.h>
 #include <unistd.h>
 
+#include <condition_variable>
+#include <mutex>
+#include <random>
+#include <thread>
 #include <vector>
 
 #include <benchmark/benchmark.h>
@@ -68,6 +72,89 @@
   mallopt(M_DECAY_TIME, 0);
 }
 
+static void RunThreadsThroughput(benchmark::State& state, size_t size, size_t num_threads) {
+  constexpr size_t kMaxBytes = 1 << 24;
+  constexpr size_t kMaxThreads = 8;
+  constexpr size_t kMinRounds = 4;
+  const size_t MaxAllocCounts = kMaxBytes / size;
+  std::mutex m;
+  bool ready = false;
+  std::condition_variable cv;
+  std::thread* threads[kMaxThreads];
+
+  // The goal is to create malloc/free interleaving patterns across threads.
+  // The bytes processed by each thread will be the same. The difference is the
+  // patterns. Here's an example:
+  //
+  // A: Allocation
+  // D: Deallocation
+  //
+  //   T1    T2    T3
+  //   A     A     A
+  //   A     A     D
+  //   A     D     A
+  //   A     D     D
+  //   D     A     A
+  //   D     A     D
+  //   D     D     A
+  //   D     D     D
+  //
+  // To do this, `AllocCounts` and `AllocRounds` will be adjusted according to the
+  // thread id.
+  auto thread_task = [&](size_t id) {
+    {
+      std::unique_lock lock(m);
+      // Wait until all threads are created.
+      cv.wait(lock, [&] { return ready; });
+    }
+
+    void** MemPool;
+    const size_t AllocCounts = (MaxAllocCounts >> id);
+    const size_t AllocRounds = (kMinRounds << id);
+    MemPool = new void*[AllocCounts];
+
+    for (size_t i = 0; i < AllocRounds; ++i) {
+      for (size_t j = 0; j < AllocCounts; ++j) {
+        void* ptr = malloc(size);
+        MemPool[j] = ptr;
+      }
+
+      // Use a fix seed to reduce the noise of different round of benchmark.
+      const unsigned seed = 33529;
+      std::shuffle(MemPool, &MemPool[AllocCounts], std::default_random_engine(seed));
+
+      for (size_t j = 0; j < AllocCounts; ++j) free(MemPool[j]);
+    }
+
+    delete[] MemPool;
+  };
+
+  for (auto _ : state) {
+    state.PauseTiming();
+    // Don't need to acquire the lock because no thread is created.
+    ready = false;
+
+    for (size_t i = 0; i < num_threads; ++i) threads[i] = new std::thread(thread_task, i);
+
+    state.ResumeTiming();
+
+    {
+      std::unique_lock lock(m);
+      ready = true;
+    }
+
+    cv.notify_all();
+
+    for (size_t i = 0; i < num_threads; ++i) {
+      threads[i]->join();
+      delete threads[i];
+    }
+  }
+
+  const size_t ThreadsBytesProcessed = kMaxBytes * kMinRounds * num_threads;
+  state.SetBytesProcessed(ThreadsBytesProcessed * static_cast<size_t>(state.iterations()));
+}
+
 static void BM_mallopt_purge(benchmark::State& state) {
   RunMalloptPurge(state, M_PURGE);
 }
@@ -78,4 +165,23 @@
 }
 BIONIC_BENCHMARK(BM_mallopt_purge_all);
 
+// Note that this will only test a single size class at a time so that we can
+// observe the impact of contention more often.
+#define BM_MALLOC_THREADS_THROUGHPUT(SIZE, NUM_THREADS)                                      \
+  static void BM_malloc_threads_throughput_##SIZE##_##NUM_THREADS(benchmark::State& state) { \
+    RunThreadsThroughput(state, SIZE, NUM_THREADS);                                          \
+  }                                                                                          \
+  BIONIC_BENCHMARK(BM_malloc_threads_throughput_##SIZE##_##NUM_THREADS);
+
+// There are three block categories in Scudo, we choose 1 from each category.
+BM_MALLOC_THREADS_THROUGHPUT(64, 2);
+BM_MALLOC_THREADS_THROUGHPUT(64, 4);
+BM_MALLOC_THREADS_THROUGHPUT(64, 8);
+BM_MALLOC_THREADS_THROUGHPUT(512, 2);
+BM_MALLOC_THREADS_THROUGHPUT(512, 4);
+BM_MALLOC_THREADS_THROUGHPUT(512, 8);
+BM_MALLOC_THREADS_THROUGHPUT(8192, 2);
+BM_MALLOC_THREADS_THROUGHPUT(8192, 4);
+BM_MALLOC_THREADS_THROUGHPUT(8192, 8);
+
 #endif
diff --git a/benchmarks/test_suites/test_from_each.xml b/benchmarks/test_suites/test_from_each.xml
index bad18e7..51c14b6 100644
--- a/benchmarks/test_suites/test_from_each.xml
+++ b/benchmarks/test_suites/test_from_each.xml
@@ -20,7 +20,7 @@
 </fn>
 <fn>
   <name>BM_string_memcpy</name>
-  <args>512 4 4</args>
+  <args>512/4/4</args>
 </fn>
 <fn>
   <name>BM_time_clock_gettime</name>
diff --git a/benchmarks/test_suites/test_medium.xml b/benchmarks/test_suites/test_medium.xml
index 9528af3..0d29a99 100644
--- a/benchmarks/test_suites/test_medium.xml
+++ b/benchmarks/test_suites/test_medium.xml
@@ -8,7 +8,7 @@
 <fn>
   <name>BM_string_memcpy</name>
   <iterations>25</iterations>
-  <args>512 4 4</args>
+  <args>512/4/4</args>
 </fn>
 <fn>
   <name>BM_property_get</name>
diff --git a/benchmarks/test_suites/test_small.xml b/benchmarks/test_suites/test_small.xml
index a4cc285..66d3732 100644
--- a/benchmarks/test_suites/test_small.xml
+++ b/benchmarks/test_suites/test_small.xml
@@ -1,11 +1,11 @@
 <fn>
   <name>BM_string_memcmp</name>
-  <args>8 8 8</args>
+  <args>8/8/8</args>
 </fn>
 <fn>
   <name>BM_math_sqrt</name>
 </fn>
 <fn>
   <name>BM_property_get</name>
-  <args>1</args>
+  <args>1 2 3</args>
 </fn>
diff --git a/benchmarks/tests/interface_test.cpp b/benchmarks/tests/interface_test.cpp
index 301c294..1d620d1 100644
--- a/benchmarks/tests/interface_test.cpp
+++ b/benchmarks/tests/interface_test.cpp
@@ -49,12 +49,8 @@
   int fd_;
 };
 
-static const char* GetBenchmarkExe() {
-#if defined(__LP64__)
-  return "/data/benchmarktest64/bionic-benchmarks/bionic-benchmarks";
-#else
-  return "/data/benchmarktest/bionic-benchmarks/bionic-benchmarks";
-#endif
+static std::string GetBenchmarkExe() {
+  return android::base::GetExecutableDirectory() + "/bionic-benchmarks";
 }
 
 static std::string GetBionicXmlArg(const char* xml_file) {
@@ -90,7 +86,8 @@
     ASSERT_NE(0, dup2(fds[1], STDERR_FILENO));
     close(fds[1]);
 
-    args.insert(args.begin(), GetBenchmarkExe());
+    const std::string exe(GetBenchmarkExe());
+    args.insert(args.begin(), exe.c_str());
     args.push_back(nullptr);
     execv(args[0], reinterpret_cast<char* const*>(const_cast<char**>(args.data())));
     exit(1);
@@ -145,10 +142,10 @@
 
 TEST_F(SystemTests, check_benchmark_exe) {
   // Verify that the benchmark exe is present.
-  const char* exe = GetBenchmarkExe();
+  const std::string exe(GetBenchmarkExe());
 
   struct stat st;
-  ASSERT_NE(-1, stat(exe, &st)) << "Stat of " << exe << " failed";
+  ASSERT_NE(-1, stat(exe.c_str(), &st)) << "Stat of " << exe << " failed";
   ASSERT_TRUE(S_ISREG(st.st_mode)) << exe << " is not a file, or doesn't exist.";
 }
 
@@ -195,27 +192,31 @@
 
 TEST_F(SystemTests, small) {
   std::string expected =
-    "BM_string_memcmp/8/8/8/iterations:1\n"
-    "BM_math_sqrt/iterations:1\n"
-    "BM_property_get/1/iterations:1\n";
+      "BM_string_memcmp/8/8/8/iterations:1\n"
+      "BM_math_sqrt/iterations:1\n"
+      "BM_property_get/1/iterations:1\n"
+      "BM_property_get/2/iterations:1\n"
+      "BM_property_get/3/iterations:1\n";
   Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_small.xml").c_str(),
                                                "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, medium) {
   std::string expected =
-    "BM_string_memcmp/8/0/0/iterations:1\n"
-    "BM_string_memcmp/64/0/0/iterations:1\n"
-    "BM_string_memcmp/512/0/0/iterations:1\n"
-    "BM_string_memcmp/1024/0/0/iterations:1\n"
-    "BM_string_memcmp/8192/0/0/iterations:1\n"
-    "BM_string_memcmp/16384/0/0/iterations:1\n"
-    "BM_string_memcmp/32768/0/0/iterations:1\n"
-    "BM_string_memcmp/65536/0/0/iterations:1\n"
-    "BM_string_memcmp/131072/0/0/iterations:1\n"
-    "BM_math_sqrt/iterations:1\n"
-    "BM_string_memcpy/512/4/4/iterations:25\n"
-    "BM_property_get/1/iterations:1\n";
+      "BM_string_memcmp/8/0/0/iterations:1\n"
+      "BM_string_memcmp/16/0/0/iterations:1\n"
+      "BM_string_memcmp/32/0/0/iterations:1\n"
+      "BM_string_memcmp/64/0/0/iterations:1\n"
+      "BM_string_memcmp/512/0/0/iterations:1\n"
+      "BM_string_memcmp/1024/0/0/iterations:1\n"
+      "BM_string_memcmp/8192/0/0/iterations:1\n"
+      "BM_string_memcmp/16384/0/0/iterations:1\n"
+      "BM_string_memcmp/32768/0/0/iterations:1\n"
+      "BM_string_memcmp/65536/0/0/iterations:1\n"
+      "BM_string_memcmp/131072/0/0/iterations:1\n"
+      "BM_math_sqrt/iterations:1\n"
+      "BM_string_memcpy/512/4/4/iterations:25\n"
+      "BM_property_get/1/iterations:1\n";
   Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_medium.xml").c_str(),
                                                "--bionic_iterations=1"});
 }
@@ -239,43 +240,48 @@
   std::string expected =
     "BM_string_memcpy/8/8/8/iterations:1\n"
     "BM_math_log10/iterations:1\n";
-  Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8 8 8",
-                                               "--bionic_extra=BM_math_log10",
-                                               "--bionic_iterations=1"});
+  Verify(expected, 0,
+         std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8/8/8",
+                                  "--bionic_extra=BM_math_log10", "--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, cmd_args_no_iter) {
   std::string expected =
     "BM_string_memcpy/8/8/8\n"
     "BM_math_log10\n";
-  Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8 8 8",
-                                               "--bionic_extra=BM_math_log10"});
+  Verify(expected, 0,
+         std::vector<const char*>{"--bionic_extra=BM_string_memcpy 8/8/8",
+                                  "--bionic_extra=BM_math_log10"});
 }
 
 TEST_F(SystemTests, xml_and_args) {
   std::string expected =
-    "BM_string_memcmp/8/0/0/iterations:1\n"
-    "BM_string_memcmp/64/0/0/iterations:1\n"
-    "BM_string_memcmp/512/0/0/iterations:1\n"
-    "BM_string_memcmp/1024/0/0/iterations:1\n"
-    "BM_string_memcmp/8192/0/0/iterations:1\n"
-    "BM_string_memcmp/16384/0/0/iterations:1\n"
-    "BM_string_memcmp/32768/0/0/iterations:1\n"
-    "BM_string_memcmp/65536/0/0/iterations:1\n"
-    "BM_string_memcmp/131072/0/0/iterations:1\n"
-    "BM_math_sqrt/iterations:1\n"
-    "BM_string_memcpy/512/4/4/iterations:25\n"
-    "BM_property_get/1/iterations:1\n"
-    "BM_string_memcpy/8/0/0/iterations:1\n"
-    "BM_string_memcpy/64/0/0/iterations:1\n"
-    "BM_string_memcpy/512/0/0/iterations:1\n"
-    "BM_string_memcpy/1024/0/0/iterations:1\n"
-    "BM_string_memcpy/8192/0/0/iterations:1\n"
-    "BM_string_memcpy/16384/0/0/iterations:1\n"
-    "BM_string_memcpy/32768/0/0/iterations:1\n"
-    "BM_string_memcpy/65536/0/0/iterations:1\n"
-    "BM_string_memcpy/131072/0/0/iterations:1\n"
-    "BM_math_log10/iterations:1\n";
+      "BM_string_memcmp/8/0/0/iterations:1\n"
+      "BM_string_memcmp/16/0/0/iterations:1\n"
+      "BM_string_memcmp/32/0/0/iterations:1\n"
+      "BM_string_memcmp/64/0/0/iterations:1\n"
+      "BM_string_memcmp/512/0/0/iterations:1\n"
+      "BM_string_memcmp/1024/0/0/iterations:1\n"
+      "BM_string_memcmp/8192/0/0/iterations:1\n"
+      "BM_string_memcmp/16384/0/0/iterations:1\n"
+      "BM_string_memcmp/32768/0/0/iterations:1\n"
+      "BM_string_memcmp/65536/0/0/iterations:1\n"
+      "BM_string_memcmp/131072/0/0/iterations:1\n"
+      "BM_math_sqrt/iterations:1\n"
+      "BM_string_memcpy/512/4/4/iterations:25\n"
+      "BM_property_get/1/iterations:1\n"
+      "BM_string_memcpy/8/0/0/iterations:1\n"
+      "BM_string_memcpy/16/0/0/iterations:1\n"
+      "BM_string_memcpy/32/0/0/iterations:1\n"
+      "BM_string_memcpy/64/0/0/iterations:1\n"
+      "BM_string_memcpy/512/0/0/iterations:1\n"
+      "BM_string_memcpy/1024/0/0/iterations:1\n"
+      "BM_string_memcpy/8192/0/0/iterations:1\n"
+      "BM_string_memcpy/16384/0/0/iterations:1\n"
+      "BM_string_memcpy/32768/0/0/iterations:1\n"
+      "BM_string_memcpy/65536/0/0/iterations:1\n"
+      "BM_string_memcpy/131072/0/0/iterations:1\n"
+      "BM_math_log10/iterations:1\n";
   Verify(expected, 0, std::vector<const char*>{"--bionic_extra=BM_string_memcpy AT_ALIGNED_TWOBUF",
                                                "--bionic_extra=BM_math_log10",
                                                "--bionic_cpu=0",
@@ -285,580 +291,584 @@
 
 TEST_F(SystemTests, sizes) {
   std::string expected =
-    "BM_stdio_fwrite/8/iterations:1\n"
-    "BM_stdio_fwrite/64/iterations:1\n"
-    "BM_stdio_fwrite/512/iterations:1\n"
-    "BM_stdio_fwrite/1024/iterations:1\n"
-    "BM_stdio_fwrite/8192/iterations:1\n"
-    "BM_stdio_fwrite/16384/iterations:1\n"
-    "BM_stdio_fwrite/32768/iterations:1\n"
-    "BM_stdio_fwrite/65536/iterations:1\n"
-    "BM_stdio_fwrite/131072/iterations:1\n"
-    "BM_stdio_fread/1/iterations:1\n"
-    "BM_stdio_fread/2/iterations:1\n"
-    "BM_stdio_fread/3/iterations:1\n"
-    "BM_stdio_fread/4/iterations:1\n"
-    "BM_stdio_fread/5/iterations:1\n"
-    "BM_stdio_fread/6/iterations:1\n"
-    "BM_stdio_fread/7/iterations:1\n"
-    "BM_stdio_fread/8/iterations:1\n"
-    "BM_stdio_fread/9/iterations:1\n"
-    "BM_stdio_fread/10/iterations:1\n"
-    "BM_stdio_fread/11/iterations:1\n"
-    "BM_stdio_fread/12/iterations:1\n"
-    "BM_stdio_fread/13/iterations:1\n"
-    "BM_stdio_fread/14/iterations:1\n"
-    "BM_stdio_fread/15/iterations:1\n"
-    "BM_stdio_fread/16/iterations:1\n"
-    "BM_stdio_fread/24/iterations:1\n"
-    "BM_stdio_fread/32/iterations:1\n"
-    "BM_stdio_fread/40/iterations:1\n"
-    "BM_stdio_fread/48/iterations:1\n"
-    "BM_stdio_fread/56/iterations:1\n"
-    "BM_stdio_fread/64/iterations:1\n"
-    "BM_stdio_fread/72/iterations:1\n"
-    "BM_stdio_fread/80/iterations:1\n"
-    "BM_stdio_fread/88/iterations:1\n"
-    "BM_stdio_fread/96/iterations:1\n"
-    "BM_stdio_fread/104/iterations:1\n"
-    "BM_stdio_fread/112/iterations:1\n"
-    "BM_stdio_fread/120/iterations:1\n"
-    "BM_stdio_fread/128/iterations:1\n"
-    "BM_stdio_fread/136/iterations:1\n"
-    "BM_stdio_fread/144/iterations:1\n"
-    "BM_stdio_fread/160/iterations:1\n"
-    "BM_stdio_fread/176/iterations:1\n"
-    "BM_stdio_fread/192/iterations:1\n"
-    "BM_stdio_fread/208/iterations:1\n"
-    "BM_stdio_fread/224/iterations:1\n"
-    "BM_stdio_fread/240/iterations:1\n"
-    "BM_stdio_fread/256/iterations:1\n"
-    "BM_stdio_fwrite/512/iterations:1\n"
-    "BM_stdio_fwrite/1024/iterations:1\n"
-    "BM_stdio_fwrite/8192/iterations:1\n"
-    "BM_stdio_fwrite/16384/iterations:1\n"
-    "BM_stdio_fwrite/32768/iterations:1\n"
-    "BM_stdio_fwrite/65536/iterations:1\n"
-    "BM_stdio_fwrite/131072/iterations:1\n"
-    "BM_stdio_fread/262144/iterations:1\n"
-    "BM_stdio_fread/524288/iterations:1\n"
-    "BM_stdio_fread/1048576/iterations:1\n"
-    "BM_stdio_fread/2097152/iterations:1\n"
-    "BM_stdio_fwrite/1/iterations:1\n"
-    "BM_stdio_fwrite/2/iterations:1\n"
-    "BM_stdio_fwrite/3/iterations:1\n"
-    "BM_stdio_fwrite/4/iterations:1\n"
-    "BM_stdio_fwrite/5/iterations:1\n"
-    "BM_stdio_fwrite/6/iterations:1\n"
-    "BM_stdio_fwrite/7/iterations:1\n"
-    "BM_stdio_fwrite/8/iterations:1\n"
-    "BM_stdio_fwrite/9/iterations:1\n"
-    "BM_stdio_fwrite/10/iterations:1\n"
-    "BM_stdio_fwrite/11/iterations:1\n"
-    "BM_stdio_fwrite/12/iterations:1\n"
-    "BM_stdio_fwrite/13/iterations:1\n"
-    "BM_stdio_fwrite/14/iterations:1\n"
-    "BM_stdio_fwrite/15/iterations:1\n"
-    "BM_stdio_fwrite/16/iterations:1\n"
-    "BM_stdio_fwrite/24/iterations:1\n"
-    "BM_stdio_fwrite/32/iterations:1\n"
-    "BM_stdio_fwrite/40/iterations:1\n"
-    "BM_stdio_fwrite/48/iterations:1\n"
-    "BM_stdio_fwrite/56/iterations:1\n"
-    "BM_stdio_fwrite/64/iterations:1\n"
-    "BM_stdio_fwrite/72/iterations:1\n"
-    "BM_stdio_fwrite/80/iterations:1\n"
-    "BM_stdio_fwrite/88/iterations:1\n"
-    "BM_stdio_fwrite/96/iterations:1\n"
-    "BM_stdio_fwrite/104/iterations:1\n"
-    "BM_stdio_fwrite/112/iterations:1\n"
-    "BM_stdio_fwrite/120/iterations:1\n"
-    "BM_stdio_fwrite/128/iterations:1\n"
-    "BM_stdio_fwrite/136/iterations:1\n"
-    "BM_stdio_fwrite/144/iterations:1\n"
-    "BM_stdio_fwrite/160/iterations:1\n"
-    "BM_stdio_fwrite/176/iterations:1\n"
-    "BM_stdio_fwrite/192/iterations:1\n"
-    "BM_stdio_fwrite/208/iterations:1\n"
-    "BM_stdio_fwrite/224/iterations:1\n"
-    "BM_stdio_fwrite/240/iterations:1\n"
-    "BM_stdio_fwrite/256/iterations:1\n"
-    "BM_stdio_fwrite/512/iterations:1\n"
-    "BM_stdio_fwrite/1024/iterations:1\n"
-    "BM_stdio_fwrite/8192/iterations:1\n"
-    "BM_stdio_fwrite/16384/iterations:1\n"
-    "BM_stdio_fwrite/32768/iterations:1\n"
-    "BM_stdio_fwrite/65536/iterations:1\n"
-    "BM_stdio_fwrite/131072/iterations:1\n"
-    "BM_stdio_fwrite/262144/iterations:1\n"
-    "BM_stdio_fwrite/524288/iterations:1\n"
-    "BM_stdio_fwrite/1048576/iterations:1\n"
-    "BM_stdio_fwrite/2097152/iterations:1\n";
+      "BM_stdio_fwrite/8/iterations:1\n"
+      "BM_stdio_fwrite/16/iterations:1\n"
+      "BM_stdio_fwrite/32/iterations:1\n"
+      "BM_stdio_fwrite/64/iterations:1\n"
+      "BM_stdio_fwrite/512/iterations:1\n"
+      "BM_stdio_fwrite/1024/iterations:1\n"
+      "BM_stdio_fwrite/8192/iterations:1\n"
+      "BM_stdio_fwrite/16384/iterations:1\n"
+      "BM_stdio_fwrite/32768/iterations:1\n"
+      "BM_stdio_fwrite/65536/iterations:1\n"
+      "BM_stdio_fwrite/131072/iterations:1\n"
+      "BM_stdio_fread/1/iterations:1\n"
+      "BM_stdio_fread/2/iterations:1\n"
+      "BM_stdio_fread/3/iterations:1\n"
+      "BM_stdio_fread/4/iterations:1\n"
+      "BM_stdio_fread/5/iterations:1\n"
+      "BM_stdio_fread/6/iterations:1\n"
+      "BM_stdio_fread/7/iterations:1\n"
+      "BM_stdio_fread/8/iterations:1\n"
+      "BM_stdio_fread/9/iterations:1\n"
+      "BM_stdio_fread/10/iterations:1\n"
+      "BM_stdio_fread/11/iterations:1\n"
+      "BM_stdio_fread/12/iterations:1\n"
+      "BM_stdio_fread/13/iterations:1\n"
+      "BM_stdio_fread/14/iterations:1\n"
+      "BM_stdio_fread/15/iterations:1\n"
+      "BM_stdio_fread/16/iterations:1\n"
+      "BM_stdio_fread/24/iterations:1\n"
+      "BM_stdio_fread/32/iterations:1\n"
+      "BM_stdio_fread/40/iterations:1\n"
+      "BM_stdio_fread/48/iterations:1\n"
+      "BM_stdio_fread/56/iterations:1\n"
+      "BM_stdio_fread/64/iterations:1\n"
+      "BM_stdio_fread/72/iterations:1\n"
+      "BM_stdio_fread/80/iterations:1\n"
+      "BM_stdio_fread/88/iterations:1\n"
+      "BM_stdio_fread/96/iterations:1\n"
+      "BM_stdio_fread/104/iterations:1\n"
+      "BM_stdio_fread/112/iterations:1\n"
+      "BM_stdio_fread/120/iterations:1\n"
+      "BM_stdio_fread/128/iterations:1\n"
+      "BM_stdio_fread/136/iterations:1\n"
+      "BM_stdio_fread/144/iterations:1\n"
+      "BM_stdio_fread/160/iterations:1\n"
+      "BM_stdio_fread/176/iterations:1\n"
+      "BM_stdio_fread/192/iterations:1\n"
+      "BM_stdio_fread/208/iterations:1\n"
+      "BM_stdio_fread/224/iterations:1\n"
+      "BM_stdio_fread/240/iterations:1\n"
+      "BM_stdio_fread/256/iterations:1\n"
+      "BM_stdio_fwrite/512/iterations:1\n"
+      "BM_stdio_fwrite/1024/iterations:1\n"
+      "BM_stdio_fwrite/8192/iterations:1\n"
+      "BM_stdio_fwrite/16384/iterations:1\n"
+      "BM_stdio_fwrite/32768/iterations:1\n"
+      "BM_stdio_fwrite/65536/iterations:1\n"
+      "BM_stdio_fwrite/131072/iterations:1\n"
+      "BM_stdio_fread/262144/iterations:1\n"
+      "BM_stdio_fread/524288/iterations:1\n"
+      "BM_stdio_fread/1048576/iterations:1\n"
+      "BM_stdio_fread/2097152/iterations:1\n"
+      "BM_stdio_fwrite/1/iterations:1\n"
+      "BM_stdio_fwrite/2/iterations:1\n"
+      "BM_stdio_fwrite/3/iterations:1\n"
+      "BM_stdio_fwrite/4/iterations:1\n"
+      "BM_stdio_fwrite/5/iterations:1\n"
+      "BM_stdio_fwrite/6/iterations:1\n"
+      "BM_stdio_fwrite/7/iterations:1\n"
+      "BM_stdio_fwrite/8/iterations:1\n"
+      "BM_stdio_fwrite/9/iterations:1\n"
+      "BM_stdio_fwrite/10/iterations:1\n"
+      "BM_stdio_fwrite/11/iterations:1\n"
+      "BM_stdio_fwrite/12/iterations:1\n"
+      "BM_stdio_fwrite/13/iterations:1\n"
+      "BM_stdio_fwrite/14/iterations:1\n"
+      "BM_stdio_fwrite/15/iterations:1\n"
+      "BM_stdio_fwrite/16/iterations:1\n"
+      "BM_stdio_fwrite/24/iterations:1\n"
+      "BM_stdio_fwrite/32/iterations:1\n"
+      "BM_stdio_fwrite/40/iterations:1\n"
+      "BM_stdio_fwrite/48/iterations:1\n"
+      "BM_stdio_fwrite/56/iterations:1\n"
+      "BM_stdio_fwrite/64/iterations:1\n"
+      "BM_stdio_fwrite/72/iterations:1\n"
+      "BM_stdio_fwrite/80/iterations:1\n"
+      "BM_stdio_fwrite/88/iterations:1\n"
+      "BM_stdio_fwrite/96/iterations:1\n"
+      "BM_stdio_fwrite/104/iterations:1\n"
+      "BM_stdio_fwrite/112/iterations:1\n"
+      "BM_stdio_fwrite/120/iterations:1\n"
+      "BM_stdio_fwrite/128/iterations:1\n"
+      "BM_stdio_fwrite/136/iterations:1\n"
+      "BM_stdio_fwrite/144/iterations:1\n"
+      "BM_stdio_fwrite/160/iterations:1\n"
+      "BM_stdio_fwrite/176/iterations:1\n"
+      "BM_stdio_fwrite/192/iterations:1\n"
+      "BM_stdio_fwrite/208/iterations:1\n"
+      "BM_stdio_fwrite/224/iterations:1\n"
+      "BM_stdio_fwrite/240/iterations:1\n"
+      "BM_stdio_fwrite/256/iterations:1\n"
+      "BM_stdio_fwrite/512/iterations:1\n"
+      "BM_stdio_fwrite/1024/iterations:1\n"
+      "BM_stdio_fwrite/8192/iterations:1\n"
+      "BM_stdio_fwrite/16384/iterations:1\n"
+      "BM_stdio_fwrite/32768/iterations:1\n"
+      "BM_stdio_fwrite/65536/iterations:1\n"
+      "BM_stdio_fwrite/131072/iterations:1\n"
+      "BM_stdio_fwrite/262144/iterations:1\n"
+      "BM_stdio_fwrite/524288/iterations:1\n"
+      "BM_stdio_fwrite/1048576/iterations:1\n"
+      "BM_stdio_fwrite/2097152/iterations:1\n";
 
   Verify(expected, 0, std::vector<const char*>{GetBionicXmlArg("test_size.xml").c_str()});
 }
 
 TEST_F(SystemTests, alignment_onebuf) {
   std::string expected =
-    "BM_string_strlen/8/0/iterations:1\n"
-    "BM_string_strlen/64/0/iterations:1\n"
-    "BM_string_strlen/512/0/iterations:1\n"
-    "BM_string_strlen/1024/0/iterations:1\n"
-    "BM_string_strlen/8192/0/iterations:1\n"
-    "BM_string_strlen/16384/0/iterations:1\n"
-    "BM_string_strlen/32768/0/iterations:1\n"
-    "BM_string_strlen/65536/0/iterations:1\n"
-    "BM_string_strlen/131072/0/iterations:1\n"
-    "BM_string_memset/1/0/iterations:1\n"
-    "BM_string_memset/2/0/iterations:1\n"
-    "BM_string_memset/3/0/iterations:1\n"
-    "BM_string_memset/4/0/iterations:1\n"
-    "BM_string_memset/5/0/iterations:1\n"
-    "BM_string_memset/6/0/iterations:1\n"
-    "BM_string_memset/7/0/iterations:1\n"
-    "BM_string_memset/8/0/iterations:1\n"
-    "BM_string_memset/9/0/iterations:1\n"
-    "BM_string_memset/10/0/iterations:1\n"
-    "BM_string_memset/11/0/iterations:1\n"
-    "BM_string_memset/12/0/iterations:1\n"
-    "BM_string_memset/13/0/iterations:1\n"
-    "BM_string_memset/14/0/iterations:1\n"
-    "BM_string_memset/15/0/iterations:1\n"
-    "BM_string_memset/16/0/iterations:1\n"
-    "BM_string_memset/24/0/iterations:1\n"
-    "BM_string_memset/32/0/iterations:1\n"
-    "BM_string_memset/40/0/iterations:1\n"
-    "BM_string_memset/48/0/iterations:1\n"
-    "BM_string_memset/56/0/iterations:1\n"
-    "BM_string_memset/64/0/iterations:1\n"
-    "BM_string_memset/72/0/iterations:1\n"
-    "BM_string_memset/80/0/iterations:1\n"
-    "BM_string_memset/88/0/iterations:1\n"
-    "BM_string_memset/96/0/iterations:1\n"
-    "BM_string_memset/104/0/iterations:1\n"
-    "BM_string_memset/112/0/iterations:1\n"
-    "BM_string_memset/120/0/iterations:1\n"
-    "BM_string_memset/128/0/iterations:1\n"
-    "BM_string_memset/136/0/iterations:1\n"
-    "BM_string_memset/144/0/iterations:1\n"
-    "BM_string_memset/160/0/iterations:1\n"
-    "BM_string_memset/176/0/iterations:1\n"
-    "BM_string_memset/192/0/iterations:1\n"
-    "BM_string_memset/208/0/iterations:1\n"
-    "BM_string_memset/224/0/iterations:1\n"
-    "BM_string_memset/240/0/iterations:1\n"
-    "BM_string_memset/256/0/iterations:1\n"
-    "BM_string_strlen/512/0/iterations:1\n"
-    "BM_string_strlen/1024/0/iterations:1\n"
-    "BM_string_strlen/8192/0/iterations:1\n"
-    "BM_string_strlen/16384/0/iterations:1\n"
-    "BM_string_strlen/32768/0/iterations:1\n"
-    "BM_string_strlen/65536/0/iterations:1\n"
-    "BM_string_strlen/131072/0/iterations:1\n"
-    "BM_string_memset/262144/0/iterations:1\n"
-    "BM_string_memset/524288/0/iterations:1\n"
-    "BM_string_memset/1048576/0/iterations:1\n"
-    "BM_string_memset/2097152/0/iterations:1\n"
-    "BM_string_strlen/1/0/iterations:1\n"
-    "BM_string_strlen/2/0/iterations:1\n"
-    "BM_string_strlen/3/0/iterations:1\n"
-    "BM_string_strlen/4/0/iterations:1\n"
-    "BM_string_strlen/5/0/iterations:1\n"
-    "BM_string_strlen/6/0/iterations:1\n"
-    "BM_string_strlen/7/0/iterations:1\n"
-    "BM_string_strlen/8/0/iterations:1\n"
-    "BM_string_strlen/9/0/iterations:1\n"
-    "BM_string_strlen/10/0/iterations:1\n"
-    "BM_string_strlen/11/0/iterations:1\n"
-    "BM_string_strlen/12/0/iterations:1\n"
-    "BM_string_strlen/13/0/iterations:1\n"
-    "BM_string_strlen/14/0/iterations:1\n"
-    "BM_string_strlen/15/0/iterations:1\n"
-    "BM_string_strlen/16/0/iterations:1\n"
-    "BM_string_strlen/24/0/iterations:1\n"
-    "BM_string_strlen/32/0/iterations:1\n"
-    "BM_string_strlen/40/0/iterations:1\n"
-    "BM_string_strlen/48/0/iterations:1\n"
-    "BM_string_strlen/56/0/iterations:1\n"
-    "BM_string_strlen/64/0/iterations:1\n"
-    "BM_string_strlen/72/0/iterations:1\n"
-    "BM_string_strlen/80/0/iterations:1\n"
-    "BM_string_strlen/88/0/iterations:1\n"
-    "BM_string_strlen/96/0/iterations:1\n"
-    "BM_string_strlen/104/0/iterations:1\n"
-    "BM_string_strlen/112/0/iterations:1\n"
-    "BM_string_strlen/120/0/iterations:1\n"
-    "BM_string_strlen/128/0/iterations:1\n"
-    "BM_string_strlen/136/0/iterations:1\n"
-    "BM_string_strlen/144/0/iterations:1\n"
-    "BM_string_strlen/160/0/iterations:1\n"
-    "BM_string_strlen/176/0/iterations:1\n"
-    "BM_string_strlen/192/0/iterations:1\n"
-    "BM_string_strlen/208/0/iterations:1\n"
-    "BM_string_strlen/224/0/iterations:1\n"
-    "BM_string_strlen/240/0/iterations:1\n"
-    "BM_string_strlen/256/0/iterations:1\n"
-    "BM_string_strlen/512/0/iterations:1\n"
-    "BM_string_strlen/1024/0/iterations:1\n"
-    "BM_string_strlen/8192/0/iterations:1\n"
-    "BM_string_strlen/16384/0/iterations:1\n"
-    "BM_string_strlen/32768/0/iterations:1\n"
-    "BM_string_strlen/65536/0/iterations:1\n"
-    "BM_string_strlen/131072/0/iterations:1\n"
-    "BM_string_strlen/262144/0/iterations:1\n"
-    "BM_string_strlen/524288/0/iterations:1\n"
-    "BM_string_strlen/1048576/0/iterations:1\n"
-    "BM_string_strlen/2097152/0/iterations:1\n"
-    "BM_string_memset/1/0/iterations:1\n"
-    "BM_string_memset/1/1/iterations:1\n"
-    "BM_string_memset/1/2/iterations:1\n"
-    "BM_string_memset/1/4/iterations:1\n"
-    "BM_string_memset/1/8/iterations:1\n"
-    "BM_string_memset/1/16/iterations:1\n"
-    "BM_string_memset/1/32/iterations:1\n"
-    "BM_string_memset/2/0/iterations:1\n"
-    "BM_string_memset/2/1/iterations:1\n"
-    "BM_string_memset/2/2/iterations:1\n"
-    "BM_string_memset/2/4/iterations:1\n"
-    "BM_string_memset/2/8/iterations:1\n"
-    "BM_string_memset/2/16/iterations:1\n"
-    "BM_string_memset/2/32/iterations:1\n"
-    "BM_string_memset/3/0/iterations:1\n"
-    "BM_string_memset/3/1/iterations:1\n"
-    "BM_string_memset/3/2/iterations:1\n"
-    "BM_string_memset/3/4/iterations:1\n"
-    "BM_string_memset/3/8/iterations:1\n"
-    "BM_string_memset/3/16/iterations:1\n"
-    "BM_string_memset/3/32/iterations:1\n"
-    "BM_string_memset/4/0/iterations:1\n"
-    "BM_string_memset/4/1/iterations:1\n"
-    "BM_string_memset/4/2/iterations:1\n"
-    "BM_string_memset/4/4/iterations:1\n"
-    "BM_string_memset/4/8/iterations:1\n"
-    "BM_string_memset/4/16/iterations:1\n"
-    "BM_string_memset/4/32/iterations:1\n"
-    "BM_string_memset/5/0/iterations:1\n"
-    "BM_string_memset/5/1/iterations:1\n"
-    "BM_string_memset/5/2/iterations:1\n"
-    "BM_string_memset/5/4/iterations:1\n"
-    "BM_string_memset/5/8/iterations:1\n"
-    "BM_string_memset/5/16/iterations:1\n"
-    "BM_string_memset/5/32/iterations:1\n"
-    "BM_string_memset/6/0/iterations:1\n"
-    "BM_string_memset/6/1/iterations:1\n"
-    "BM_string_memset/6/2/iterations:1\n"
-    "BM_string_memset/6/4/iterations:1\n"
-    "BM_string_memset/6/8/iterations:1\n"
-    "BM_string_memset/6/16/iterations:1\n"
-    "BM_string_memset/6/32/iterations:1\n"
-    "BM_string_memset/7/0/iterations:1\n"
-    "BM_string_memset/7/1/iterations:1\n"
-    "BM_string_memset/7/2/iterations:1\n"
-    "BM_string_memset/7/4/iterations:1\n"
-    "BM_string_memset/7/8/iterations:1\n"
-    "BM_string_memset/7/16/iterations:1\n"
-    "BM_string_memset/7/32/iterations:1\n"
-    "BM_string_memset/8/0/iterations:1\n"
-    "BM_string_memset/8/1/iterations:1\n"
-    "BM_string_memset/8/2/iterations:1\n"
-    "BM_string_memset/8/4/iterations:1\n"
-    "BM_string_memset/8/8/iterations:1\n"
-    "BM_string_memset/8/16/iterations:1\n"
-    "BM_string_memset/8/32/iterations:1\n"
-    "BM_string_memset/9/0/iterations:1\n"
-    "BM_string_memset/9/1/iterations:1\n"
-    "BM_string_memset/9/2/iterations:1\n"
-    "BM_string_memset/9/4/iterations:1\n"
-    "BM_string_memset/9/8/iterations:1\n"
-    "BM_string_memset/9/16/iterations:1\n"
-    "BM_string_memset/9/32/iterations:1\n"
-    "BM_string_memset/10/0/iterations:1\n"
-    "BM_string_memset/10/1/iterations:1\n"
-    "BM_string_memset/10/2/iterations:1\n"
-    "BM_string_memset/10/4/iterations:1\n"
-    "BM_string_memset/10/8/iterations:1\n"
-    "BM_string_memset/10/16/iterations:1\n"
-    "BM_string_memset/10/32/iterations:1\n"
-    "BM_string_memset/11/0/iterations:1\n"
-    "BM_string_memset/11/1/iterations:1\n"
-    "BM_string_memset/11/2/iterations:1\n"
-    "BM_string_memset/11/4/iterations:1\n"
-    "BM_string_memset/11/8/iterations:1\n"
-    "BM_string_memset/11/16/iterations:1\n"
-    "BM_string_memset/11/32/iterations:1\n"
-    "BM_string_memset/12/0/iterations:1\n"
-    "BM_string_memset/12/1/iterations:1\n"
-    "BM_string_memset/12/2/iterations:1\n"
-    "BM_string_memset/12/4/iterations:1\n"
-    "BM_string_memset/12/8/iterations:1\n"
-    "BM_string_memset/12/16/iterations:1\n"
-    "BM_string_memset/12/32/iterations:1\n"
-    "BM_string_memset/13/0/iterations:1\n"
-    "BM_string_memset/13/1/iterations:1\n"
-    "BM_string_memset/13/2/iterations:1\n"
-    "BM_string_memset/13/4/iterations:1\n"
-    "BM_string_memset/13/8/iterations:1\n"
-    "BM_string_memset/13/16/iterations:1\n"
-    "BM_string_memset/13/32/iterations:1\n"
-    "BM_string_memset/14/0/iterations:1\n"
-    "BM_string_memset/14/1/iterations:1\n"
-    "BM_string_memset/14/2/iterations:1\n"
-    "BM_string_memset/14/4/iterations:1\n"
-    "BM_string_memset/14/8/iterations:1\n"
-    "BM_string_memset/14/16/iterations:1\n"
-    "BM_string_memset/14/32/iterations:1\n"
-    "BM_string_memset/15/0/iterations:1\n"
-    "BM_string_memset/15/1/iterations:1\n"
-    "BM_string_memset/15/2/iterations:1\n"
-    "BM_string_memset/15/4/iterations:1\n"
-    "BM_string_memset/15/8/iterations:1\n"
-    "BM_string_memset/15/16/iterations:1\n"
-    "BM_string_memset/15/32/iterations:1\n"
-    "BM_string_memset/16/0/iterations:1\n"
-    "BM_string_memset/16/1/iterations:1\n"
-    "BM_string_memset/16/2/iterations:1\n"
-    "BM_string_memset/16/4/iterations:1\n"
-    "BM_string_memset/16/8/iterations:1\n"
-    "BM_string_memset/16/16/iterations:1\n"
-    "BM_string_memset/16/32/iterations:1\n"
-    "BM_string_memset/24/0/iterations:1\n"
-    "BM_string_memset/24/1/iterations:1\n"
-    "BM_string_memset/24/2/iterations:1\n"
-    "BM_string_memset/24/4/iterations:1\n"
-    "BM_string_memset/24/8/iterations:1\n"
-    "BM_string_memset/24/16/iterations:1\n"
-    "BM_string_memset/24/32/iterations:1\n"
-    "BM_string_memset/32/0/iterations:1\n"
-    "BM_string_memset/32/1/iterations:1\n"
-    "BM_string_memset/32/2/iterations:1\n"
-    "BM_string_memset/32/4/iterations:1\n"
-    "BM_string_memset/32/8/iterations:1\n"
-    "BM_string_memset/32/16/iterations:1\n"
-    "BM_string_memset/32/32/iterations:1\n"
-    "BM_string_memset/40/0/iterations:1\n"
-    "BM_string_memset/40/1/iterations:1\n"
-    "BM_string_memset/40/2/iterations:1\n"
-    "BM_string_memset/40/4/iterations:1\n"
-    "BM_string_memset/40/8/iterations:1\n"
-    "BM_string_memset/40/16/iterations:1\n"
-    "BM_string_memset/40/32/iterations:1\n"
-    "BM_string_memset/48/0/iterations:1\n"
-    "BM_string_memset/48/1/iterations:1\n"
-    "BM_string_memset/48/2/iterations:1\n"
-    "BM_string_memset/48/4/iterations:1\n"
-    "BM_string_memset/48/8/iterations:1\n"
-    "BM_string_memset/48/16/iterations:1\n"
-    "BM_string_memset/48/32/iterations:1\n"
-    "BM_string_memset/56/0/iterations:1\n"
-    "BM_string_memset/56/1/iterations:1\n"
-    "BM_string_memset/56/2/iterations:1\n"
-    "BM_string_memset/56/4/iterations:1\n"
-    "BM_string_memset/56/8/iterations:1\n"
-    "BM_string_memset/56/16/iterations:1\n"
-    "BM_string_memset/56/32/iterations:1\n"
-    "BM_string_memset/64/0/iterations:1\n"
-    "BM_string_memset/64/1/iterations:1\n"
-    "BM_string_memset/64/2/iterations:1\n"
-    "BM_string_memset/64/4/iterations:1\n"
-    "BM_string_memset/64/8/iterations:1\n"
-    "BM_string_memset/64/16/iterations:1\n"
-    "BM_string_memset/64/32/iterations:1\n"
-    "BM_string_memset/72/0/iterations:1\n"
-    "BM_string_memset/72/1/iterations:1\n"
-    "BM_string_memset/72/2/iterations:1\n"
-    "BM_string_memset/72/4/iterations:1\n"
-    "BM_string_memset/72/8/iterations:1\n"
-    "BM_string_memset/72/16/iterations:1\n"
-    "BM_string_memset/72/32/iterations:1\n"
-    "BM_string_memset/80/0/iterations:1\n"
-    "BM_string_memset/80/1/iterations:1\n"
-    "BM_string_memset/80/2/iterations:1\n"
-    "BM_string_memset/80/4/iterations:1\n"
-    "BM_string_memset/80/8/iterations:1\n"
-    "BM_string_memset/80/16/iterations:1\n"
-    "BM_string_memset/80/32/iterations:1\n"
-    "BM_string_memset/88/0/iterations:1\n"
-    "BM_string_memset/88/1/iterations:1\n"
-    "BM_string_memset/88/2/iterations:1\n"
-    "BM_string_memset/88/4/iterations:1\n"
-    "BM_string_memset/88/8/iterations:1\n"
-    "BM_string_memset/88/16/iterations:1\n"
-    "BM_string_memset/88/32/iterations:1\n"
-    "BM_string_memset/96/0/iterations:1\n"
-    "BM_string_memset/96/1/iterations:1\n"
-    "BM_string_memset/96/2/iterations:1\n"
-    "BM_string_memset/96/4/iterations:1\n"
-    "BM_string_memset/96/8/iterations:1\n"
-    "BM_string_memset/96/16/iterations:1\n"
-    "BM_string_memset/96/32/iterations:1\n"
-    "BM_string_memset/104/0/iterations:1\n"
-    "BM_string_memset/104/1/iterations:1\n"
-    "BM_string_memset/104/2/iterations:1\n"
-    "BM_string_memset/104/4/iterations:1\n"
-    "BM_string_memset/104/8/iterations:1\n"
-    "BM_string_memset/104/16/iterations:1\n"
-    "BM_string_memset/104/32/iterations:1\n"
-    "BM_string_memset/112/0/iterations:1\n"
-    "BM_string_memset/112/1/iterations:1\n"
-    "BM_string_memset/112/2/iterations:1\n"
-    "BM_string_memset/112/4/iterations:1\n"
-    "BM_string_memset/112/8/iterations:1\n"
-    "BM_string_memset/112/16/iterations:1\n"
-    "BM_string_memset/112/32/iterations:1\n"
-    "BM_string_memset/120/0/iterations:1\n"
-    "BM_string_memset/120/1/iterations:1\n"
-    "BM_string_memset/120/2/iterations:1\n"
-    "BM_string_memset/120/4/iterations:1\n"
-    "BM_string_memset/120/8/iterations:1\n"
-    "BM_string_memset/120/16/iterations:1\n"
-    "BM_string_memset/120/32/iterations:1\n"
-    "BM_string_memset/128/0/iterations:1\n"
-    "BM_string_memset/128/1/iterations:1\n"
-    "BM_string_memset/128/2/iterations:1\n"
-    "BM_string_memset/128/4/iterations:1\n"
-    "BM_string_memset/128/8/iterations:1\n"
-    "BM_string_memset/128/16/iterations:1\n"
-    "BM_string_memset/128/32/iterations:1\n"
-    "BM_string_memset/136/0/iterations:1\n"
-    "BM_string_memset/136/1/iterations:1\n"
-    "BM_string_memset/136/2/iterations:1\n"
-    "BM_string_memset/136/4/iterations:1\n"
-    "BM_string_memset/136/8/iterations:1\n"
-    "BM_string_memset/136/16/iterations:1\n"
-    "BM_string_memset/136/32/iterations:1\n"
-    "BM_string_memset/144/0/iterations:1\n"
-    "BM_string_memset/144/1/iterations:1\n"
-    "BM_string_memset/144/2/iterations:1\n"
-    "BM_string_memset/144/4/iterations:1\n"
-    "BM_string_memset/144/8/iterations:1\n"
-    "BM_string_memset/144/16/iterations:1\n"
-    "BM_string_memset/144/32/iterations:1\n"
-    "BM_string_memset/160/0/iterations:1\n"
-    "BM_string_memset/160/1/iterations:1\n"
-    "BM_string_memset/160/2/iterations:1\n"
-    "BM_string_memset/160/4/iterations:1\n"
-    "BM_string_memset/160/8/iterations:1\n"
-    "BM_string_memset/160/16/iterations:1\n"
-    "BM_string_memset/160/32/iterations:1\n"
-    "BM_string_memset/176/0/iterations:1\n"
-    "BM_string_memset/176/1/iterations:1\n"
-    "BM_string_memset/176/2/iterations:1\n"
-    "BM_string_memset/176/4/iterations:1\n"
-    "BM_string_memset/176/8/iterations:1\n"
-    "BM_string_memset/176/16/iterations:1\n"
-    "BM_string_memset/176/32/iterations:1\n"
-    "BM_string_memset/192/0/iterations:1\n"
-    "BM_string_memset/192/1/iterations:1\n"
-    "BM_string_memset/192/2/iterations:1\n"
-    "BM_string_memset/192/4/iterations:1\n"
-    "BM_string_memset/192/8/iterations:1\n"
-    "BM_string_memset/192/16/iterations:1\n"
-    "BM_string_memset/192/32/iterations:1\n"
-    "BM_string_memset/208/0/iterations:1\n"
-    "BM_string_memset/208/1/iterations:1\n"
-    "BM_string_memset/208/2/iterations:1\n"
-    "BM_string_memset/208/4/iterations:1\n"
-    "BM_string_memset/208/8/iterations:1\n"
-    "BM_string_memset/208/16/iterations:1\n"
-    "BM_string_memset/208/32/iterations:1\n"
-    "BM_string_memset/224/0/iterations:1\n"
-    "BM_string_memset/224/1/iterations:1\n"
-    "BM_string_memset/224/2/iterations:1\n"
-    "BM_string_memset/224/4/iterations:1\n"
-    "BM_string_memset/224/8/iterations:1\n"
-    "BM_string_memset/224/16/iterations:1\n"
-    "BM_string_memset/224/32/iterations:1\n"
-    "BM_string_memset/240/0/iterations:1\n"
-    "BM_string_memset/240/1/iterations:1\n"
-    "BM_string_memset/240/2/iterations:1\n"
-    "BM_string_memset/240/4/iterations:1\n"
-    "BM_string_memset/240/8/iterations:1\n"
-    "BM_string_memset/240/16/iterations:1\n"
-    "BM_string_memset/240/32/iterations:1\n"
-    "BM_string_memset/256/0/iterations:1\n"
-    "BM_string_memset/256/1/iterations:1\n"
-    "BM_string_memset/256/2/iterations:1\n"
-    "BM_string_memset/256/4/iterations:1\n"
-    "BM_string_memset/256/8/iterations:1\n"
-    "BM_string_memset/256/16/iterations:1\n"
-    "BM_string_memset/256/32/iterations:1\n"
-    "BM_string_memset/512/0/iterations:1\n"
-    "BM_string_memset/512/1/iterations:1\n"
-    "BM_string_memset/512/2/iterations:1\n"
-    "BM_string_memset/512/4/iterations:1\n"
-    "BM_string_memset/512/8/iterations:1\n"
-    "BM_string_memset/512/16/iterations:1\n"
-    "BM_string_memset/512/32/iterations:1\n"
-    "BM_string_memset/1024/0/iterations:1\n"
-    "BM_string_memset/1024/1/iterations:1\n"
-    "BM_string_memset/1024/2/iterations:1\n"
-    "BM_string_memset/1024/4/iterations:1\n"
-    "BM_string_memset/1024/8/iterations:1\n"
-    "BM_string_memset/1024/16/iterations:1\n"
-    "BM_string_memset/1024/32/iterations:1\n"
-    "BM_string_memset/8192/0/iterations:1\n"
-    "BM_string_memset/8192/1/iterations:1\n"
-    "BM_string_memset/8192/2/iterations:1\n"
-    "BM_string_memset/8192/4/iterations:1\n"
-    "BM_string_memset/8192/8/iterations:1\n"
-    "BM_string_memset/8192/16/iterations:1\n"
-    "BM_string_memset/8192/32/iterations:1\n"
-    "BM_string_memset/16384/0/iterations:1\n"
-    "BM_string_memset/16384/1/iterations:1\n"
-    "BM_string_memset/16384/2/iterations:1\n"
-    "BM_string_memset/16384/4/iterations:1\n"
-    "BM_string_memset/16384/8/iterations:1\n"
-    "BM_string_memset/16384/16/iterations:1\n"
-    "BM_string_memset/16384/32/iterations:1\n"
-    "BM_string_memset/32768/0/iterations:1\n"
-    "BM_string_memset/32768/1/iterations:1\n"
-    "BM_string_memset/32768/2/iterations:1\n"
-    "BM_string_memset/32768/4/iterations:1\n"
-    "BM_string_memset/32768/8/iterations:1\n"
-    "BM_string_memset/32768/16/iterations:1\n"
-    "BM_string_memset/32768/32/iterations:1\n"
-    "BM_string_memset/65536/0/iterations:1\n"
-    "BM_string_memset/65536/1/iterations:1\n"
-    "BM_string_memset/65536/2/iterations:1\n"
-    "BM_string_memset/65536/4/iterations:1\n"
-    "BM_string_memset/65536/8/iterations:1\n"
-    "BM_string_memset/65536/16/iterations:1\n"
-    "BM_string_memset/65536/32/iterations:1\n"
-    "BM_string_memset/131072/0/iterations:1\n"
-    "BM_string_memset/131072/1/iterations:1\n"
-    "BM_string_memset/131072/2/iterations:1\n"
-    "BM_string_memset/131072/4/iterations:1\n"
-    "BM_string_memset/131072/8/iterations:1\n"
-    "BM_string_memset/131072/16/iterations:1\n"
-    "BM_string_memset/131072/32/iterations:1\n"
-    "BM_string_memset/262144/0/iterations:1\n"
-    "BM_string_memset/262144/1/iterations:1\n"
-    "BM_string_memset/262144/2/iterations:1\n"
-    "BM_string_memset/262144/4/iterations:1\n"
-    "BM_string_memset/262144/8/iterations:1\n"
-    "BM_string_memset/262144/16/iterations:1\n"
-    "BM_string_memset/262144/32/iterations:1\n"
-    "BM_string_memset/524288/0/iterations:1\n"
-    "BM_string_memset/524288/1/iterations:1\n"
-    "BM_string_memset/524288/2/iterations:1\n"
-    "BM_string_memset/524288/4/iterations:1\n"
-    "BM_string_memset/524288/8/iterations:1\n"
-    "BM_string_memset/524288/16/iterations:1\n"
-    "BM_string_memset/524288/32/iterations:1\n"
-    "BM_string_memset/1048576/0/iterations:1\n"
-    "BM_string_memset/1048576/1/iterations:1\n"
-    "BM_string_memset/1048576/2/iterations:1\n"
-    "BM_string_memset/1048576/4/iterations:1\n"
-    "BM_string_memset/1048576/8/iterations:1\n"
-    "BM_string_memset/1048576/16/iterations:1\n"
-    "BM_string_memset/1048576/32/iterations:1\n"
-    "BM_string_memset/2097152/0/iterations:1\n"
-    "BM_string_memset/2097152/1/iterations:1\n"
-    "BM_string_memset/2097152/2/iterations:1\n"
-    "BM_string_memset/2097152/4/iterations:1\n"
-    "BM_string_memset/2097152/8/iterations:1\n"
-    "BM_string_memset/2097152/16/iterations:1\n"
-    "BM_string_memset/2097152/32/iterations:1\n";
+      "BM_string_strlen/8/0/iterations:1\n"
+      "BM_string_strlen/16/0/iterations:1\n"
+      "BM_string_strlen/32/0/iterations:1\n"
+      "BM_string_strlen/64/0/iterations:1\n"
+      "BM_string_strlen/512/0/iterations:1\n"
+      "BM_string_strlen/1024/0/iterations:1\n"
+      "BM_string_strlen/8192/0/iterations:1\n"
+      "BM_string_strlen/16384/0/iterations:1\n"
+      "BM_string_strlen/32768/0/iterations:1\n"
+      "BM_string_strlen/65536/0/iterations:1\n"
+      "BM_string_strlen/131072/0/iterations:1\n"
+      "BM_string_memset/1/0/iterations:1\n"
+      "BM_string_memset/2/0/iterations:1\n"
+      "BM_string_memset/3/0/iterations:1\n"
+      "BM_string_memset/4/0/iterations:1\n"
+      "BM_string_memset/5/0/iterations:1\n"
+      "BM_string_memset/6/0/iterations:1\n"
+      "BM_string_memset/7/0/iterations:1\n"
+      "BM_string_memset/8/0/iterations:1\n"
+      "BM_string_memset/9/0/iterations:1\n"
+      "BM_string_memset/10/0/iterations:1\n"
+      "BM_string_memset/11/0/iterations:1\n"
+      "BM_string_memset/12/0/iterations:1\n"
+      "BM_string_memset/13/0/iterations:1\n"
+      "BM_string_memset/14/0/iterations:1\n"
+      "BM_string_memset/15/0/iterations:1\n"
+      "BM_string_memset/16/0/iterations:1\n"
+      "BM_string_memset/24/0/iterations:1\n"
+      "BM_string_memset/32/0/iterations:1\n"
+      "BM_string_memset/40/0/iterations:1\n"
+      "BM_string_memset/48/0/iterations:1\n"
+      "BM_string_memset/56/0/iterations:1\n"
+      "BM_string_memset/64/0/iterations:1\n"
+      "BM_string_memset/72/0/iterations:1\n"
+      "BM_string_memset/80/0/iterations:1\n"
+      "BM_string_memset/88/0/iterations:1\n"
+      "BM_string_memset/96/0/iterations:1\n"
+      "BM_string_memset/104/0/iterations:1\n"
+      "BM_string_memset/112/0/iterations:1\n"
+      "BM_string_memset/120/0/iterations:1\n"
+      "BM_string_memset/128/0/iterations:1\n"
+      "BM_string_memset/136/0/iterations:1\n"
+      "BM_string_memset/144/0/iterations:1\n"
+      "BM_string_memset/160/0/iterations:1\n"
+      "BM_string_memset/176/0/iterations:1\n"
+      "BM_string_memset/192/0/iterations:1\n"
+      "BM_string_memset/208/0/iterations:1\n"
+      "BM_string_memset/224/0/iterations:1\n"
+      "BM_string_memset/240/0/iterations:1\n"
+      "BM_string_memset/256/0/iterations:1\n"
+      "BM_string_strlen/512/0/iterations:1\n"
+      "BM_string_strlen/1024/0/iterations:1\n"
+      "BM_string_strlen/8192/0/iterations:1\n"
+      "BM_string_strlen/16384/0/iterations:1\n"
+      "BM_string_strlen/32768/0/iterations:1\n"
+      "BM_string_strlen/65536/0/iterations:1\n"
+      "BM_string_strlen/131072/0/iterations:1\n"
+      "BM_string_memset/262144/0/iterations:1\n"
+      "BM_string_memset/524288/0/iterations:1\n"
+      "BM_string_memset/1048576/0/iterations:1\n"
+      "BM_string_memset/2097152/0/iterations:1\n"
+      "BM_string_strlen/1/0/iterations:1\n"
+      "BM_string_strlen/2/0/iterations:1\n"
+      "BM_string_strlen/3/0/iterations:1\n"
+      "BM_string_strlen/4/0/iterations:1\n"
+      "BM_string_strlen/5/0/iterations:1\n"
+      "BM_string_strlen/6/0/iterations:1\n"
+      "BM_string_strlen/7/0/iterations:1\n"
+      "BM_string_strlen/8/0/iterations:1\n"
+      "BM_string_strlen/9/0/iterations:1\n"
+      "BM_string_strlen/10/0/iterations:1\n"
+      "BM_string_strlen/11/0/iterations:1\n"
+      "BM_string_strlen/12/0/iterations:1\n"
+      "BM_string_strlen/13/0/iterations:1\n"
+      "BM_string_strlen/14/0/iterations:1\n"
+      "BM_string_strlen/15/0/iterations:1\n"
+      "BM_string_strlen/16/0/iterations:1\n"
+      "BM_string_strlen/24/0/iterations:1\n"
+      "BM_string_strlen/32/0/iterations:1\n"
+      "BM_string_strlen/40/0/iterations:1\n"
+      "BM_string_strlen/48/0/iterations:1\n"
+      "BM_string_strlen/56/0/iterations:1\n"
+      "BM_string_strlen/64/0/iterations:1\n"
+      "BM_string_strlen/72/0/iterations:1\n"
+      "BM_string_strlen/80/0/iterations:1\n"
+      "BM_string_strlen/88/0/iterations:1\n"
+      "BM_string_strlen/96/0/iterations:1\n"
+      "BM_string_strlen/104/0/iterations:1\n"
+      "BM_string_strlen/112/0/iterations:1\n"
+      "BM_string_strlen/120/0/iterations:1\n"
+      "BM_string_strlen/128/0/iterations:1\n"
+      "BM_string_strlen/136/0/iterations:1\n"
+      "BM_string_strlen/144/0/iterations:1\n"
+      "BM_string_strlen/160/0/iterations:1\n"
+      "BM_string_strlen/176/0/iterations:1\n"
+      "BM_string_strlen/192/0/iterations:1\n"
+      "BM_string_strlen/208/0/iterations:1\n"
+      "BM_string_strlen/224/0/iterations:1\n"
+      "BM_string_strlen/240/0/iterations:1\n"
+      "BM_string_strlen/256/0/iterations:1\n"
+      "BM_string_strlen/512/0/iterations:1\n"
+      "BM_string_strlen/1024/0/iterations:1\n"
+      "BM_string_strlen/8192/0/iterations:1\n"
+      "BM_string_strlen/16384/0/iterations:1\n"
+      "BM_string_strlen/32768/0/iterations:1\n"
+      "BM_string_strlen/65536/0/iterations:1\n"
+      "BM_string_strlen/131072/0/iterations:1\n"
+      "BM_string_strlen/262144/0/iterations:1\n"
+      "BM_string_strlen/524288/0/iterations:1\n"
+      "BM_string_strlen/1048576/0/iterations:1\n"
+      "BM_string_strlen/2097152/0/iterations:1\n"
+      "BM_string_memset/1/0/iterations:1\n"
+      "BM_string_memset/1/1/iterations:1\n"
+      "BM_string_memset/1/2/iterations:1\n"
+      "BM_string_memset/1/4/iterations:1\n"
+      "BM_string_memset/1/8/iterations:1\n"
+      "BM_string_memset/1/16/iterations:1\n"
+      "BM_string_memset/1/32/iterations:1\n"
+      "BM_string_memset/2/0/iterations:1\n"
+      "BM_string_memset/2/1/iterations:1\n"
+      "BM_string_memset/2/2/iterations:1\n"
+      "BM_string_memset/2/4/iterations:1\n"
+      "BM_string_memset/2/8/iterations:1\n"
+      "BM_string_memset/2/16/iterations:1\n"
+      "BM_string_memset/2/32/iterations:1\n"
+      "BM_string_memset/3/0/iterations:1\n"
+      "BM_string_memset/3/1/iterations:1\n"
+      "BM_string_memset/3/2/iterations:1\n"
+      "BM_string_memset/3/4/iterations:1\n"
+      "BM_string_memset/3/8/iterations:1\n"
+      "BM_string_memset/3/16/iterations:1\n"
+      "BM_string_memset/3/32/iterations:1\n"
+      "BM_string_memset/4/0/iterations:1\n"
+      "BM_string_memset/4/1/iterations:1\n"
+      "BM_string_memset/4/2/iterations:1\n"
+      "BM_string_memset/4/4/iterations:1\n"
+      "BM_string_memset/4/8/iterations:1\n"
+      "BM_string_memset/4/16/iterations:1\n"
+      "BM_string_memset/4/32/iterations:1\n"
+      "BM_string_memset/5/0/iterations:1\n"
+      "BM_string_memset/5/1/iterations:1\n"
+      "BM_string_memset/5/2/iterations:1\n"
+      "BM_string_memset/5/4/iterations:1\n"
+      "BM_string_memset/5/8/iterations:1\n"
+      "BM_string_memset/5/16/iterations:1\n"
+      "BM_string_memset/5/32/iterations:1\n"
+      "BM_string_memset/6/0/iterations:1\n"
+      "BM_string_memset/6/1/iterations:1\n"
+      "BM_string_memset/6/2/iterations:1\n"
+      "BM_string_memset/6/4/iterations:1\n"
+      "BM_string_memset/6/8/iterations:1\n"
+      "BM_string_memset/6/16/iterations:1\n"
+      "BM_string_memset/6/32/iterations:1\n"
+      "BM_string_memset/7/0/iterations:1\n"
+      "BM_string_memset/7/1/iterations:1\n"
+      "BM_string_memset/7/2/iterations:1\n"
+      "BM_string_memset/7/4/iterations:1\n"
+      "BM_string_memset/7/8/iterations:1\n"
+      "BM_string_memset/7/16/iterations:1\n"
+      "BM_string_memset/7/32/iterations:1\n"
+      "BM_string_memset/8/0/iterations:1\n"
+      "BM_string_memset/8/1/iterations:1\n"
+      "BM_string_memset/8/2/iterations:1\n"
+      "BM_string_memset/8/4/iterations:1\n"
+      "BM_string_memset/8/8/iterations:1\n"
+      "BM_string_memset/8/16/iterations:1\n"
+      "BM_string_memset/8/32/iterations:1\n"
+      "BM_string_memset/9/0/iterations:1\n"
+      "BM_string_memset/9/1/iterations:1\n"
+      "BM_string_memset/9/2/iterations:1\n"
+      "BM_string_memset/9/4/iterations:1\n"
+      "BM_string_memset/9/8/iterations:1\n"
+      "BM_string_memset/9/16/iterations:1\n"
+      "BM_string_memset/9/32/iterations:1\n"
+      "BM_string_memset/10/0/iterations:1\n"
+      "BM_string_memset/10/1/iterations:1\n"
+      "BM_string_memset/10/2/iterations:1\n"
+      "BM_string_memset/10/4/iterations:1\n"
+      "BM_string_memset/10/8/iterations:1\n"
+      "BM_string_memset/10/16/iterations:1\n"
+      "BM_string_memset/10/32/iterations:1\n"
+      "BM_string_memset/11/0/iterations:1\n"
+      "BM_string_memset/11/1/iterations:1\n"
+      "BM_string_memset/11/2/iterations:1\n"
+      "BM_string_memset/11/4/iterations:1\n"
+      "BM_string_memset/11/8/iterations:1\n"
+      "BM_string_memset/11/16/iterations:1\n"
+      "BM_string_memset/11/32/iterations:1\n"
+      "BM_string_memset/12/0/iterations:1\n"
+      "BM_string_memset/12/1/iterations:1\n"
+      "BM_string_memset/12/2/iterations:1\n"
+      "BM_string_memset/12/4/iterations:1\n"
+      "BM_string_memset/12/8/iterations:1\n"
+      "BM_string_memset/12/16/iterations:1\n"
+      "BM_string_memset/12/32/iterations:1\n"
+      "BM_string_memset/13/0/iterations:1\n"
+      "BM_string_memset/13/1/iterations:1\n"
+      "BM_string_memset/13/2/iterations:1\n"
+      "BM_string_memset/13/4/iterations:1\n"
+      "BM_string_memset/13/8/iterations:1\n"
+      "BM_string_memset/13/16/iterations:1\n"
+      "BM_string_memset/13/32/iterations:1\n"
+      "BM_string_memset/14/0/iterations:1\n"
+      "BM_string_memset/14/1/iterations:1\n"
+      "BM_string_memset/14/2/iterations:1\n"
+      "BM_string_memset/14/4/iterations:1\n"
+      "BM_string_memset/14/8/iterations:1\n"
+      "BM_string_memset/14/16/iterations:1\n"
+      "BM_string_memset/14/32/iterations:1\n"
+      "BM_string_memset/15/0/iterations:1\n"
+      "BM_string_memset/15/1/iterations:1\n"
+      "BM_string_memset/15/2/iterations:1\n"
+      "BM_string_memset/15/4/iterations:1\n"
+      "BM_string_memset/15/8/iterations:1\n"
+      "BM_string_memset/15/16/iterations:1\n"
+      "BM_string_memset/15/32/iterations:1\n"
+      "BM_string_memset/16/0/iterations:1\n"
+      "BM_string_memset/16/1/iterations:1\n"
+      "BM_string_memset/16/2/iterations:1\n"
+      "BM_string_memset/16/4/iterations:1\n"
+      "BM_string_memset/16/8/iterations:1\n"
+      "BM_string_memset/16/16/iterations:1\n"
+      "BM_string_memset/16/32/iterations:1\n"
+      "BM_string_memset/24/0/iterations:1\n"
+      "BM_string_memset/24/1/iterations:1\n"
+      "BM_string_memset/24/2/iterations:1\n"
+      "BM_string_memset/24/4/iterations:1\n"
+      "BM_string_memset/24/8/iterations:1\n"
+      "BM_string_memset/24/16/iterations:1\n"
+      "BM_string_memset/24/32/iterations:1\n"
+      "BM_string_memset/32/0/iterations:1\n"
+      "BM_string_memset/32/1/iterations:1\n"
+      "BM_string_memset/32/2/iterations:1\n"
+      "BM_string_memset/32/4/iterations:1\n"
+      "BM_string_memset/32/8/iterations:1\n"
+      "BM_string_memset/32/16/iterations:1\n"
+      "BM_string_memset/32/32/iterations:1\n"
+      "BM_string_memset/40/0/iterations:1\n"
+      "BM_string_memset/40/1/iterations:1\n"
+      "BM_string_memset/40/2/iterations:1\n"
+      "BM_string_memset/40/4/iterations:1\n"
+      "BM_string_memset/40/8/iterations:1\n"
+      "BM_string_memset/40/16/iterations:1\n"
+      "BM_string_memset/40/32/iterations:1\n"
+      "BM_string_memset/48/0/iterations:1\n"
+      "BM_string_memset/48/1/iterations:1\n"
+      "BM_string_memset/48/2/iterations:1\n"
+      "BM_string_memset/48/4/iterations:1\n"
+      "BM_string_memset/48/8/iterations:1\n"
+      "BM_string_memset/48/16/iterations:1\n"
+      "BM_string_memset/48/32/iterations:1\n"
+      "BM_string_memset/56/0/iterations:1\n"
+      "BM_string_memset/56/1/iterations:1\n"
+      "BM_string_memset/56/2/iterations:1\n"
+      "BM_string_memset/56/4/iterations:1\n"
+      "BM_string_memset/56/8/iterations:1\n"
+      "BM_string_memset/56/16/iterations:1\n"
+      "BM_string_memset/56/32/iterations:1\n"
+      "BM_string_memset/64/0/iterations:1\n"
+      "BM_string_memset/64/1/iterations:1\n"
+      "BM_string_memset/64/2/iterations:1\n"
+      "BM_string_memset/64/4/iterations:1\n"
+      "BM_string_memset/64/8/iterations:1\n"
+      "BM_string_memset/64/16/iterations:1\n"
+      "BM_string_memset/64/32/iterations:1\n"
+      "BM_string_memset/72/0/iterations:1\n"
+      "BM_string_memset/72/1/iterations:1\n"
+      "BM_string_memset/72/2/iterations:1\n"
+      "BM_string_memset/72/4/iterations:1\n"
+      "BM_string_memset/72/8/iterations:1\n"
+      "BM_string_memset/72/16/iterations:1\n"
+      "BM_string_memset/72/32/iterations:1\n"
+      "BM_string_memset/80/0/iterations:1\n"
+      "BM_string_memset/80/1/iterations:1\n"
+      "BM_string_memset/80/2/iterations:1\n"
+      "BM_string_memset/80/4/iterations:1\n"
+      "BM_string_memset/80/8/iterations:1\n"
+      "BM_string_memset/80/16/iterations:1\n"
+      "BM_string_memset/80/32/iterations:1\n"
+      "BM_string_memset/88/0/iterations:1\n"
+      "BM_string_memset/88/1/iterations:1\n"
+      "BM_string_memset/88/2/iterations:1\n"
+      "BM_string_memset/88/4/iterations:1\n"
+      "BM_string_memset/88/8/iterations:1\n"
+      "BM_string_memset/88/16/iterations:1\n"
+      "BM_string_memset/88/32/iterations:1\n"
+      "BM_string_memset/96/0/iterations:1\n"
+      "BM_string_memset/96/1/iterations:1\n"
+      "BM_string_memset/96/2/iterations:1\n"
+      "BM_string_memset/96/4/iterations:1\n"
+      "BM_string_memset/96/8/iterations:1\n"
+      "BM_string_memset/96/16/iterations:1\n"
+      "BM_string_memset/96/32/iterations:1\n"
+      "BM_string_memset/104/0/iterations:1\n"
+      "BM_string_memset/104/1/iterations:1\n"
+      "BM_string_memset/104/2/iterations:1\n"
+      "BM_string_memset/104/4/iterations:1\n"
+      "BM_string_memset/104/8/iterations:1\n"
+      "BM_string_memset/104/16/iterations:1\n"
+      "BM_string_memset/104/32/iterations:1\n"
+      "BM_string_memset/112/0/iterations:1\n"
+      "BM_string_memset/112/1/iterations:1\n"
+      "BM_string_memset/112/2/iterations:1\n"
+      "BM_string_memset/112/4/iterations:1\n"
+      "BM_string_memset/112/8/iterations:1\n"
+      "BM_string_memset/112/16/iterations:1\n"
+      "BM_string_memset/112/32/iterations:1\n"
+      "BM_string_memset/120/0/iterations:1\n"
+      "BM_string_memset/120/1/iterations:1\n"
+      "BM_string_memset/120/2/iterations:1\n"
+      "BM_string_memset/120/4/iterations:1\n"
+      "BM_string_memset/120/8/iterations:1\n"
+      "BM_string_memset/120/16/iterations:1\n"
+      "BM_string_memset/120/32/iterations:1\n"
+      "BM_string_memset/128/0/iterations:1\n"
+      "BM_string_memset/128/1/iterations:1\n"
+      "BM_string_memset/128/2/iterations:1\n"
+      "BM_string_memset/128/4/iterations:1\n"
+      "BM_string_memset/128/8/iterations:1\n"
+      "BM_string_memset/128/16/iterations:1\n"
+      "BM_string_memset/128/32/iterations:1\n"
+      "BM_string_memset/136/0/iterations:1\n"
+      "BM_string_memset/136/1/iterations:1\n"
+      "BM_string_memset/136/2/iterations:1\n"
+      "BM_string_memset/136/4/iterations:1\n"
+      "BM_string_memset/136/8/iterations:1\n"
+      "BM_string_memset/136/16/iterations:1\n"
+      "BM_string_memset/136/32/iterations:1\n"
+      "BM_string_memset/144/0/iterations:1\n"
+      "BM_string_memset/144/1/iterations:1\n"
+      "BM_string_memset/144/2/iterations:1\n"
+      "BM_string_memset/144/4/iterations:1\n"
+      "BM_string_memset/144/8/iterations:1\n"
+      "BM_string_memset/144/16/iterations:1\n"
+      "BM_string_memset/144/32/iterations:1\n"
+      "BM_string_memset/160/0/iterations:1\n"
+      "BM_string_memset/160/1/iterations:1\n"
+      "BM_string_memset/160/2/iterations:1\n"
+      "BM_string_memset/160/4/iterations:1\n"
+      "BM_string_memset/160/8/iterations:1\n"
+      "BM_string_memset/160/16/iterations:1\n"
+      "BM_string_memset/160/32/iterations:1\n"
+      "BM_string_memset/176/0/iterations:1\n"
+      "BM_string_memset/176/1/iterations:1\n"
+      "BM_string_memset/176/2/iterations:1\n"
+      "BM_string_memset/176/4/iterations:1\n"
+      "BM_string_memset/176/8/iterations:1\n"
+      "BM_string_memset/176/16/iterations:1\n"
+      "BM_string_memset/176/32/iterations:1\n"
+      "BM_string_memset/192/0/iterations:1\n"
+      "BM_string_memset/192/1/iterations:1\n"
+      "BM_string_memset/192/2/iterations:1\n"
+      "BM_string_memset/192/4/iterations:1\n"
+      "BM_string_memset/192/8/iterations:1\n"
+      "BM_string_memset/192/16/iterations:1\n"
+      "BM_string_memset/192/32/iterations:1\n"
+      "BM_string_memset/208/0/iterations:1\n"
+      "BM_string_memset/208/1/iterations:1\n"
+      "BM_string_memset/208/2/iterations:1\n"
+      "BM_string_memset/208/4/iterations:1\n"
+      "BM_string_memset/208/8/iterations:1\n"
+      "BM_string_memset/208/16/iterations:1\n"
+      "BM_string_memset/208/32/iterations:1\n"
+      "BM_string_memset/224/0/iterations:1\n"
+      "BM_string_memset/224/1/iterations:1\n"
+      "BM_string_memset/224/2/iterations:1\n"
+      "BM_string_memset/224/4/iterations:1\n"
+      "BM_string_memset/224/8/iterations:1\n"
+      "BM_string_memset/224/16/iterations:1\n"
+      "BM_string_memset/224/32/iterations:1\n"
+      "BM_string_memset/240/0/iterations:1\n"
+      "BM_string_memset/240/1/iterations:1\n"
+      "BM_string_memset/240/2/iterations:1\n"
+      "BM_string_memset/240/4/iterations:1\n"
+      "BM_string_memset/240/8/iterations:1\n"
+      "BM_string_memset/240/16/iterations:1\n"
+      "BM_string_memset/240/32/iterations:1\n"
+      "BM_string_memset/256/0/iterations:1\n"
+      "BM_string_memset/256/1/iterations:1\n"
+      "BM_string_memset/256/2/iterations:1\n"
+      "BM_string_memset/256/4/iterations:1\n"
+      "BM_string_memset/256/8/iterations:1\n"
+      "BM_string_memset/256/16/iterations:1\n"
+      "BM_string_memset/256/32/iterations:1\n"
+      "BM_string_memset/512/0/iterations:1\n"
+      "BM_string_memset/512/1/iterations:1\n"
+      "BM_string_memset/512/2/iterations:1\n"
+      "BM_string_memset/512/4/iterations:1\n"
+      "BM_string_memset/512/8/iterations:1\n"
+      "BM_string_memset/512/16/iterations:1\n"
+      "BM_string_memset/512/32/iterations:1\n"
+      "BM_string_memset/1024/0/iterations:1\n"
+      "BM_string_memset/1024/1/iterations:1\n"
+      "BM_string_memset/1024/2/iterations:1\n"
+      "BM_string_memset/1024/4/iterations:1\n"
+      "BM_string_memset/1024/8/iterations:1\n"
+      "BM_string_memset/1024/16/iterations:1\n"
+      "BM_string_memset/1024/32/iterations:1\n"
+      "BM_string_memset/8192/0/iterations:1\n"
+      "BM_string_memset/8192/1/iterations:1\n"
+      "BM_string_memset/8192/2/iterations:1\n"
+      "BM_string_memset/8192/4/iterations:1\n"
+      "BM_string_memset/8192/8/iterations:1\n"
+      "BM_string_memset/8192/16/iterations:1\n"
+      "BM_string_memset/8192/32/iterations:1\n"
+      "BM_string_memset/16384/0/iterations:1\n"
+      "BM_string_memset/16384/1/iterations:1\n"
+      "BM_string_memset/16384/2/iterations:1\n"
+      "BM_string_memset/16384/4/iterations:1\n"
+      "BM_string_memset/16384/8/iterations:1\n"
+      "BM_string_memset/16384/16/iterations:1\n"
+      "BM_string_memset/16384/32/iterations:1\n"
+      "BM_string_memset/32768/0/iterations:1\n"
+      "BM_string_memset/32768/1/iterations:1\n"
+      "BM_string_memset/32768/2/iterations:1\n"
+      "BM_string_memset/32768/4/iterations:1\n"
+      "BM_string_memset/32768/8/iterations:1\n"
+      "BM_string_memset/32768/16/iterations:1\n"
+      "BM_string_memset/32768/32/iterations:1\n"
+      "BM_string_memset/65536/0/iterations:1\n"
+      "BM_string_memset/65536/1/iterations:1\n"
+      "BM_string_memset/65536/2/iterations:1\n"
+      "BM_string_memset/65536/4/iterations:1\n"
+      "BM_string_memset/65536/8/iterations:1\n"
+      "BM_string_memset/65536/16/iterations:1\n"
+      "BM_string_memset/65536/32/iterations:1\n"
+      "BM_string_memset/131072/0/iterations:1\n"
+      "BM_string_memset/131072/1/iterations:1\n"
+      "BM_string_memset/131072/2/iterations:1\n"
+      "BM_string_memset/131072/4/iterations:1\n"
+      "BM_string_memset/131072/8/iterations:1\n"
+      "BM_string_memset/131072/16/iterations:1\n"
+      "BM_string_memset/131072/32/iterations:1\n"
+      "BM_string_memset/262144/0/iterations:1\n"
+      "BM_string_memset/262144/1/iterations:1\n"
+      "BM_string_memset/262144/2/iterations:1\n"
+      "BM_string_memset/262144/4/iterations:1\n"
+      "BM_string_memset/262144/8/iterations:1\n"
+      "BM_string_memset/262144/16/iterations:1\n"
+      "BM_string_memset/262144/32/iterations:1\n"
+      "BM_string_memset/524288/0/iterations:1\n"
+      "BM_string_memset/524288/1/iterations:1\n"
+      "BM_string_memset/524288/2/iterations:1\n"
+      "BM_string_memset/524288/4/iterations:1\n"
+      "BM_string_memset/524288/8/iterations:1\n"
+      "BM_string_memset/524288/16/iterations:1\n"
+      "BM_string_memset/524288/32/iterations:1\n"
+      "BM_string_memset/1048576/0/iterations:1\n"
+      "BM_string_memset/1048576/1/iterations:1\n"
+      "BM_string_memset/1048576/2/iterations:1\n"
+      "BM_string_memset/1048576/4/iterations:1\n"
+      "BM_string_memset/1048576/8/iterations:1\n"
+      "BM_string_memset/1048576/16/iterations:1\n"
+      "BM_string_memset/1048576/32/iterations:1\n"
+      "BM_string_memset/2097152/0/iterations:1\n"
+      "BM_string_memset/2097152/1/iterations:1\n"
+      "BM_string_memset/2097152/2/iterations:1\n"
+      "BM_string_memset/2097152/4/iterations:1\n"
+      "BM_string_memset/2097152/8/iterations:1\n"
+      "BM_string_memset/2097152/16/iterations:1\n"
+      "BM_string_memset/2097152/32/iterations:1\n";
 
   Verify(expected, 0,
          std::vector<const char*>{GetBionicXmlArg("test_alignment_onebuf.xml").c_str()});
@@ -888,1965 +898,1967 @@
 
 TEST_F(SystemTests, alignment_twobuf) {
   std::string expected =
-    "BM_string_strcpy/8/0/0/iterations:1\n"
-    "BM_string_strcpy/64/0/0/iterations:1\n"
-    "BM_string_strcpy/512/0/0/iterations:1\n"
-    "BM_string_strcpy/1024/0/0/iterations:1\n"
-    "BM_string_strcpy/8192/0/0/iterations:1\n"
-    "BM_string_strcpy/16384/0/0/iterations:1\n"
-    "BM_string_strcpy/32768/0/0/iterations:1\n"
-    "BM_string_strcpy/65536/0/0/iterations:1\n"
-    "BM_string_strcpy/131072/0/0/iterations:1\n"
-    "BM_string_memcpy/1/0/0/iterations:1\n"
-    "BM_string_memcpy/2/0/0/iterations:1\n"
-    "BM_string_memcpy/3/0/0/iterations:1\n"
-    "BM_string_memcpy/4/0/0/iterations:1\n"
-    "BM_string_memcpy/5/0/0/iterations:1\n"
-    "BM_string_memcpy/6/0/0/iterations:1\n"
-    "BM_string_memcpy/7/0/0/iterations:1\n"
-    "BM_string_memcpy/8/0/0/iterations:1\n"
-    "BM_string_memcpy/9/0/0/iterations:1\n"
-    "BM_string_memcpy/10/0/0/iterations:1\n"
-    "BM_string_memcpy/11/0/0/iterations:1\n"
-    "BM_string_memcpy/12/0/0/iterations:1\n"
-    "BM_string_memcpy/13/0/0/iterations:1\n"
-    "BM_string_memcpy/14/0/0/iterations:1\n"
-    "BM_string_memcpy/15/0/0/iterations:1\n"
-    "BM_string_memcpy/16/0/0/iterations:1\n"
-    "BM_string_memcpy/24/0/0/iterations:1\n"
-    "BM_string_memcpy/32/0/0/iterations:1\n"
-    "BM_string_memcpy/40/0/0/iterations:1\n"
-    "BM_string_memcpy/48/0/0/iterations:1\n"
-    "BM_string_memcpy/56/0/0/iterations:1\n"
-    "BM_string_memcpy/64/0/0/iterations:1\n"
-    "BM_string_memcpy/72/0/0/iterations:1\n"
-    "BM_string_memcpy/80/0/0/iterations:1\n"
-    "BM_string_memcpy/88/0/0/iterations:1\n"
-    "BM_string_memcpy/96/0/0/iterations:1\n"
-    "BM_string_memcpy/104/0/0/iterations:1\n"
-    "BM_string_memcpy/112/0/0/iterations:1\n"
-    "BM_string_memcpy/120/0/0/iterations:1\n"
-    "BM_string_memcpy/128/0/0/iterations:1\n"
-    "BM_string_memcpy/136/0/0/iterations:1\n"
-    "BM_string_memcpy/144/0/0/iterations:1\n"
-    "BM_string_memcpy/160/0/0/iterations:1\n"
-    "BM_string_memcpy/176/0/0/iterations:1\n"
-    "BM_string_memcpy/192/0/0/iterations:1\n"
-    "BM_string_memcpy/208/0/0/iterations:1\n"
-    "BM_string_memcpy/224/0/0/iterations:1\n"
-    "BM_string_memcpy/240/0/0/iterations:1\n"
-    "BM_string_memcpy/256/0/0/iterations:1\n"
-    "BM_string_strcpy/512/0/0/iterations:1\n"
-    "BM_string_strcpy/1024/0/0/iterations:1\n"
-    "BM_string_strcpy/8192/0/0/iterations:1\n"
-    "BM_string_strcpy/16384/0/0/iterations:1\n"
-    "BM_string_strcpy/32768/0/0/iterations:1\n"
-    "BM_string_strcpy/65536/0/0/iterations:1\n"
-    "BM_string_strcpy/131072/0/0/iterations:1\n"
-    "BM_string_memcpy/262144/0/0/iterations:1\n"
-    "BM_string_memcpy/524288/0/0/iterations:1\n"
-    "BM_string_memcpy/1048576/0/0/iterations:1\n"
-    "BM_string_memcpy/2097152/0/0/iterations:1\n"
-    "BM_string_strcpy/1/0/0/iterations:1\n"
-    "BM_string_strcpy/2/0/0/iterations:1\n"
-    "BM_string_strcpy/3/0/0/iterations:1\n"
-    "BM_string_strcpy/4/0/0/iterations:1\n"
-    "BM_string_strcpy/5/0/0/iterations:1\n"
-    "BM_string_strcpy/6/0/0/iterations:1\n"
-    "BM_string_strcpy/7/0/0/iterations:1\n"
-    "BM_string_strcpy/8/0/0/iterations:1\n"
-    "BM_string_strcpy/9/0/0/iterations:1\n"
-    "BM_string_strcpy/10/0/0/iterations:1\n"
-    "BM_string_strcpy/11/0/0/iterations:1\n"
-    "BM_string_strcpy/12/0/0/iterations:1\n"
-    "BM_string_strcpy/13/0/0/iterations:1\n"
-    "BM_string_strcpy/14/0/0/iterations:1\n"
-    "BM_string_strcpy/15/0/0/iterations:1\n"
-    "BM_string_strcpy/16/0/0/iterations:1\n"
-    "BM_string_strcpy/24/0/0/iterations:1\n"
-    "BM_string_strcpy/32/0/0/iterations:1\n"
-    "BM_string_strcpy/40/0/0/iterations:1\n"
-    "BM_string_strcpy/48/0/0/iterations:1\n"
-    "BM_string_strcpy/56/0/0/iterations:1\n"
-    "BM_string_strcpy/64/0/0/iterations:1\n"
-    "BM_string_strcpy/72/0/0/iterations:1\n"
-    "BM_string_strcpy/80/0/0/iterations:1\n"
-    "BM_string_strcpy/88/0/0/iterations:1\n"
-    "BM_string_strcpy/96/0/0/iterations:1\n"
-    "BM_string_strcpy/104/0/0/iterations:1\n"
-    "BM_string_strcpy/112/0/0/iterations:1\n"
-    "BM_string_strcpy/120/0/0/iterations:1\n"
-    "BM_string_strcpy/128/0/0/iterations:1\n"
-    "BM_string_strcpy/136/0/0/iterations:1\n"
-    "BM_string_strcpy/144/0/0/iterations:1\n"
-    "BM_string_strcpy/160/0/0/iterations:1\n"
-    "BM_string_strcpy/176/0/0/iterations:1\n"
-    "BM_string_strcpy/192/0/0/iterations:1\n"
-    "BM_string_strcpy/208/0/0/iterations:1\n"
-    "BM_string_strcpy/224/0/0/iterations:1\n"
-    "BM_string_strcpy/240/0/0/iterations:1\n"
-    "BM_string_strcpy/256/0/0/iterations:1\n"
-    "BM_string_strcpy/512/0/0/iterations:1\n"
-    "BM_string_strcpy/1024/0/0/iterations:1\n"
-    "BM_string_strcpy/8192/0/0/iterations:1\n"
-    "BM_string_strcpy/16384/0/0/iterations:1\n"
-    "BM_string_strcpy/32768/0/0/iterations:1\n"
-    "BM_string_strcpy/65536/0/0/iterations:1\n"
-    "BM_string_strcpy/131072/0/0/iterations:1\n"
-    "BM_string_strcpy/262144/0/0/iterations:1\n"
-    "BM_string_strcpy/524288/0/0/iterations:1\n"
-    "BM_string_strcpy/1048576/0/0/iterations:1\n"
-    "BM_string_strcpy/2097152/0/0/iterations:1\n"
-    "BM_string_memcpy/1/0/0/iterations:1\n"
-    "BM_string_memcpy/1/1/1/iterations:1\n"
-    "BM_string_memcpy/1/1/2/iterations:1\n"
-    "BM_string_memcpy/1/1/4/iterations:1\n"
-    "BM_string_memcpy/1/1/8/iterations:1\n"
-    "BM_string_memcpy/1/1/16/iterations:1\n"
-    "BM_string_memcpy/1/1/32/iterations:1\n"
-    "BM_string_memcpy/1/2/1/iterations:1\n"
-    "BM_string_memcpy/1/2/2/iterations:1\n"
-    "BM_string_memcpy/1/2/4/iterations:1\n"
-    "BM_string_memcpy/1/2/8/iterations:1\n"
-    "BM_string_memcpy/1/2/16/iterations:1\n"
-    "BM_string_memcpy/1/2/32/iterations:1\n"
-    "BM_string_memcpy/1/4/1/iterations:1\n"
-    "BM_string_memcpy/1/4/2/iterations:1\n"
-    "BM_string_memcpy/1/4/4/iterations:1\n"
-    "BM_string_memcpy/1/4/8/iterations:1\n"
-    "BM_string_memcpy/1/4/16/iterations:1\n"
-    "BM_string_memcpy/1/4/32/iterations:1\n"
-    "BM_string_memcpy/1/8/1/iterations:1\n"
-    "BM_string_memcpy/1/8/2/iterations:1\n"
-    "BM_string_memcpy/1/8/4/iterations:1\n"
-    "BM_string_memcpy/1/8/8/iterations:1\n"
-    "BM_string_memcpy/1/8/16/iterations:1\n"
-    "BM_string_memcpy/1/8/32/iterations:1\n"
-    "BM_string_memcpy/1/16/1/iterations:1\n"
-    "BM_string_memcpy/1/16/2/iterations:1\n"
-    "BM_string_memcpy/1/16/4/iterations:1\n"
-    "BM_string_memcpy/1/16/8/iterations:1\n"
-    "BM_string_memcpy/1/16/16/iterations:1\n"
-    "BM_string_memcpy/1/16/32/iterations:1\n"
-    "BM_string_memcpy/1/32/1/iterations:1\n"
-    "BM_string_memcpy/1/32/2/iterations:1\n"
-    "BM_string_memcpy/1/32/4/iterations:1\n"
-    "BM_string_memcpy/1/32/8/iterations:1\n"
-    "BM_string_memcpy/1/32/16/iterations:1\n"
-    "BM_string_memcpy/1/32/32/iterations:1\n"
-    "BM_string_memcpy/2/0/0/iterations:1\n"
-    "BM_string_memcpy/2/1/1/iterations:1\n"
-    "BM_string_memcpy/2/1/2/iterations:1\n"
-    "BM_string_memcpy/2/1/4/iterations:1\n"
-    "BM_string_memcpy/2/1/8/iterations:1\n"
-    "BM_string_memcpy/2/1/16/iterations:1\n"
-    "BM_string_memcpy/2/1/32/iterations:1\n"
-    "BM_string_memcpy/2/2/1/iterations:1\n"
-    "BM_string_memcpy/2/2/2/iterations:1\n"
-    "BM_string_memcpy/2/2/4/iterations:1\n"
-    "BM_string_memcpy/2/2/8/iterations:1\n"
-    "BM_string_memcpy/2/2/16/iterations:1\n"
-    "BM_string_memcpy/2/2/32/iterations:1\n"
-    "BM_string_memcpy/2/4/1/iterations:1\n"
-    "BM_string_memcpy/2/4/2/iterations:1\n"
-    "BM_string_memcpy/2/4/4/iterations:1\n"
-    "BM_string_memcpy/2/4/8/iterations:1\n"
-    "BM_string_memcpy/2/4/16/iterations:1\n"
-    "BM_string_memcpy/2/4/32/iterations:1\n"
-    "BM_string_memcpy/2/8/1/iterations:1\n"
-    "BM_string_memcpy/2/8/2/iterations:1\n"
-    "BM_string_memcpy/2/8/4/iterations:1\n"
-    "BM_string_memcpy/2/8/8/iterations:1\n"
-    "BM_string_memcpy/2/8/16/iterations:1\n"
-    "BM_string_memcpy/2/8/32/iterations:1\n"
-    "BM_string_memcpy/2/16/1/iterations:1\n"
-    "BM_string_memcpy/2/16/2/iterations:1\n"
-    "BM_string_memcpy/2/16/4/iterations:1\n"
-    "BM_string_memcpy/2/16/8/iterations:1\n"
-    "BM_string_memcpy/2/16/16/iterations:1\n"
-    "BM_string_memcpy/2/16/32/iterations:1\n"
-    "BM_string_memcpy/2/32/1/iterations:1\n"
-    "BM_string_memcpy/2/32/2/iterations:1\n"
-    "BM_string_memcpy/2/32/4/iterations:1\n"
-    "BM_string_memcpy/2/32/8/iterations:1\n"
-    "BM_string_memcpy/2/32/16/iterations:1\n"
-    "BM_string_memcpy/2/32/32/iterations:1\n"
-    "BM_string_memcpy/3/0/0/iterations:1\n"
-    "BM_string_memcpy/3/1/1/iterations:1\n"
-    "BM_string_memcpy/3/1/2/iterations:1\n"
-    "BM_string_memcpy/3/1/4/iterations:1\n"
-    "BM_string_memcpy/3/1/8/iterations:1\n"
-    "BM_string_memcpy/3/1/16/iterations:1\n"
-    "BM_string_memcpy/3/1/32/iterations:1\n"
-    "BM_string_memcpy/3/2/1/iterations:1\n"
-    "BM_string_memcpy/3/2/2/iterations:1\n"
-    "BM_string_memcpy/3/2/4/iterations:1\n"
-    "BM_string_memcpy/3/2/8/iterations:1\n"
-    "BM_string_memcpy/3/2/16/iterations:1\n"
-    "BM_string_memcpy/3/2/32/iterations:1\n"
-    "BM_string_memcpy/3/4/1/iterations:1\n"
-    "BM_string_memcpy/3/4/2/iterations:1\n"
-    "BM_string_memcpy/3/4/4/iterations:1\n"
-    "BM_string_memcpy/3/4/8/iterations:1\n"
-    "BM_string_memcpy/3/4/16/iterations:1\n"
-    "BM_string_memcpy/3/4/32/iterations:1\n"
-    "BM_string_memcpy/3/8/1/iterations:1\n"
-    "BM_string_memcpy/3/8/2/iterations:1\n"
-    "BM_string_memcpy/3/8/4/iterations:1\n"
-    "BM_string_memcpy/3/8/8/iterations:1\n"
-    "BM_string_memcpy/3/8/16/iterations:1\n"
-    "BM_string_memcpy/3/8/32/iterations:1\n"
-    "BM_string_memcpy/3/16/1/iterations:1\n"
-    "BM_string_memcpy/3/16/2/iterations:1\n"
-    "BM_string_memcpy/3/16/4/iterations:1\n"
-    "BM_string_memcpy/3/16/8/iterations:1\n"
-    "BM_string_memcpy/3/16/16/iterations:1\n"
-    "BM_string_memcpy/3/16/32/iterations:1\n"
-    "BM_string_memcpy/3/32/1/iterations:1\n"
-    "BM_string_memcpy/3/32/2/iterations:1\n"
-    "BM_string_memcpy/3/32/4/iterations:1\n"
-    "BM_string_memcpy/3/32/8/iterations:1\n"
-    "BM_string_memcpy/3/32/16/iterations:1\n"
-    "BM_string_memcpy/3/32/32/iterations:1\n"
-    "BM_string_memcpy/4/0/0/iterations:1\n"
-    "BM_string_memcpy/4/1/1/iterations:1\n"
-    "BM_string_memcpy/4/1/2/iterations:1\n"
-    "BM_string_memcpy/4/1/4/iterations:1\n"
-    "BM_string_memcpy/4/1/8/iterations:1\n"
-    "BM_string_memcpy/4/1/16/iterations:1\n"
-    "BM_string_memcpy/4/1/32/iterations:1\n"
-    "BM_string_memcpy/4/2/1/iterations:1\n"
-    "BM_string_memcpy/4/2/2/iterations:1\n"
-    "BM_string_memcpy/4/2/4/iterations:1\n"
-    "BM_string_memcpy/4/2/8/iterations:1\n"
-    "BM_string_memcpy/4/2/16/iterations:1\n"
-    "BM_string_memcpy/4/2/32/iterations:1\n"
-    "BM_string_memcpy/4/4/1/iterations:1\n"
-    "BM_string_memcpy/4/4/2/iterations:1\n"
-    "BM_string_memcpy/4/4/4/iterations:1\n"
-    "BM_string_memcpy/4/4/8/iterations:1\n"
-    "BM_string_memcpy/4/4/16/iterations:1\n"
-    "BM_string_memcpy/4/4/32/iterations:1\n"
-    "BM_string_memcpy/4/8/1/iterations:1\n"
-    "BM_string_memcpy/4/8/2/iterations:1\n"
-    "BM_string_memcpy/4/8/4/iterations:1\n"
-    "BM_string_memcpy/4/8/8/iterations:1\n"
-    "BM_string_memcpy/4/8/16/iterations:1\n"
-    "BM_string_memcpy/4/8/32/iterations:1\n"
-    "BM_string_memcpy/4/16/1/iterations:1\n"
-    "BM_string_memcpy/4/16/2/iterations:1\n"
-    "BM_string_memcpy/4/16/4/iterations:1\n"
-    "BM_string_memcpy/4/16/8/iterations:1\n"
-    "BM_string_memcpy/4/16/16/iterations:1\n"
-    "BM_string_memcpy/4/16/32/iterations:1\n"
-    "BM_string_memcpy/4/32/1/iterations:1\n"
-    "BM_string_memcpy/4/32/2/iterations:1\n"
-    "BM_string_memcpy/4/32/4/iterations:1\n"
-    "BM_string_memcpy/4/32/8/iterations:1\n"
-    "BM_string_memcpy/4/32/16/iterations:1\n"
-    "BM_string_memcpy/4/32/32/iterations:1\n"
-    "BM_string_memcpy/5/0/0/iterations:1\n"
-    "BM_string_memcpy/5/1/1/iterations:1\n"
-    "BM_string_memcpy/5/1/2/iterations:1\n"
-    "BM_string_memcpy/5/1/4/iterations:1\n"
-    "BM_string_memcpy/5/1/8/iterations:1\n"
-    "BM_string_memcpy/5/1/16/iterations:1\n"
-    "BM_string_memcpy/5/1/32/iterations:1\n"
-    "BM_string_memcpy/5/2/1/iterations:1\n"
-    "BM_string_memcpy/5/2/2/iterations:1\n"
-    "BM_string_memcpy/5/2/4/iterations:1\n"
-    "BM_string_memcpy/5/2/8/iterations:1\n"
-    "BM_string_memcpy/5/2/16/iterations:1\n"
-    "BM_string_memcpy/5/2/32/iterations:1\n"
-    "BM_string_memcpy/5/4/1/iterations:1\n"
-    "BM_string_memcpy/5/4/2/iterations:1\n"
-    "BM_string_memcpy/5/4/4/iterations:1\n"
-    "BM_string_memcpy/5/4/8/iterations:1\n"
-    "BM_string_memcpy/5/4/16/iterations:1\n"
-    "BM_string_memcpy/5/4/32/iterations:1\n"
-    "BM_string_memcpy/5/8/1/iterations:1\n"
-    "BM_string_memcpy/5/8/2/iterations:1\n"
-    "BM_string_memcpy/5/8/4/iterations:1\n"
-    "BM_string_memcpy/5/8/8/iterations:1\n"
-    "BM_string_memcpy/5/8/16/iterations:1\n"
-    "BM_string_memcpy/5/8/32/iterations:1\n"
-    "BM_string_memcpy/5/16/1/iterations:1\n"
-    "BM_string_memcpy/5/16/2/iterations:1\n"
-    "BM_string_memcpy/5/16/4/iterations:1\n"
-    "BM_string_memcpy/5/16/8/iterations:1\n"
-    "BM_string_memcpy/5/16/16/iterations:1\n"
-    "BM_string_memcpy/5/16/32/iterations:1\n"
-    "BM_string_memcpy/5/32/1/iterations:1\n"
-    "BM_string_memcpy/5/32/2/iterations:1\n"
-    "BM_string_memcpy/5/32/4/iterations:1\n"
-    "BM_string_memcpy/5/32/8/iterations:1\n"
-    "BM_string_memcpy/5/32/16/iterations:1\n"
-    "BM_string_memcpy/5/32/32/iterations:1\n"
-    "BM_string_memcpy/6/0/0/iterations:1\n"
-    "BM_string_memcpy/6/1/1/iterations:1\n"
-    "BM_string_memcpy/6/1/2/iterations:1\n"
-    "BM_string_memcpy/6/1/4/iterations:1\n"
-    "BM_string_memcpy/6/1/8/iterations:1\n"
-    "BM_string_memcpy/6/1/16/iterations:1\n"
-    "BM_string_memcpy/6/1/32/iterations:1\n"
-    "BM_string_memcpy/6/2/1/iterations:1\n"
-    "BM_string_memcpy/6/2/2/iterations:1\n"
-    "BM_string_memcpy/6/2/4/iterations:1\n"
-    "BM_string_memcpy/6/2/8/iterations:1\n"
-    "BM_string_memcpy/6/2/16/iterations:1\n"
-    "BM_string_memcpy/6/2/32/iterations:1\n"
-    "BM_string_memcpy/6/4/1/iterations:1\n"
-    "BM_string_memcpy/6/4/2/iterations:1\n"
-    "BM_string_memcpy/6/4/4/iterations:1\n"
-    "BM_string_memcpy/6/4/8/iterations:1\n"
-    "BM_string_memcpy/6/4/16/iterations:1\n"
-    "BM_string_memcpy/6/4/32/iterations:1\n"
-    "BM_string_memcpy/6/8/1/iterations:1\n"
-    "BM_string_memcpy/6/8/2/iterations:1\n"
-    "BM_string_memcpy/6/8/4/iterations:1\n"
-    "BM_string_memcpy/6/8/8/iterations:1\n"
-    "BM_string_memcpy/6/8/16/iterations:1\n"
-    "BM_string_memcpy/6/8/32/iterations:1\n"
-    "BM_string_memcpy/6/16/1/iterations:1\n"
-    "BM_string_memcpy/6/16/2/iterations:1\n"
-    "BM_string_memcpy/6/16/4/iterations:1\n"
-    "BM_string_memcpy/6/16/8/iterations:1\n"
-    "BM_string_memcpy/6/16/16/iterations:1\n"
-    "BM_string_memcpy/6/16/32/iterations:1\n"
-    "BM_string_memcpy/6/32/1/iterations:1\n"
-    "BM_string_memcpy/6/32/2/iterations:1\n"
-    "BM_string_memcpy/6/32/4/iterations:1\n"
-    "BM_string_memcpy/6/32/8/iterations:1\n"
-    "BM_string_memcpy/6/32/16/iterations:1\n"
-    "BM_string_memcpy/6/32/32/iterations:1\n"
-    "BM_string_memcpy/7/0/0/iterations:1\n"
-    "BM_string_memcpy/7/1/1/iterations:1\n"
-    "BM_string_memcpy/7/1/2/iterations:1\n"
-    "BM_string_memcpy/7/1/4/iterations:1\n"
-    "BM_string_memcpy/7/1/8/iterations:1\n"
-    "BM_string_memcpy/7/1/16/iterations:1\n"
-    "BM_string_memcpy/7/1/32/iterations:1\n"
-    "BM_string_memcpy/7/2/1/iterations:1\n"
-    "BM_string_memcpy/7/2/2/iterations:1\n"
-    "BM_string_memcpy/7/2/4/iterations:1\n"
-    "BM_string_memcpy/7/2/8/iterations:1\n"
-    "BM_string_memcpy/7/2/16/iterations:1\n"
-    "BM_string_memcpy/7/2/32/iterations:1\n"
-    "BM_string_memcpy/7/4/1/iterations:1\n"
-    "BM_string_memcpy/7/4/2/iterations:1\n"
-    "BM_string_memcpy/7/4/4/iterations:1\n"
-    "BM_string_memcpy/7/4/8/iterations:1\n"
-    "BM_string_memcpy/7/4/16/iterations:1\n"
-    "BM_string_memcpy/7/4/32/iterations:1\n"
-    "BM_string_memcpy/7/8/1/iterations:1\n"
-    "BM_string_memcpy/7/8/2/iterations:1\n"
-    "BM_string_memcpy/7/8/4/iterations:1\n"
-    "BM_string_memcpy/7/8/8/iterations:1\n"
-    "BM_string_memcpy/7/8/16/iterations:1\n"
-    "BM_string_memcpy/7/8/32/iterations:1\n"
-    "BM_string_memcpy/7/16/1/iterations:1\n"
-    "BM_string_memcpy/7/16/2/iterations:1\n"
-    "BM_string_memcpy/7/16/4/iterations:1\n"
-    "BM_string_memcpy/7/16/8/iterations:1\n"
-    "BM_string_memcpy/7/16/16/iterations:1\n"
-    "BM_string_memcpy/7/16/32/iterations:1\n"
-    "BM_string_memcpy/7/32/1/iterations:1\n"
-    "BM_string_memcpy/7/32/2/iterations:1\n"
-    "BM_string_memcpy/7/32/4/iterations:1\n"
-    "BM_string_memcpy/7/32/8/iterations:1\n"
-    "BM_string_memcpy/7/32/16/iterations:1\n"
-    "BM_string_memcpy/7/32/32/iterations:1\n"
-    "BM_string_memcpy/8/0/0/iterations:1\n"
-    "BM_string_memcpy/8/1/1/iterations:1\n"
-    "BM_string_memcpy/8/1/2/iterations:1\n"
-    "BM_string_memcpy/8/1/4/iterations:1\n"
-    "BM_string_memcpy/8/1/8/iterations:1\n"
-    "BM_string_memcpy/8/1/16/iterations:1\n"
-    "BM_string_memcpy/8/1/32/iterations:1\n"
-    "BM_string_memcpy/8/2/1/iterations:1\n"
-    "BM_string_memcpy/8/2/2/iterations:1\n"
-    "BM_string_memcpy/8/2/4/iterations:1\n"
-    "BM_string_memcpy/8/2/8/iterations:1\n"
-    "BM_string_memcpy/8/2/16/iterations:1\n"
-    "BM_string_memcpy/8/2/32/iterations:1\n"
-    "BM_string_memcpy/8/4/1/iterations:1\n"
-    "BM_string_memcpy/8/4/2/iterations:1\n"
-    "BM_string_memcpy/8/4/4/iterations:1\n"
-    "BM_string_memcpy/8/4/8/iterations:1\n"
-    "BM_string_memcpy/8/4/16/iterations:1\n"
-    "BM_string_memcpy/8/4/32/iterations:1\n"
-    "BM_string_memcpy/8/8/1/iterations:1\n"
-    "BM_string_memcpy/8/8/2/iterations:1\n"
-    "BM_string_memcpy/8/8/4/iterations:1\n"
-    "BM_string_memcpy/8/8/8/iterations:1\n"
-    "BM_string_memcpy/8/8/16/iterations:1\n"
-    "BM_string_memcpy/8/8/32/iterations:1\n"
-    "BM_string_memcpy/8/16/1/iterations:1\n"
-    "BM_string_memcpy/8/16/2/iterations:1\n"
-    "BM_string_memcpy/8/16/4/iterations:1\n"
-    "BM_string_memcpy/8/16/8/iterations:1\n"
-    "BM_string_memcpy/8/16/16/iterations:1\n"
-    "BM_string_memcpy/8/16/32/iterations:1\n"
-    "BM_string_memcpy/8/32/1/iterations:1\n"
-    "BM_string_memcpy/8/32/2/iterations:1\n"
-    "BM_string_memcpy/8/32/4/iterations:1\n"
-    "BM_string_memcpy/8/32/8/iterations:1\n"
-    "BM_string_memcpy/8/32/16/iterations:1\n"
-    "BM_string_memcpy/8/32/32/iterations:1\n"
-    "BM_string_memcpy/9/0/0/iterations:1\n"
-    "BM_string_memcpy/9/1/1/iterations:1\n"
-    "BM_string_memcpy/9/1/2/iterations:1\n"
-    "BM_string_memcpy/9/1/4/iterations:1\n"
-    "BM_string_memcpy/9/1/8/iterations:1\n"
-    "BM_string_memcpy/9/1/16/iterations:1\n"
-    "BM_string_memcpy/9/1/32/iterations:1\n"
-    "BM_string_memcpy/9/2/1/iterations:1\n"
-    "BM_string_memcpy/9/2/2/iterations:1\n"
-    "BM_string_memcpy/9/2/4/iterations:1\n"
-    "BM_string_memcpy/9/2/8/iterations:1\n"
-    "BM_string_memcpy/9/2/16/iterations:1\n"
-    "BM_string_memcpy/9/2/32/iterations:1\n"
-    "BM_string_memcpy/9/4/1/iterations:1\n"
-    "BM_string_memcpy/9/4/2/iterations:1\n"
-    "BM_string_memcpy/9/4/4/iterations:1\n"
-    "BM_string_memcpy/9/4/8/iterations:1\n"
-    "BM_string_memcpy/9/4/16/iterations:1\n"
-    "BM_string_memcpy/9/4/32/iterations:1\n"
-    "BM_string_memcpy/9/8/1/iterations:1\n"
-    "BM_string_memcpy/9/8/2/iterations:1\n"
-    "BM_string_memcpy/9/8/4/iterations:1\n"
-    "BM_string_memcpy/9/8/8/iterations:1\n"
-    "BM_string_memcpy/9/8/16/iterations:1\n"
-    "BM_string_memcpy/9/8/32/iterations:1\n"
-    "BM_string_memcpy/9/16/1/iterations:1\n"
-    "BM_string_memcpy/9/16/2/iterations:1\n"
-    "BM_string_memcpy/9/16/4/iterations:1\n"
-    "BM_string_memcpy/9/16/8/iterations:1\n"
-    "BM_string_memcpy/9/16/16/iterations:1\n"
-    "BM_string_memcpy/9/16/32/iterations:1\n"
-    "BM_string_memcpy/9/32/1/iterations:1\n"
-    "BM_string_memcpy/9/32/2/iterations:1\n"
-    "BM_string_memcpy/9/32/4/iterations:1\n"
-    "BM_string_memcpy/9/32/8/iterations:1\n"
-    "BM_string_memcpy/9/32/16/iterations:1\n"
-    "BM_string_memcpy/9/32/32/iterations:1\n"
-    "BM_string_memcpy/10/0/0/iterations:1\n"
-    "BM_string_memcpy/10/1/1/iterations:1\n"
-    "BM_string_memcpy/10/1/2/iterations:1\n"
-    "BM_string_memcpy/10/1/4/iterations:1\n"
-    "BM_string_memcpy/10/1/8/iterations:1\n"
-    "BM_string_memcpy/10/1/16/iterations:1\n"
-    "BM_string_memcpy/10/1/32/iterations:1\n"
-    "BM_string_memcpy/10/2/1/iterations:1\n"
-    "BM_string_memcpy/10/2/2/iterations:1\n"
-    "BM_string_memcpy/10/2/4/iterations:1\n"
-    "BM_string_memcpy/10/2/8/iterations:1\n"
-    "BM_string_memcpy/10/2/16/iterations:1\n"
-    "BM_string_memcpy/10/2/32/iterations:1\n"
-    "BM_string_memcpy/10/4/1/iterations:1\n"
-    "BM_string_memcpy/10/4/2/iterations:1\n"
-    "BM_string_memcpy/10/4/4/iterations:1\n"
-    "BM_string_memcpy/10/4/8/iterations:1\n"
-    "BM_string_memcpy/10/4/16/iterations:1\n"
-    "BM_string_memcpy/10/4/32/iterations:1\n"
-    "BM_string_memcpy/10/8/1/iterations:1\n"
-    "BM_string_memcpy/10/8/2/iterations:1\n"
-    "BM_string_memcpy/10/8/4/iterations:1\n"
-    "BM_string_memcpy/10/8/8/iterations:1\n"
-    "BM_string_memcpy/10/8/16/iterations:1\n"
-    "BM_string_memcpy/10/8/32/iterations:1\n"
-    "BM_string_memcpy/10/16/1/iterations:1\n"
-    "BM_string_memcpy/10/16/2/iterations:1\n"
-    "BM_string_memcpy/10/16/4/iterations:1\n"
-    "BM_string_memcpy/10/16/8/iterations:1\n"
-    "BM_string_memcpy/10/16/16/iterations:1\n"
-    "BM_string_memcpy/10/16/32/iterations:1\n"
-    "BM_string_memcpy/10/32/1/iterations:1\n"
-    "BM_string_memcpy/10/32/2/iterations:1\n"
-    "BM_string_memcpy/10/32/4/iterations:1\n"
-    "BM_string_memcpy/10/32/8/iterations:1\n"
-    "BM_string_memcpy/10/32/16/iterations:1\n"
-    "BM_string_memcpy/10/32/32/iterations:1\n"
-    "BM_string_memcpy/11/0/0/iterations:1\n"
-    "BM_string_memcpy/11/1/1/iterations:1\n"
-    "BM_string_memcpy/11/1/2/iterations:1\n"
-    "BM_string_memcpy/11/1/4/iterations:1\n"
-    "BM_string_memcpy/11/1/8/iterations:1\n"
-    "BM_string_memcpy/11/1/16/iterations:1\n"
-    "BM_string_memcpy/11/1/32/iterations:1\n"
-    "BM_string_memcpy/11/2/1/iterations:1\n"
-    "BM_string_memcpy/11/2/2/iterations:1\n"
-    "BM_string_memcpy/11/2/4/iterations:1\n"
-    "BM_string_memcpy/11/2/8/iterations:1\n"
-    "BM_string_memcpy/11/2/16/iterations:1\n"
-    "BM_string_memcpy/11/2/32/iterations:1\n"
-    "BM_string_memcpy/11/4/1/iterations:1\n"
-    "BM_string_memcpy/11/4/2/iterations:1\n"
-    "BM_string_memcpy/11/4/4/iterations:1\n"
-    "BM_string_memcpy/11/4/8/iterations:1\n"
-    "BM_string_memcpy/11/4/16/iterations:1\n"
-    "BM_string_memcpy/11/4/32/iterations:1\n"
-    "BM_string_memcpy/11/8/1/iterations:1\n"
-    "BM_string_memcpy/11/8/2/iterations:1\n"
-    "BM_string_memcpy/11/8/4/iterations:1\n"
-    "BM_string_memcpy/11/8/8/iterations:1\n"
-    "BM_string_memcpy/11/8/16/iterations:1\n"
-    "BM_string_memcpy/11/8/32/iterations:1\n"
-    "BM_string_memcpy/11/16/1/iterations:1\n"
-    "BM_string_memcpy/11/16/2/iterations:1\n"
-    "BM_string_memcpy/11/16/4/iterations:1\n"
-    "BM_string_memcpy/11/16/8/iterations:1\n"
-    "BM_string_memcpy/11/16/16/iterations:1\n"
-    "BM_string_memcpy/11/16/32/iterations:1\n"
-    "BM_string_memcpy/11/32/1/iterations:1\n"
-    "BM_string_memcpy/11/32/2/iterations:1\n"
-    "BM_string_memcpy/11/32/4/iterations:1\n"
-    "BM_string_memcpy/11/32/8/iterations:1\n"
-    "BM_string_memcpy/11/32/16/iterations:1\n"
-    "BM_string_memcpy/11/32/32/iterations:1\n"
-    "BM_string_memcpy/12/0/0/iterations:1\n"
-    "BM_string_memcpy/12/1/1/iterations:1\n"
-    "BM_string_memcpy/12/1/2/iterations:1\n"
-    "BM_string_memcpy/12/1/4/iterations:1\n"
-    "BM_string_memcpy/12/1/8/iterations:1\n"
-    "BM_string_memcpy/12/1/16/iterations:1\n"
-    "BM_string_memcpy/12/1/32/iterations:1\n"
-    "BM_string_memcpy/12/2/1/iterations:1\n"
-    "BM_string_memcpy/12/2/2/iterations:1\n"
-    "BM_string_memcpy/12/2/4/iterations:1\n"
-    "BM_string_memcpy/12/2/8/iterations:1\n"
-    "BM_string_memcpy/12/2/16/iterations:1\n"
-    "BM_string_memcpy/12/2/32/iterations:1\n"
-    "BM_string_memcpy/12/4/1/iterations:1\n"
-    "BM_string_memcpy/12/4/2/iterations:1\n"
-    "BM_string_memcpy/12/4/4/iterations:1\n"
-    "BM_string_memcpy/12/4/8/iterations:1\n"
-    "BM_string_memcpy/12/4/16/iterations:1\n"
-    "BM_string_memcpy/12/4/32/iterations:1\n"
-    "BM_string_memcpy/12/8/1/iterations:1\n"
-    "BM_string_memcpy/12/8/2/iterations:1\n"
-    "BM_string_memcpy/12/8/4/iterations:1\n"
-    "BM_string_memcpy/12/8/8/iterations:1\n"
-    "BM_string_memcpy/12/8/16/iterations:1\n"
-    "BM_string_memcpy/12/8/32/iterations:1\n"
-    "BM_string_memcpy/12/16/1/iterations:1\n"
-    "BM_string_memcpy/12/16/2/iterations:1\n"
-    "BM_string_memcpy/12/16/4/iterations:1\n"
-    "BM_string_memcpy/12/16/8/iterations:1\n"
-    "BM_string_memcpy/12/16/16/iterations:1\n"
-    "BM_string_memcpy/12/16/32/iterations:1\n"
-    "BM_string_memcpy/12/32/1/iterations:1\n"
-    "BM_string_memcpy/12/32/2/iterations:1\n"
-    "BM_string_memcpy/12/32/4/iterations:1\n"
-    "BM_string_memcpy/12/32/8/iterations:1\n"
-    "BM_string_memcpy/12/32/16/iterations:1\n"
-    "BM_string_memcpy/12/32/32/iterations:1\n"
-    "BM_string_memcpy/13/0/0/iterations:1\n"
-    "BM_string_memcpy/13/1/1/iterations:1\n"
-    "BM_string_memcpy/13/1/2/iterations:1\n"
-    "BM_string_memcpy/13/1/4/iterations:1\n"
-    "BM_string_memcpy/13/1/8/iterations:1\n"
-    "BM_string_memcpy/13/1/16/iterations:1\n"
-    "BM_string_memcpy/13/1/32/iterations:1\n"
-    "BM_string_memcpy/13/2/1/iterations:1\n"
-    "BM_string_memcpy/13/2/2/iterations:1\n"
-    "BM_string_memcpy/13/2/4/iterations:1\n"
-    "BM_string_memcpy/13/2/8/iterations:1\n"
-    "BM_string_memcpy/13/2/16/iterations:1\n"
-    "BM_string_memcpy/13/2/32/iterations:1\n"
-    "BM_string_memcpy/13/4/1/iterations:1\n"
-    "BM_string_memcpy/13/4/2/iterations:1\n"
-    "BM_string_memcpy/13/4/4/iterations:1\n"
-    "BM_string_memcpy/13/4/8/iterations:1\n"
-    "BM_string_memcpy/13/4/16/iterations:1\n"
-    "BM_string_memcpy/13/4/32/iterations:1\n"
-    "BM_string_memcpy/13/8/1/iterations:1\n"
-    "BM_string_memcpy/13/8/2/iterations:1\n"
-    "BM_string_memcpy/13/8/4/iterations:1\n"
-    "BM_string_memcpy/13/8/8/iterations:1\n"
-    "BM_string_memcpy/13/8/16/iterations:1\n"
-    "BM_string_memcpy/13/8/32/iterations:1\n"
-    "BM_string_memcpy/13/16/1/iterations:1\n"
-    "BM_string_memcpy/13/16/2/iterations:1\n"
-    "BM_string_memcpy/13/16/4/iterations:1\n"
-    "BM_string_memcpy/13/16/8/iterations:1\n"
-    "BM_string_memcpy/13/16/16/iterations:1\n"
-    "BM_string_memcpy/13/16/32/iterations:1\n"
-    "BM_string_memcpy/13/32/1/iterations:1\n"
-    "BM_string_memcpy/13/32/2/iterations:1\n"
-    "BM_string_memcpy/13/32/4/iterations:1\n"
-    "BM_string_memcpy/13/32/8/iterations:1\n"
-    "BM_string_memcpy/13/32/16/iterations:1\n"
-    "BM_string_memcpy/13/32/32/iterations:1\n"
-    "BM_string_memcpy/14/0/0/iterations:1\n"
-    "BM_string_memcpy/14/1/1/iterations:1\n"
-    "BM_string_memcpy/14/1/2/iterations:1\n"
-    "BM_string_memcpy/14/1/4/iterations:1\n"
-    "BM_string_memcpy/14/1/8/iterations:1\n"
-    "BM_string_memcpy/14/1/16/iterations:1\n"
-    "BM_string_memcpy/14/1/32/iterations:1\n"
-    "BM_string_memcpy/14/2/1/iterations:1\n"
-    "BM_string_memcpy/14/2/2/iterations:1\n"
-    "BM_string_memcpy/14/2/4/iterations:1\n"
-    "BM_string_memcpy/14/2/8/iterations:1\n"
-    "BM_string_memcpy/14/2/16/iterations:1\n"
-    "BM_string_memcpy/14/2/32/iterations:1\n"
-    "BM_string_memcpy/14/4/1/iterations:1\n"
-    "BM_string_memcpy/14/4/2/iterations:1\n"
-    "BM_string_memcpy/14/4/4/iterations:1\n"
-    "BM_string_memcpy/14/4/8/iterations:1\n"
-    "BM_string_memcpy/14/4/16/iterations:1\n"
-    "BM_string_memcpy/14/4/32/iterations:1\n"
-    "BM_string_memcpy/14/8/1/iterations:1\n"
-    "BM_string_memcpy/14/8/2/iterations:1\n"
-    "BM_string_memcpy/14/8/4/iterations:1\n"
-    "BM_string_memcpy/14/8/8/iterations:1\n"
-    "BM_string_memcpy/14/8/16/iterations:1\n"
-    "BM_string_memcpy/14/8/32/iterations:1\n"
-    "BM_string_memcpy/14/16/1/iterations:1\n"
-    "BM_string_memcpy/14/16/2/iterations:1\n"
-    "BM_string_memcpy/14/16/4/iterations:1\n"
-    "BM_string_memcpy/14/16/8/iterations:1\n"
-    "BM_string_memcpy/14/16/16/iterations:1\n"
-    "BM_string_memcpy/14/16/32/iterations:1\n"
-    "BM_string_memcpy/14/32/1/iterations:1\n"
-    "BM_string_memcpy/14/32/2/iterations:1\n"
-    "BM_string_memcpy/14/32/4/iterations:1\n"
-    "BM_string_memcpy/14/32/8/iterations:1\n"
-    "BM_string_memcpy/14/32/16/iterations:1\n"
-    "BM_string_memcpy/14/32/32/iterations:1\n"
-    "BM_string_memcpy/15/0/0/iterations:1\n"
-    "BM_string_memcpy/15/1/1/iterations:1\n"
-    "BM_string_memcpy/15/1/2/iterations:1\n"
-    "BM_string_memcpy/15/1/4/iterations:1\n"
-    "BM_string_memcpy/15/1/8/iterations:1\n"
-    "BM_string_memcpy/15/1/16/iterations:1\n"
-    "BM_string_memcpy/15/1/32/iterations:1\n"
-    "BM_string_memcpy/15/2/1/iterations:1\n"
-    "BM_string_memcpy/15/2/2/iterations:1\n"
-    "BM_string_memcpy/15/2/4/iterations:1\n"
-    "BM_string_memcpy/15/2/8/iterations:1\n"
-    "BM_string_memcpy/15/2/16/iterations:1\n"
-    "BM_string_memcpy/15/2/32/iterations:1\n"
-    "BM_string_memcpy/15/4/1/iterations:1\n"
-    "BM_string_memcpy/15/4/2/iterations:1\n"
-    "BM_string_memcpy/15/4/4/iterations:1\n"
-    "BM_string_memcpy/15/4/8/iterations:1\n"
-    "BM_string_memcpy/15/4/16/iterations:1\n"
-    "BM_string_memcpy/15/4/32/iterations:1\n"
-    "BM_string_memcpy/15/8/1/iterations:1\n"
-    "BM_string_memcpy/15/8/2/iterations:1\n"
-    "BM_string_memcpy/15/8/4/iterations:1\n"
-    "BM_string_memcpy/15/8/8/iterations:1\n"
-    "BM_string_memcpy/15/8/16/iterations:1\n"
-    "BM_string_memcpy/15/8/32/iterations:1\n"
-    "BM_string_memcpy/15/16/1/iterations:1\n"
-    "BM_string_memcpy/15/16/2/iterations:1\n"
-    "BM_string_memcpy/15/16/4/iterations:1\n"
-    "BM_string_memcpy/15/16/8/iterations:1\n"
-    "BM_string_memcpy/15/16/16/iterations:1\n"
-    "BM_string_memcpy/15/16/32/iterations:1\n"
-    "BM_string_memcpy/15/32/1/iterations:1\n"
-    "BM_string_memcpy/15/32/2/iterations:1\n"
-    "BM_string_memcpy/15/32/4/iterations:1\n"
-    "BM_string_memcpy/15/32/8/iterations:1\n"
-    "BM_string_memcpy/15/32/16/iterations:1\n"
-    "BM_string_memcpy/15/32/32/iterations:1\n"
-    "BM_string_memcpy/16/0/0/iterations:1\n"
-    "BM_string_memcpy/16/1/1/iterations:1\n"
-    "BM_string_memcpy/16/1/2/iterations:1\n"
-    "BM_string_memcpy/16/1/4/iterations:1\n"
-    "BM_string_memcpy/16/1/8/iterations:1\n"
-    "BM_string_memcpy/16/1/16/iterations:1\n"
-    "BM_string_memcpy/16/1/32/iterations:1\n"
-    "BM_string_memcpy/16/2/1/iterations:1\n"
-    "BM_string_memcpy/16/2/2/iterations:1\n"
-    "BM_string_memcpy/16/2/4/iterations:1\n"
-    "BM_string_memcpy/16/2/8/iterations:1\n"
-    "BM_string_memcpy/16/2/16/iterations:1\n"
-    "BM_string_memcpy/16/2/32/iterations:1\n"
-    "BM_string_memcpy/16/4/1/iterations:1\n"
-    "BM_string_memcpy/16/4/2/iterations:1\n"
-    "BM_string_memcpy/16/4/4/iterations:1\n"
-    "BM_string_memcpy/16/4/8/iterations:1\n"
-    "BM_string_memcpy/16/4/16/iterations:1\n"
-    "BM_string_memcpy/16/4/32/iterations:1\n"
-    "BM_string_memcpy/16/8/1/iterations:1\n"
-    "BM_string_memcpy/16/8/2/iterations:1\n"
-    "BM_string_memcpy/16/8/4/iterations:1\n"
-    "BM_string_memcpy/16/8/8/iterations:1\n"
-    "BM_string_memcpy/16/8/16/iterations:1\n"
-    "BM_string_memcpy/16/8/32/iterations:1\n"
-    "BM_string_memcpy/16/16/1/iterations:1\n"
-    "BM_string_memcpy/16/16/2/iterations:1\n"
-    "BM_string_memcpy/16/16/4/iterations:1\n"
-    "BM_string_memcpy/16/16/8/iterations:1\n"
-    "BM_string_memcpy/16/16/16/iterations:1\n"
-    "BM_string_memcpy/16/16/32/iterations:1\n"
-    "BM_string_memcpy/16/32/1/iterations:1\n"
-    "BM_string_memcpy/16/32/2/iterations:1\n"
-    "BM_string_memcpy/16/32/4/iterations:1\n"
-    "BM_string_memcpy/16/32/8/iterations:1\n"
-    "BM_string_memcpy/16/32/16/iterations:1\n"
-    "BM_string_memcpy/16/32/32/iterations:1\n"
-    "BM_string_memcpy/24/0/0/iterations:1\n"
-    "BM_string_memcpy/24/1/1/iterations:1\n"
-    "BM_string_memcpy/24/1/2/iterations:1\n"
-    "BM_string_memcpy/24/1/4/iterations:1\n"
-    "BM_string_memcpy/24/1/8/iterations:1\n"
-    "BM_string_memcpy/24/1/16/iterations:1\n"
-    "BM_string_memcpy/24/1/32/iterations:1\n"
-    "BM_string_memcpy/24/2/1/iterations:1\n"
-    "BM_string_memcpy/24/2/2/iterations:1\n"
-    "BM_string_memcpy/24/2/4/iterations:1\n"
-    "BM_string_memcpy/24/2/8/iterations:1\n"
-    "BM_string_memcpy/24/2/16/iterations:1\n"
-    "BM_string_memcpy/24/2/32/iterations:1\n"
-    "BM_string_memcpy/24/4/1/iterations:1\n"
-    "BM_string_memcpy/24/4/2/iterations:1\n"
-    "BM_string_memcpy/24/4/4/iterations:1\n"
-    "BM_string_memcpy/24/4/8/iterations:1\n"
-    "BM_string_memcpy/24/4/16/iterations:1\n"
-    "BM_string_memcpy/24/4/32/iterations:1\n"
-    "BM_string_memcpy/24/8/1/iterations:1\n"
-    "BM_string_memcpy/24/8/2/iterations:1\n"
-    "BM_string_memcpy/24/8/4/iterations:1\n"
-    "BM_string_memcpy/24/8/8/iterations:1\n"
-    "BM_string_memcpy/24/8/16/iterations:1\n"
-    "BM_string_memcpy/24/8/32/iterations:1\n"
-    "BM_string_memcpy/24/16/1/iterations:1\n"
-    "BM_string_memcpy/24/16/2/iterations:1\n"
-    "BM_string_memcpy/24/16/4/iterations:1\n"
-    "BM_string_memcpy/24/16/8/iterations:1\n"
-    "BM_string_memcpy/24/16/16/iterations:1\n"
-    "BM_string_memcpy/24/16/32/iterations:1\n"
-    "BM_string_memcpy/24/32/1/iterations:1\n"
-    "BM_string_memcpy/24/32/2/iterations:1\n"
-    "BM_string_memcpy/24/32/4/iterations:1\n"
-    "BM_string_memcpy/24/32/8/iterations:1\n"
-    "BM_string_memcpy/24/32/16/iterations:1\n"
-    "BM_string_memcpy/24/32/32/iterations:1\n"
-    "BM_string_memcpy/32/0/0/iterations:1\n"
-    "BM_string_memcpy/32/1/1/iterations:1\n"
-    "BM_string_memcpy/32/1/2/iterations:1\n"
-    "BM_string_memcpy/32/1/4/iterations:1\n"
-    "BM_string_memcpy/32/1/8/iterations:1\n"
-    "BM_string_memcpy/32/1/16/iterations:1\n"
-    "BM_string_memcpy/32/1/32/iterations:1\n"
-    "BM_string_memcpy/32/2/1/iterations:1\n"
-    "BM_string_memcpy/32/2/2/iterations:1\n"
-    "BM_string_memcpy/32/2/4/iterations:1\n"
-    "BM_string_memcpy/32/2/8/iterations:1\n"
-    "BM_string_memcpy/32/2/16/iterations:1\n"
-    "BM_string_memcpy/32/2/32/iterations:1\n"
-    "BM_string_memcpy/32/4/1/iterations:1\n"
-    "BM_string_memcpy/32/4/2/iterations:1\n"
-    "BM_string_memcpy/32/4/4/iterations:1\n"
-    "BM_string_memcpy/32/4/8/iterations:1\n"
-    "BM_string_memcpy/32/4/16/iterations:1\n"
-    "BM_string_memcpy/32/4/32/iterations:1\n"
-    "BM_string_memcpy/32/8/1/iterations:1\n"
-    "BM_string_memcpy/32/8/2/iterations:1\n"
-    "BM_string_memcpy/32/8/4/iterations:1\n"
-    "BM_string_memcpy/32/8/8/iterations:1\n"
-    "BM_string_memcpy/32/8/16/iterations:1\n"
-    "BM_string_memcpy/32/8/32/iterations:1\n"
-    "BM_string_memcpy/32/16/1/iterations:1\n"
-    "BM_string_memcpy/32/16/2/iterations:1\n"
-    "BM_string_memcpy/32/16/4/iterations:1\n"
-    "BM_string_memcpy/32/16/8/iterations:1\n"
-    "BM_string_memcpy/32/16/16/iterations:1\n"
-    "BM_string_memcpy/32/16/32/iterations:1\n"
-    "BM_string_memcpy/32/32/1/iterations:1\n"
-    "BM_string_memcpy/32/32/2/iterations:1\n"
-    "BM_string_memcpy/32/32/4/iterations:1\n"
-    "BM_string_memcpy/32/32/8/iterations:1\n"
-    "BM_string_memcpy/32/32/16/iterations:1\n"
-    "BM_string_memcpy/32/32/32/iterations:1\n"
-    "BM_string_memcpy/40/0/0/iterations:1\n"
-    "BM_string_memcpy/40/1/1/iterations:1\n"
-    "BM_string_memcpy/40/1/2/iterations:1\n"
-    "BM_string_memcpy/40/1/4/iterations:1\n"
-    "BM_string_memcpy/40/1/8/iterations:1\n"
-    "BM_string_memcpy/40/1/16/iterations:1\n"
-    "BM_string_memcpy/40/1/32/iterations:1\n"
-    "BM_string_memcpy/40/2/1/iterations:1\n"
-    "BM_string_memcpy/40/2/2/iterations:1\n"
-    "BM_string_memcpy/40/2/4/iterations:1\n"
-    "BM_string_memcpy/40/2/8/iterations:1\n"
-    "BM_string_memcpy/40/2/16/iterations:1\n"
-    "BM_string_memcpy/40/2/32/iterations:1\n"
-    "BM_string_memcpy/40/4/1/iterations:1\n"
-    "BM_string_memcpy/40/4/2/iterations:1\n"
-    "BM_string_memcpy/40/4/4/iterations:1\n"
-    "BM_string_memcpy/40/4/8/iterations:1\n"
-    "BM_string_memcpy/40/4/16/iterations:1\n"
-    "BM_string_memcpy/40/4/32/iterations:1\n"
-    "BM_string_memcpy/40/8/1/iterations:1\n"
-    "BM_string_memcpy/40/8/2/iterations:1\n"
-    "BM_string_memcpy/40/8/4/iterations:1\n"
-    "BM_string_memcpy/40/8/8/iterations:1\n"
-    "BM_string_memcpy/40/8/16/iterations:1\n"
-    "BM_string_memcpy/40/8/32/iterations:1\n"
-    "BM_string_memcpy/40/16/1/iterations:1\n"
-    "BM_string_memcpy/40/16/2/iterations:1\n"
-    "BM_string_memcpy/40/16/4/iterations:1\n"
-    "BM_string_memcpy/40/16/8/iterations:1\n"
-    "BM_string_memcpy/40/16/16/iterations:1\n"
-    "BM_string_memcpy/40/16/32/iterations:1\n"
-    "BM_string_memcpy/40/32/1/iterations:1\n"
-    "BM_string_memcpy/40/32/2/iterations:1\n"
-    "BM_string_memcpy/40/32/4/iterations:1\n"
-    "BM_string_memcpy/40/32/8/iterations:1\n"
-    "BM_string_memcpy/40/32/16/iterations:1\n"
-    "BM_string_memcpy/40/32/32/iterations:1\n"
-    "BM_string_memcpy/48/0/0/iterations:1\n"
-    "BM_string_memcpy/48/1/1/iterations:1\n"
-    "BM_string_memcpy/48/1/2/iterations:1\n"
-    "BM_string_memcpy/48/1/4/iterations:1\n"
-    "BM_string_memcpy/48/1/8/iterations:1\n"
-    "BM_string_memcpy/48/1/16/iterations:1\n"
-    "BM_string_memcpy/48/1/32/iterations:1\n"
-    "BM_string_memcpy/48/2/1/iterations:1\n"
-    "BM_string_memcpy/48/2/2/iterations:1\n"
-    "BM_string_memcpy/48/2/4/iterations:1\n"
-    "BM_string_memcpy/48/2/8/iterations:1\n"
-    "BM_string_memcpy/48/2/16/iterations:1\n"
-    "BM_string_memcpy/48/2/32/iterations:1\n"
-    "BM_string_memcpy/48/4/1/iterations:1\n"
-    "BM_string_memcpy/48/4/2/iterations:1\n"
-    "BM_string_memcpy/48/4/4/iterations:1\n"
-    "BM_string_memcpy/48/4/8/iterations:1\n"
-    "BM_string_memcpy/48/4/16/iterations:1\n"
-    "BM_string_memcpy/48/4/32/iterations:1\n"
-    "BM_string_memcpy/48/8/1/iterations:1\n"
-    "BM_string_memcpy/48/8/2/iterations:1\n"
-    "BM_string_memcpy/48/8/4/iterations:1\n"
-    "BM_string_memcpy/48/8/8/iterations:1\n"
-    "BM_string_memcpy/48/8/16/iterations:1\n"
-    "BM_string_memcpy/48/8/32/iterations:1\n"
-    "BM_string_memcpy/48/16/1/iterations:1\n"
-    "BM_string_memcpy/48/16/2/iterations:1\n"
-    "BM_string_memcpy/48/16/4/iterations:1\n"
-    "BM_string_memcpy/48/16/8/iterations:1\n"
-    "BM_string_memcpy/48/16/16/iterations:1\n"
-    "BM_string_memcpy/48/16/32/iterations:1\n"
-    "BM_string_memcpy/48/32/1/iterations:1\n"
-    "BM_string_memcpy/48/32/2/iterations:1\n"
-    "BM_string_memcpy/48/32/4/iterations:1\n"
-    "BM_string_memcpy/48/32/8/iterations:1\n"
-    "BM_string_memcpy/48/32/16/iterations:1\n"
-    "BM_string_memcpy/48/32/32/iterations:1\n"
-    "BM_string_memcpy/56/0/0/iterations:1\n"
-    "BM_string_memcpy/56/1/1/iterations:1\n"
-    "BM_string_memcpy/56/1/2/iterations:1\n"
-    "BM_string_memcpy/56/1/4/iterations:1\n"
-    "BM_string_memcpy/56/1/8/iterations:1\n"
-    "BM_string_memcpy/56/1/16/iterations:1\n"
-    "BM_string_memcpy/56/1/32/iterations:1\n"
-    "BM_string_memcpy/56/2/1/iterations:1\n"
-    "BM_string_memcpy/56/2/2/iterations:1\n"
-    "BM_string_memcpy/56/2/4/iterations:1\n"
-    "BM_string_memcpy/56/2/8/iterations:1\n"
-    "BM_string_memcpy/56/2/16/iterations:1\n"
-    "BM_string_memcpy/56/2/32/iterations:1\n"
-    "BM_string_memcpy/56/4/1/iterations:1\n"
-    "BM_string_memcpy/56/4/2/iterations:1\n"
-    "BM_string_memcpy/56/4/4/iterations:1\n"
-    "BM_string_memcpy/56/4/8/iterations:1\n"
-    "BM_string_memcpy/56/4/16/iterations:1\n"
-    "BM_string_memcpy/56/4/32/iterations:1\n"
-    "BM_string_memcpy/56/8/1/iterations:1\n"
-    "BM_string_memcpy/56/8/2/iterations:1\n"
-    "BM_string_memcpy/56/8/4/iterations:1\n"
-    "BM_string_memcpy/56/8/8/iterations:1\n"
-    "BM_string_memcpy/56/8/16/iterations:1\n"
-    "BM_string_memcpy/56/8/32/iterations:1\n"
-    "BM_string_memcpy/56/16/1/iterations:1\n"
-    "BM_string_memcpy/56/16/2/iterations:1\n"
-    "BM_string_memcpy/56/16/4/iterations:1\n"
-    "BM_string_memcpy/56/16/8/iterations:1\n"
-    "BM_string_memcpy/56/16/16/iterations:1\n"
-    "BM_string_memcpy/56/16/32/iterations:1\n"
-    "BM_string_memcpy/56/32/1/iterations:1\n"
-    "BM_string_memcpy/56/32/2/iterations:1\n"
-    "BM_string_memcpy/56/32/4/iterations:1\n"
-    "BM_string_memcpy/56/32/8/iterations:1\n"
-    "BM_string_memcpy/56/32/16/iterations:1\n"
-    "BM_string_memcpy/56/32/32/iterations:1\n"
-    "BM_string_memcpy/64/0/0/iterations:1\n"
-    "BM_string_memcpy/64/1/1/iterations:1\n"
-    "BM_string_memcpy/64/1/2/iterations:1\n"
-    "BM_string_memcpy/64/1/4/iterations:1\n"
-    "BM_string_memcpy/64/1/8/iterations:1\n"
-    "BM_string_memcpy/64/1/16/iterations:1\n"
-    "BM_string_memcpy/64/1/32/iterations:1\n"
-    "BM_string_memcpy/64/2/1/iterations:1\n"
-    "BM_string_memcpy/64/2/2/iterations:1\n"
-    "BM_string_memcpy/64/2/4/iterations:1\n"
-    "BM_string_memcpy/64/2/8/iterations:1\n"
-    "BM_string_memcpy/64/2/16/iterations:1\n"
-    "BM_string_memcpy/64/2/32/iterations:1\n"
-    "BM_string_memcpy/64/4/1/iterations:1\n"
-    "BM_string_memcpy/64/4/2/iterations:1\n"
-    "BM_string_memcpy/64/4/4/iterations:1\n"
-    "BM_string_memcpy/64/4/8/iterations:1\n"
-    "BM_string_memcpy/64/4/16/iterations:1\n"
-    "BM_string_memcpy/64/4/32/iterations:1\n"
-    "BM_string_memcpy/64/8/1/iterations:1\n"
-    "BM_string_memcpy/64/8/2/iterations:1\n"
-    "BM_string_memcpy/64/8/4/iterations:1\n"
-    "BM_string_memcpy/64/8/8/iterations:1\n"
-    "BM_string_memcpy/64/8/16/iterations:1\n"
-    "BM_string_memcpy/64/8/32/iterations:1\n"
-    "BM_string_memcpy/64/16/1/iterations:1\n"
-    "BM_string_memcpy/64/16/2/iterations:1\n"
-    "BM_string_memcpy/64/16/4/iterations:1\n"
-    "BM_string_memcpy/64/16/8/iterations:1\n"
-    "BM_string_memcpy/64/16/16/iterations:1\n"
-    "BM_string_memcpy/64/16/32/iterations:1\n"
-    "BM_string_memcpy/64/32/1/iterations:1\n"
-    "BM_string_memcpy/64/32/2/iterations:1\n"
-    "BM_string_memcpy/64/32/4/iterations:1\n"
-    "BM_string_memcpy/64/32/8/iterations:1\n"
-    "BM_string_memcpy/64/32/16/iterations:1\n"
-    "BM_string_memcpy/64/32/32/iterations:1\n"
-    "BM_string_memcpy/72/0/0/iterations:1\n"
-    "BM_string_memcpy/72/1/1/iterations:1\n"
-    "BM_string_memcpy/72/1/2/iterations:1\n"
-    "BM_string_memcpy/72/1/4/iterations:1\n"
-    "BM_string_memcpy/72/1/8/iterations:1\n"
-    "BM_string_memcpy/72/1/16/iterations:1\n"
-    "BM_string_memcpy/72/1/32/iterations:1\n"
-    "BM_string_memcpy/72/2/1/iterations:1\n"
-    "BM_string_memcpy/72/2/2/iterations:1\n"
-    "BM_string_memcpy/72/2/4/iterations:1\n"
-    "BM_string_memcpy/72/2/8/iterations:1\n"
-    "BM_string_memcpy/72/2/16/iterations:1\n"
-    "BM_string_memcpy/72/2/32/iterations:1\n"
-    "BM_string_memcpy/72/4/1/iterations:1\n"
-    "BM_string_memcpy/72/4/2/iterations:1\n"
-    "BM_string_memcpy/72/4/4/iterations:1\n"
-    "BM_string_memcpy/72/4/8/iterations:1\n"
-    "BM_string_memcpy/72/4/16/iterations:1\n"
-    "BM_string_memcpy/72/4/32/iterations:1\n"
-    "BM_string_memcpy/72/8/1/iterations:1\n"
-    "BM_string_memcpy/72/8/2/iterations:1\n"
-    "BM_string_memcpy/72/8/4/iterations:1\n"
-    "BM_string_memcpy/72/8/8/iterations:1\n"
-    "BM_string_memcpy/72/8/16/iterations:1\n"
-    "BM_string_memcpy/72/8/32/iterations:1\n"
-    "BM_string_memcpy/72/16/1/iterations:1\n"
-    "BM_string_memcpy/72/16/2/iterations:1\n"
-    "BM_string_memcpy/72/16/4/iterations:1\n"
-    "BM_string_memcpy/72/16/8/iterations:1\n"
-    "BM_string_memcpy/72/16/16/iterations:1\n"
-    "BM_string_memcpy/72/16/32/iterations:1\n"
-    "BM_string_memcpy/72/32/1/iterations:1\n"
-    "BM_string_memcpy/72/32/2/iterations:1\n"
-    "BM_string_memcpy/72/32/4/iterations:1\n"
-    "BM_string_memcpy/72/32/8/iterations:1\n"
-    "BM_string_memcpy/72/32/16/iterations:1\n"
-    "BM_string_memcpy/72/32/32/iterations:1\n"
-    "BM_string_memcpy/80/0/0/iterations:1\n"
-    "BM_string_memcpy/80/1/1/iterations:1\n"
-    "BM_string_memcpy/80/1/2/iterations:1\n"
-    "BM_string_memcpy/80/1/4/iterations:1\n"
-    "BM_string_memcpy/80/1/8/iterations:1\n"
-    "BM_string_memcpy/80/1/16/iterations:1\n"
-    "BM_string_memcpy/80/1/32/iterations:1\n"
-    "BM_string_memcpy/80/2/1/iterations:1\n"
-    "BM_string_memcpy/80/2/2/iterations:1\n"
-    "BM_string_memcpy/80/2/4/iterations:1\n"
-    "BM_string_memcpy/80/2/8/iterations:1\n"
-    "BM_string_memcpy/80/2/16/iterations:1\n"
-    "BM_string_memcpy/80/2/32/iterations:1\n"
-    "BM_string_memcpy/80/4/1/iterations:1\n"
-    "BM_string_memcpy/80/4/2/iterations:1\n"
-    "BM_string_memcpy/80/4/4/iterations:1\n"
-    "BM_string_memcpy/80/4/8/iterations:1\n"
-    "BM_string_memcpy/80/4/16/iterations:1\n"
-    "BM_string_memcpy/80/4/32/iterations:1\n"
-    "BM_string_memcpy/80/8/1/iterations:1\n"
-    "BM_string_memcpy/80/8/2/iterations:1\n"
-    "BM_string_memcpy/80/8/4/iterations:1\n"
-    "BM_string_memcpy/80/8/8/iterations:1\n"
-    "BM_string_memcpy/80/8/16/iterations:1\n"
-    "BM_string_memcpy/80/8/32/iterations:1\n"
-    "BM_string_memcpy/80/16/1/iterations:1\n"
-    "BM_string_memcpy/80/16/2/iterations:1\n"
-    "BM_string_memcpy/80/16/4/iterations:1\n"
-    "BM_string_memcpy/80/16/8/iterations:1\n"
-    "BM_string_memcpy/80/16/16/iterations:1\n"
-    "BM_string_memcpy/80/16/32/iterations:1\n"
-    "BM_string_memcpy/80/32/1/iterations:1\n"
-    "BM_string_memcpy/80/32/2/iterations:1\n"
-    "BM_string_memcpy/80/32/4/iterations:1\n"
-    "BM_string_memcpy/80/32/8/iterations:1\n"
-    "BM_string_memcpy/80/32/16/iterations:1\n"
-    "BM_string_memcpy/80/32/32/iterations:1\n"
-    "BM_string_memcpy/88/0/0/iterations:1\n"
-    "BM_string_memcpy/88/1/1/iterations:1\n"
-    "BM_string_memcpy/88/1/2/iterations:1\n"
-    "BM_string_memcpy/88/1/4/iterations:1\n"
-    "BM_string_memcpy/88/1/8/iterations:1\n"
-    "BM_string_memcpy/88/1/16/iterations:1\n"
-    "BM_string_memcpy/88/1/32/iterations:1\n"
-    "BM_string_memcpy/88/2/1/iterations:1\n"
-    "BM_string_memcpy/88/2/2/iterations:1\n"
-    "BM_string_memcpy/88/2/4/iterations:1\n"
-    "BM_string_memcpy/88/2/8/iterations:1\n"
-    "BM_string_memcpy/88/2/16/iterations:1\n"
-    "BM_string_memcpy/88/2/32/iterations:1\n"
-    "BM_string_memcpy/88/4/1/iterations:1\n"
-    "BM_string_memcpy/88/4/2/iterations:1\n"
-    "BM_string_memcpy/88/4/4/iterations:1\n"
-    "BM_string_memcpy/88/4/8/iterations:1\n"
-    "BM_string_memcpy/88/4/16/iterations:1\n"
-    "BM_string_memcpy/88/4/32/iterations:1\n"
-    "BM_string_memcpy/88/8/1/iterations:1\n"
-    "BM_string_memcpy/88/8/2/iterations:1\n"
-    "BM_string_memcpy/88/8/4/iterations:1\n"
-    "BM_string_memcpy/88/8/8/iterations:1\n"
-    "BM_string_memcpy/88/8/16/iterations:1\n"
-    "BM_string_memcpy/88/8/32/iterations:1\n"
-    "BM_string_memcpy/88/16/1/iterations:1\n"
-    "BM_string_memcpy/88/16/2/iterations:1\n"
-    "BM_string_memcpy/88/16/4/iterations:1\n"
-    "BM_string_memcpy/88/16/8/iterations:1\n"
-    "BM_string_memcpy/88/16/16/iterations:1\n"
-    "BM_string_memcpy/88/16/32/iterations:1\n"
-    "BM_string_memcpy/88/32/1/iterations:1\n"
-    "BM_string_memcpy/88/32/2/iterations:1\n"
-    "BM_string_memcpy/88/32/4/iterations:1\n"
-    "BM_string_memcpy/88/32/8/iterations:1\n"
-    "BM_string_memcpy/88/32/16/iterations:1\n"
-    "BM_string_memcpy/88/32/32/iterations:1\n"
-    "BM_string_memcpy/96/0/0/iterations:1\n"
-    "BM_string_memcpy/96/1/1/iterations:1\n"
-    "BM_string_memcpy/96/1/2/iterations:1\n"
-    "BM_string_memcpy/96/1/4/iterations:1\n"
-    "BM_string_memcpy/96/1/8/iterations:1\n"
-    "BM_string_memcpy/96/1/16/iterations:1\n"
-    "BM_string_memcpy/96/1/32/iterations:1\n"
-    "BM_string_memcpy/96/2/1/iterations:1\n"
-    "BM_string_memcpy/96/2/2/iterations:1\n"
-    "BM_string_memcpy/96/2/4/iterations:1\n"
-    "BM_string_memcpy/96/2/8/iterations:1\n"
-    "BM_string_memcpy/96/2/16/iterations:1\n"
-    "BM_string_memcpy/96/2/32/iterations:1\n"
-    "BM_string_memcpy/96/4/1/iterations:1\n"
-    "BM_string_memcpy/96/4/2/iterations:1\n"
-    "BM_string_memcpy/96/4/4/iterations:1\n"
-    "BM_string_memcpy/96/4/8/iterations:1\n"
-    "BM_string_memcpy/96/4/16/iterations:1\n"
-    "BM_string_memcpy/96/4/32/iterations:1\n"
-    "BM_string_memcpy/96/8/1/iterations:1\n"
-    "BM_string_memcpy/96/8/2/iterations:1\n"
-    "BM_string_memcpy/96/8/4/iterations:1\n"
-    "BM_string_memcpy/96/8/8/iterations:1\n"
-    "BM_string_memcpy/96/8/16/iterations:1\n"
-    "BM_string_memcpy/96/8/32/iterations:1\n"
-    "BM_string_memcpy/96/16/1/iterations:1\n"
-    "BM_string_memcpy/96/16/2/iterations:1\n"
-    "BM_string_memcpy/96/16/4/iterations:1\n"
-    "BM_string_memcpy/96/16/8/iterations:1\n"
-    "BM_string_memcpy/96/16/16/iterations:1\n"
-    "BM_string_memcpy/96/16/32/iterations:1\n"
-    "BM_string_memcpy/96/32/1/iterations:1\n"
-    "BM_string_memcpy/96/32/2/iterations:1\n"
-    "BM_string_memcpy/96/32/4/iterations:1\n"
-    "BM_string_memcpy/96/32/8/iterations:1\n"
-    "BM_string_memcpy/96/32/16/iterations:1\n"
-    "BM_string_memcpy/96/32/32/iterations:1\n"
-    "BM_string_memcpy/104/0/0/iterations:1\n"
-    "BM_string_memcpy/104/1/1/iterations:1\n"
-    "BM_string_memcpy/104/1/2/iterations:1\n"
-    "BM_string_memcpy/104/1/4/iterations:1\n"
-    "BM_string_memcpy/104/1/8/iterations:1\n"
-    "BM_string_memcpy/104/1/16/iterations:1\n"
-    "BM_string_memcpy/104/1/32/iterations:1\n"
-    "BM_string_memcpy/104/2/1/iterations:1\n"
-    "BM_string_memcpy/104/2/2/iterations:1\n"
-    "BM_string_memcpy/104/2/4/iterations:1\n"
-    "BM_string_memcpy/104/2/8/iterations:1\n"
-    "BM_string_memcpy/104/2/16/iterations:1\n"
-    "BM_string_memcpy/104/2/32/iterations:1\n"
-    "BM_string_memcpy/104/4/1/iterations:1\n"
-    "BM_string_memcpy/104/4/2/iterations:1\n"
-    "BM_string_memcpy/104/4/4/iterations:1\n"
-    "BM_string_memcpy/104/4/8/iterations:1\n"
-    "BM_string_memcpy/104/4/16/iterations:1\n"
-    "BM_string_memcpy/104/4/32/iterations:1\n"
-    "BM_string_memcpy/104/8/1/iterations:1\n"
-    "BM_string_memcpy/104/8/2/iterations:1\n"
-    "BM_string_memcpy/104/8/4/iterations:1\n"
-    "BM_string_memcpy/104/8/8/iterations:1\n"
-    "BM_string_memcpy/104/8/16/iterations:1\n"
-    "BM_string_memcpy/104/8/32/iterations:1\n"
-    "BM_string_memcpy/104/16/1/iterations:1\n"
-    "BM_string_memcpy/104/16/2/iterations:1\n"
-    "BM_string_memcpy/104/16/4/iterations:1\n"
-    "BM_string_memcpy/104/16/8/iterations:1\n"
-    "BM_string_memcpy/104/16/16/iterations:1\n"
-    "BM_string_memcpy/104/16/32/iterations:1\n"
-    "BM_string_memcpy/104/32/1/iterations:1\n"
-    "BM_string_memcpy/104/32/2/iterations:1\n"
-    "BM_string_memcpy/104/32/4/iterations:1\n"
-    "BM_string_memcpy/104/32/8/iterations:1\n"
-    "BM_string_memcpy/104/32/16/iterations:1\n"
-    "BM_string_memcpy/104/32/32/iterations:1\n"
-    "BM_string_memcpy/112/0/0/iterations:1\n"
-    "BM_string_memcpy/112/1/1/iterations:1\n"
-    "BM_string_memcpy/112/1/2/iterations:1\n"
-    "BM_string_memcpy/112/1/4/iterations:1\n"
-    "BM_string_memcpy/112/1/8/iterations:1\n"
-    "BM_string_memcpy/112/1/16/iterations:1\n"
-    "BM_string_memcpy/112/1/32/iterations:1\n"
-    "BM_string_memcpy/112/2/1/iterations:1\n"
-    "BM_string_memcpy/112/2/2/iterations:1\n"
-    "BM_string_memcpy/112/2/4/iterations:1\n"
-    "BM_string_memcpy/112/2/8/iterations:1\n"
-    "BM_string_memcpy/112/2/16/iterations:1\n"
-    "BM_string_memcpy/112/2/32/iterations:1\n"
-    "BM_string_memcpy/112/4/1/iterations:1\n"
-    "BM_string_memcpy/112/4/2/iterations:1\n"
-    "BM_string_memcpy/112/4/4/iterations:1\n"
-    "BM_string_memcpy/112/4/8/iterations:1\n"
-    "BM_string_memcpy/112/4/16/iterations:1\n"
-    "BM_string_memcpy/112/4/32/iterations:1\n"
-    "BM_string_memcpy/112/8/1/iterations:1\n"
-    "BM_string_memcpy/112/8/2/iterations:1\n"
-    "BM_string_memcpy/112/8/4/iterations:1\n"
-    "BM_string_memcpy/112/8/8/iterations:1\n"
-    "BM_string_memcpy/112/8/16/iterations:1\n"
-    "BM_string_memcpy/112/8/32/iterations:1\n"
-    "BM_string_memcpy/112/16/1/iterations:1\n"
-    "BM_string_memcpy/112/16/2/iterations:1\n"
-    "BM_string_memcpy/112/16/4/iterations:1\n"
-    "BM_string_memcpy/112/16/8/iterations:1\n"
-    "BM_string_memcpy/112/16/16/iterations:1\n"
-    "BM_string_memcpy/112/16/32/iterations:1\n"
-    "BM_string_memcpy/112/32/1/iterations:1\n"
-    "BM_string_memcpy/112/32/2/iterations:1\n"
-    "BM_string_memcpy/112/32/4/iterations:1\n"
-    "BM_string_memcpy/112/32/8/iterations:1\n"
-    "BM_string_memcpy/112/32/16/iterations:1\n"
-    "BM_string_memcpy/112/32/32/iterations:1\n"
-    "BM_string_memcpy/120/0/0/iterations:1\n"
-    "BM_string_memcpy/120/1/1/iterations:1\n"
-    "BM_string_memcpy/120/1/2/iterations:1\n"
-    "BM_string_memcpy/120/1/4/iterations:1\n"
-    "BM_string_memcpy/120/1/8/iterations:1\n"
-    "BM_string_memcpy/120/1/16/iterations:1\n"
-    "BM_string_memcpy/120/1/32/iterations:1\n"
-    "BM_string_memcpy/120/2/1/iterations:1\n"
-    "BM_string_memcpy/120/2/2/iterations:1\n"
-    "BM_string_memcpy/120/2/4/iterations:1\n"
-    "BM_string_memcpy/120/2/8/iterations:1\n"
-    "BM_string_memcpy/120/2/16/iterations:1\n"
-    "BM_string_memcpy/120/2/32/iterations:1\n"
-    "BM_string_memcpy/120/4/1/iterations:1\n"
-    "BM_string_memcpy/120/4/2/iterations:1\n"
-    "BM_string_memcpy/120/4/4/iterations:1\n"
-    "BM_string_memcpy/120/4/8/iterations:1\n"
-    "BM_string_memcpy/120/4/16/iterations:1\n"
-    "BM_string_memcpy/120/4/32/iterations:1\n"
-    "BM_string_memcpy/120/8/1/iterations:1\n"
-    "BM_string_memcpy/120/8/2/iterations:1\n"
-    "BM_string_memcpy/120/8/4/iterations:1\n"
-    "BM_string_memcpy/120/8/8/iterations:1\n"
-    "BM_string_memcpy/120/8/16/iterations:1\n"
-    "BM_string_memcpy/120/8/32/iterations:1\n"
-    "BM_string_memcpy/120/16/1/iterations:1\n"
-    "BM_string_memcpy/120/16/2/iterations:1\n"
-    "BM_string_memcpy/120/16/4/iterations:1\n"
-    "BM_string_memcpy/120/16/8/iterations:1\n"
-    "BM_string_memcpy/120/16/16/iterations:1\n"
-    "BM_string_memcpy/120/16/32/iterations:1\n"
-    "BM_string_memcpy/120/32/1/iterations:1\n"
-    "BM_string_memcpy/120/32/2/iterations:1\n"
-    "BM_string_memcpy/120/32/4/iterations:1\n"
-    "BM_string_memcpy/120/32/8/iterations:1\n"
-    "BM_string_memcpy/120/32/16/iterations:1\n"
-    "BM_string_memcpy/120/32/32/iterations:1\n"
-    "BM_string_memcpy/128/0/0/iterations:1\n"
-    "BM_string_memcpy/128/1/1/iterations:1\n"
-    "BM_string_memcpy/128/1/2/iterations:1\n"
-    "BM_string_memcpy/128/1/4/iterations:1\n"
-    "BM_string_memcpy/128/1/8/iterations:1\n"
-    "BM_string_memcpy/128/1/16/iterations:1\n"
-    "BM_string_memcpy/128/1/32/iterations:1\n"
-    "BM_string_memcpy/128/2/1/iterations:1\n"
-    "BM_string_memcpy/128/2/2/iterations:1\n"
-    "BM_string_memcpy/128/2/4/iterations:1\n"
-    "BM_string_memcpy/128/2/8/iterations:1\n"
-    "BM_string_memcpy/128/2/16/iterations:1\n"
-    "BM_string_memcpy/128/2/32/iterations:1\n"
-    "BM_string_memcpy/128/4/1/iterations:1\n"
-    "BM_string_memcpy/128/4/2/iterations:1\n"
-    "BM_string_memcpy/128/4/4/iterations:1\n"
-    "BM_string_memcpy/128/4/8/iterations:1\n"
-    "BM_string_memcpy/128/4/16/iterations:1\n"
-    "BM_string_memcpy/128/4/32/iterations:1\n"
-    "BM_string_memcpy/128/8/1/iterations:1\n"
-    "BM_string_memcpy/128/8/2/iterations:1\n"
-    "BM_string_memcpy/128/8/4/iterations:1\n"
-    "BM_string_memcpy/128/8/8/iterations:1\n"
-    "BM_string_memcpy/128/8/16/iterations:1\n"
-    "BM_string_memcpy/128/8/32/iterations:1\n"
-    "BM_string_memcpy/128/16/1/iterations:1\n"
-    "BM_string_memcpy/128/16/2/iterations:1\n"
-    "BM_string_memcpy/128/16/4/iterations:1\n"
-    "BM_string_memcpy/128/16/8/iterations:1\n"
-    "BM_string_memcpy/128/16/16/iterations:1\n"
-    "BM_string_memcpy/128/16/32/iterations:1\n"
-    "BM_string_memcpy/128/32/1/iterations:1\n"
-    "BM_string_memcpy/128/32/2/iterations:1\n"
-    "BM_string_memcpy/128/32/4/iterations:1\n"
-    "BM_string_memcpy/128/32/8/iterations:1\n"
-    "BM_string_memcpy/128/32/16/iterations:1\n"
-    "BM_string_memcpy/128/32/32/iterations:1\n"
-    "BM_string_memcpy/136/0/0/iterations:1\n"
-    "BM_string_memcpy/136/1/1/iterations:1\n"
-    "BM_string_memcpy/136/1/2/iterations:1\n"
-    "BM_string_memcpy/136/1/4/iterations:1\n"
-    "BM_string_memcpy/136/1/8/iterations:1\n"
-    "BM_string_memcpy/136/1/16/iterations:1\n"
-    "BM_string_memcpy/136/1/32/iterations:1\n"
-    "BM_string_memcpy/136/2/1/iterations:1\n"
-    "BM_string_memcpy/136/2/2/iterations:1\n"
-    "BM_string_memcpy/136/2/4/iterations:1\n"
-    "BM_string_memcpy/136/2/8/iterations:1\n"
-    "BM_string_memcpy/136/2/16/iterations:1\n"
-    "BM_string_memcpy/136/2/32/iterations:1\n"
-    "BM_string_memcpy/136/4/1/iterations:1\n"
-    "BM_string_memcpy/136/4/2/iterations:1\n"
-    "BM_string_memcpy/136/4/4/iterations:1\n"
-    "BM_string_memcpy/136/4/8/iterations:1\n"
-    "BM_string_memcpy/136/4/16/iterations:1\n"
-    "BM_string_memcpy/136/4/32/iterations:1\n"
-    "BM_string_memcpy/136/8/1/iterations:1\n"
-    "BM_string_memcpy/136/8/2/iterations:1\n"
-    "BM_string_memcpy/136/8/4/iterations:1\n"
-    "BM_string_memcpy/136/8/8/iterations:1\n"
-    "BM_string_memcpy/136/8/16/iterations:1\n"
-    "BM_string_memcpy/136/8/32/iterations:1\n"
-    "BM_string_memcpy/136/16/1/iterations:1\n"
-    "BM_string_memcpy/136/16/2/iterations:1\n"
-    "BM_string_memcpy/136/16/4/iterations:1\n"
-    "BM_string_memcpy/136/16/8/iterations:1\n"
-    "BM_string_memcpy/136/16/16/iterations:1\n"
-    "BM_string_memcpy/136/16/32/iterations:1\n"
-    "BM_string_memcpy/136/32/1/iterations:1\n"
-    "BM_string_memcpy/136/32/2/iterations:1\n"
-    "BM_string_memcpy/136/32/4/iterations:1\n"
-    "BM_string_memcpy/136/32/8/iterations:1\n"
-    "BM_string_memcpy/136/32/16/iterations:1\n"
-    "BM_string_memcpy/136/32/32/iterations:1\n"
-    "BM_string_memcpy/144/0/0/iterations:1\n"
-    "BM_string_memcpy/144/1/1/iterations:1\n"
-    "BM_string_memcpy/144/1/2/iterations:1\n"
-    "BM_string_memcpy/144/1/4/iterations:1\n"
-    "BM_string_memcpy/144/1/8/iterations:1\n"
-    "BM_string_memcpy/144/1/16/iterations:1\n"
-    "BM_string_memcpy/144/1/32/iterations:1\n"
-    "BM_string_memcpy/144/2/1/iterations:1\n"
-    "BM_string_memcpy/144/2/2/iterations:1\n"
-    "BM_string_memcpy/144/2/4/iterations:1\n"
-    "BM_string_memcpy/144/2/8/iterations:1\n"
-    "BM_string_memcpy/144/2/16/iterations:1\n"
-    "BM_string_memcpy/144/2/32/iterations:1\n"
-    "BM_string_memcpy/144/4/1/iterations:1\n"
-    "BM_string_memcpy/144/4/2/iterations:1\n"
-    "BM_string_memcpy/144/4/4/iterations:1\n"
-    "BM_string_memcpy/144/4/8/iterations:1\n"
-    "BM_string_memcpy/144/4/16/iterations:1\n"
-    "BM_string_memcpy/144/4/32/iterations:1\n"
-    "BM_string_memcpy/144/8/1/iterations:1\n"
-    "BM_string_memcpy/144/8/2/iterations:1\n"
-    "BM_string_memcpy/144/8/4/iterations:1\n"
-    "BM_string_memcpy/144/8/8/iterations:1\n"
-    "BM_string_memcpy/144/8/16/iterations:1\n"
-    "BM_string_memcpy/144/8/32/iterations:1\n"
-    "BM_string_memcpy/144/16/1/iterations:1\n"
-    "BM_string_memcpy/144/16/2/iterations:1\n"
-    "BM_string_memcpy/144/16/4/iterations:1\n"
-    "BM_string_memcpy/144/16/8/iterations:1\n"
-    "BM_string_memcpy/144/16/16/iterations:1\n"
-    "BM_string_memcpy/144/16/32/iterations:1\n"
-    "BM_string_memcpy/144/32/1/iterations:1\n"
-    "BM_string_memcpy/144/32/2/iterations:1\n"
-    "BM_string_memcpy/144/32/4/iterations:1\n"
-    "BM_string_memcpy/144/32/8/iterations:1\n"
-    "BM_string_memcpy/144/32/16/iterations:1\n"
-    "BM_string_memcpy/144/32/32/iterations:1\n"
-    "BM_string_memcpy/160/0/0/iterations:1\n"
-    "BM_string_memcpy/160/1/1/iterations:1\n"
-    "BM_string_memcpy/160/1/2/iterations:1\n"
-    "BM_string_memcpy/160/1/4/iterations:1\n"
-    "BM_string_memcpy/160/1/8/iterations:1\n"
-    "BM_string_memcpy/160/1/16/iterations:1\n"
-    "BM_string_memcpy/160/1/32/iterations:1\n"
-    "BM_string_memcpy/160/2/1/iterations:1\n"
-    "BM_string_memcpy/160/2/2/iterations:1\n"
-    "BM_string_memcpy/160/2/4/iterations:1\n"
-    "BM_string_memcpy/160/2/8/iterations:1\n"
-    "BM_string_memcpy/160/2/16/iterations:1\n"
-    "BM_string_memcpy/160/2/32/iterations:1\n"
-    "BM_string_memcpy/160/4/1/iterations:1\n"
-    "BM_string_memcpy/160/4/2/iterations:1\n"
-    "BM_string_memcpy/160/4/4/iterations:1\n"
-    "BM_string_memcpy/160/4/8/iterations:1\n"
-    "BM_string_memcpy/160/4/16/iterations:1\n"
-    "BM_string_memcpy/160/4/32/iterations:1\n"
-    "BM_string_memcpy/160/8/1/iterations:1\n"
-    "BM_string_memcpy/160/8/2/iterations:1\n"
-    "BM_string_memcpy/160/8/4/iterations:1\n"
-    "BM_string_memcpy/160/8/8/iterations:1\n"
-    "BM_string_memcpy/160/8/16/iterations:1\n"
-    "BM_string_memcpy/160/8/32/iterations:1\n"
-    "BM_string_memcpy/160/16/1/iterations:1\n"
-    "BM_string_memcpy/160/16/2/iterations:1\n"
-    "BM_string_memcpy/160/16/4/iterations:1\n"
-    "BM_string_memcpy/160/16/8/iterations:1\n"
-    "BM_string_memcpy/160/16/16/iterations:1\n"
-    "BM_string_memcpy/160/16/32/iterations:1\n"
-    "BM_string_memcpy/160/32/1/iterations:1\n"
-    "BM_string_memcpy/160/32/2/iterations:1\n"
-    "BM_string_memcpy/160/32/4/iterations:1\n"
-    "BM_string_memcpy/160/32/8/iterations:1\n"
-    "BM_string_memcpy/160/32/16/iterations:1\n"
-    "BM_string_memcpy/160/32/32/iterations:1\n"
-    "BM_string_memcpy/176/0/0/iterations:1\n"
-    "BM_string_memcpy/176/1/1/iterations:1\n"
-    "BM_string_memcpy/176/1/2/iterations:1\n"
-    "BM_string_memcpy/176/1/4/iterations:1\n"
-    "BM_string_memcpy/176/1/8/iterations:1\n"
-    "BM_string_memcpy/176/1/16/iterations:1\n"
-    "BM_string_memcpy/176/1/32/iterations:1\n"
-    "BM_string_memcpy/176/2/1/iterations:1\n"
-    "BM_string_memcpy/176/2/2/iterations:1\n"
-    "BM_string_memcpy/176/2/4/iterations:1\n"
-    "BM_string_memcpy/176/2/8/iterations:1\n"
-    "BM_string_memcpy/176/2/16/iterations:1\n"
-    "BM_string_memcpy/176/2/32/iterations:1\n"
-    "BM_string_memcpy/176/4/1/iterations:1\n"
-    "BM_string_memcpy/176/4/2/iterations:1\n"
-    "BM_string_memcpy/176/4/4/iterations:1\n"
-    "BM_string_memcpy/176/4/8/iterations:1\n"
-    "BM_string_memcpy/176/4/16/iterations:1\n"
-    "BM_string_memcpy/176/4/32/iterations:1\n"
-    "BM_string_memcpy/176/8/1/iterations:1\n"
-    "BM_string_memcpy/176/8/2/iterations:1\n"
-    "BM_string_memcpy/176/8/4/iterations:1\n"
-    "BM_string_memcpy/176/8/8/iterations:1\n"
-    "BM_string_memcpy/176/8/16/iterations:1\n"
-    "BM_string_memcpy/176/8/32/iterations:1\n"
-    "BM_string_memcpy/176/16/1/iterations:1\n"
-    "BM_string_memcpy/176/16/2/iterations:1\n"
-    "BM_string_memcpy/176/16/4/iterations:1\n"
-    "BM_string_memcpy/176/16/8/iterations:1\n"
-    "BM_string_memcpy/176/16/16/iterations:1\n"
-    "BM_string_memcpy/176/16/32/iterations:1\n"
-    "BM_string_memcpy/176/32/1/iterations:1\n"
-    "BM_string_memcpy/176/32/2/iterations:1\n"
-    "BM_string_memcpy/176/32/4/iterations:1\n"
-    "BM_string_memcpy/176/32/8/iterations:1\n"
-    "BM_string_memcpy/176/32/16/iterations:1\n"
-    "BM_string_memcpy/176/32/32/iterations:1\n"
-    "BM_string_memcpy/192/0/0/iterations:1\n"
-    "BM_string_memcpy/192/1/1/iterations:1\n"
-    "BM_string_memcpy/192/1/2/iterations:1\n"
-    "BM_string_memcpy/192/1/4/iterations:1\n"
-    "BM_string_memcpy/192/1/8/iterations:1\n"
-    "BM_string_memcpy/192/1/16/iterations:1\n"
-    "BM_string_memcpy/192/1/32/iterations:1\n"
-    "BM_string_memcpy/192/2/1/iterations:1\n"
-    "BM_string_memcpy/192/2/2/iterations:1\n"
-    "BM_string_memcpy/192/2/4/iterations:1\n"
-    "BM_string_memcpy/192/2/8/iterations:1\n"
-    "BM_string_memcpy/192/2/16/iterations:1\n"
-    "BM_string_memcpy/192/2/32/iterations:1\n"
-    "BM_string_memcpy/192/4/1/iterations:1\n"
-    "BM_string_memcpy/192/4/2/iterations:1\n"
-    "BM_string_memcpy/192/4/4/iterations:1\n"
-    "BM_string_memcpy/192/4/8/iterations:1\n"
-    "BM_string_memcpy/192/4/16/iterations:1\n"
-    "BM_string_memcpy/192/4/32/iterations:1\n"
-    "BM_string_memcpy/192/8/1/iterations:1\n"
-    "BM_string_memcpy/192/8/2/iterations:1\n"
-    "BM_string_memcpy/192/8/4/iterations:1\n"
-    "BM_string_memcpy/192/8/8/iterations:1\n"
-    "BM_string_memcpy/192/8/16/iterations:1\n"
-    "BM_string_memcpy/192/8/32/iterations:1\n"
-    "BM_string_memcpy/192/16/1/iterations:1\n"
-    "BM_string_memcpy/192/16/2/iterations:1\n"
-    "BM_string_memcpy/192/16/4/iterations:1\n"
-    "BM_string_memcpy/192/16/8/iterations:1\n"
-    "BM_string_memcpy/192/16/16/iterations:1\n"
-    "BM_string_memcpy/192/16/32/iterations:1\n"
-    "BM_string_memcpy/192/32/1/iterations:1\n"
-    "BM_string_memcpy/192/32/2/iterations:1\n"
-    "BM_string_memcpy/192/32/4/iterations:1\n"
-    "BM_string_memcpy/192/32/8/iterations:1\n"
-    "BM_string_memcpy/192/32/16/iterations:1\n"
-    "BM_string_memcpy/192/32/32/iterations:1\n"
-    "BM_string_memcpy/208/0/0/iterations:1\n"
-    "BM_string_memcpy/208/1/1/iterations:1\n"
-    "BM_string_memcpy/208/1/2/iterations:1\n"
-    "BM_string_memcpy/208/1/4/iterations:1\n"
-    "BM_string_memcpy/208/1/8/iterations:1\n"
-    "BM_string_memcpy/208/1/16/iterations:1\n"
-    "BM_string_memcpy/208/1/32/iterations:1\n"
-    "BM_string_memcpy/208/2/1/iterations:1\n"
-    "BM_string_memcpy/208/2/2/iterations:1\n"
-    "BM_string_memcpy/208/2/4/iterations:1\n"
-    "BM_string_memcpy/208/2/8/iterations:1\n"
-    "BM_string_memcpy/208/2/16/iterations:1\n"
-    "BM_string_memcpy/208/2/32/iterations:1\n"
-    "BM_string_memcpy/208/4/1/iterations:1\n"
-    "BM_string_memcpy/208/4/2/iterations:1\n"
-    "BM_string_memcpy/208/4/4/iterations:1\n"
-    "BM_string_memcpy/208/4/8/iterations:1\n"
-    "BM_string_memcpy/208/4/16/iterations:1\n"
-    "BM_string_memcpy/208/4/32/iterations:1\n"
-    "BM_string_memcpy/208/8/1/iterations:1\n"
-    "BM_string_memcpy/208/8/2/iterations:1\n"
-    "BM_string_memcpy/208/8/4/iterations:1\n"
-    "BM_string_memcpy/208/8/8/iterations:1\n"
-    "BM_string_memcpy/208/8/16/iterations:1\n"
-    "BM_string_memcpy/208/8/32/iterations:1\n"
-    "BM_string_memcpy/208/16/1/iterations:1\n"
-    "BM_string_memcpy/208/16/2/iterations:1\n"
-    "BM_string_memcpy/208/16/4/iterations:1\n"
-    "BM_string_memcpy/208/16/8/iterations:1\n"
-    "BM_string_memcpy/208/16/16/iterations:1\n"
-    "BM_string_memcpy/208/16/32/iterations:1\n"
-    "BM_string_memcpy/208/32/1/iterations:1\n"
-    "BM_string_memcpy/208/32/2/iterations:1\n"
-    "BM_string_memcpy/208/32/4/iterations:1\n"
-    "BM_string_memcpy/208/32/8/iterations:1\n"
-    "BM_string_memcpy/208/32/16/iterations:1\n"
-    "BM_string_memcpy/208/32/32/iterations:1\n"
-    "BM_string_memcpy/224/0/0/iterations:1\n"
-    "BM_string_memcpy/224/1/1/iterations:1\n"
-    "BM_string_memcpy/224/1/2/iterations:1\n"
-    "BM_string_memcpy/224/1/4/iterations:1\n"
-    "BM_string_memcpy/224/1/8/iterations:1\n"
-    "BM_string_memcpy/224/1/16/iterations:1\n"
-    "BM_string_memcpy/224/1/32/iterations:1\n"
-    "BM_string_memcpy/224/2/1/iterations:1\n"
-    "BM_string_memcpy/224/2/2/iterations:1\n"
-    "BM_string_memcpy/224/2/4/iterations:1\n"
-    "BM_string_memcpy/224/2/8/iterations:1\n"
-    "BM_string_memcpy/224/2/16/iterations:1\n"
-    "BM_string_memcpy/224/2/32/iterations:1\n"
-    "BM_string_memcpy/224/4/1/iterations:1\n"
-    "BM_string_memcpy/224/4/2/iterations:1\n"
-    "BM_string_memcpy/224/4/4/iterations:1\n"
-    "BM_string_memcpy/224/4/8/iterations:1\n"
-    "BM_string_memcpy/224/4/16/iterations:1\n"
-    "BM_string_memcpy/224/4/32/iterations:1\n"
-    "BM_string_memcpy/224/8/1/iterations:1\n"
-    "BM_string_memcpy/224/8/2/iterations:1\n"
-    "BM_string_memcpy/224/8/4/iterations:1\n"
-    "BM_string_memcpy/224/8/8/iterations:1\n"
-    "BM_string_memcpy/224/8/16/iterations:1\n"
-    "BM_string_memcpy/224/8/32/iterations:1\n"
-    "BM_string_memcpy/224/16/1/iterations:1\n"
-    "BM_string_memcpy/224/16/2/iterations:1\n"
-    "BM_string_memcpy/224/16/4/iterations:1\n"
-    "BM_string_memcpy/224/16/8/iterations:1\n"
-    "BM_string_memcpy/224/16/16/iterations:1\n"
-    "BM_string_memcpy/224/16/32/iterations:1\n"
-    "BM_string_memcpy/224/32/1/iterations:1\n"
-    "BM_string_memcpy/224/32/2/iterations:1\n"
-    "BM_string_memcpy/224/32/4/iterations:1\n"
-    "BM_string_memcpy/224/32/8/iterations:1\n"
-    "BM_string_memcpy/224/32/16/iterations:1\n"
-    "BM_string_memcpy/224/32/32/iterations:1\n"
-    "BM_string_memcpy/240/0/0/iterations:1\n"
-    "BM_string_memcpy/240/1/1/iterations:1\n"
-    "BM_string_memcpy/240/1/2/iterations:1\n"
-    "BM_string_memcpy/240/1/4/iterations:1\n"
-    "BM_string_memcpy/240/1/8/iterations:1\n"
-    "BM_string_memcpy/240/1/16/iterations:1\n"
-    "BM_string_memcpy/240/1/32/iterations:1\n"
-    "BM_string_memcpy/240/2/1/iterations:1\n"
-    "BM_string_memcpy/240/2/2/iterations:1\n"
-    "BM_string_memcpy/240/2/4/iterations:1\n"
-    "BM_string_memcpy/240/2/8/iterations:1\n"
-    "BM_string_memcpy/240/2/16/iterations:1\n"
-    "BM_string_memcpy/240/2/32/iterations:1\n"
-    "BM_string_memcpy/240/4/1/iterations:1\n"
-    "BM_string_memcpy/240/4/2/iterations:1\n"
-    "BM_string_memcpy/240/4/4/iterations:1\n"
-    "BM_string_memcpy/240/4/8/iterations:1\n"
-    "BM_string_memcpy/240/4/16/iterations:1\n"
-    "BM_string_memcpy/240/4/32/iterations:1\n"
-    "BM_string_memcpy/240/8/1/iterations:1\n"
-    "BM_string_memcpy/240/8/2/iterations:1\n"
-    "BM_string_memcpy/240/8/4/iterations:1\n"
-    "BM_string_memcpy/240/8/8/iterations:1\n"
-    "BM_string_memcpy/240/8/16/iterations:1\n"
-    "BM_string_memcpy/240/8/32/iterations:1\n"
-    "BM_string_memcpy/240/16/1/iterations:1\n"
-    "BM_string_memcpy/240/16/2/iterations:1\n"
-    "BM_string_memcpy/240/16/4/iterations:1\n"
-    "BM_string_memcpy/240/16/8/iterations:1\n"
-    "BM_string_memcpy/240/16/16/iterations:1\n"
-    "BM_string_memcpy/240/16/32/iterations:1\n"
-    "BM_string_memcpy/240/32/1/iterations:1\n"
-    "BM_string_memcpy/240/32/2/iterations:1\n"
-    "BM_string_memcpy/240/32/4/iterations:1\n"
-    "BM_string_memcpy/240/32/8/iterations:1\n"
-    "BM_string_memcpy/240/32/16/iterations:1\n"
-    "BM_string_memcpy/240/32/32/iterations:1\n"
-    "BM_string_memcpy/256/0/0/iterations:1\n"
-    "BM_string_memcpy/256/1/1/iterations:1\n"
-    "BM_string_memcpy/256/1/2/iterations:1\n"
-    "BM_string_memcpy/256/1/4/iterations:1\n"
-    "BM_string_memcpy/256/1/8/iterations:1\n"
-    "BM_string_memcpy/256/1/16/iterations:1\n"
-    "BM_string_memcpy/256/1/32/iterations:1\n"
-    "BM_string_memcpy/256/2/1/iterations:1\n"
-    "BM_string_memcpy/256/2/2/iterations:1\n"
-    "BM_string_memcpy/256/2/4/iterations:1\n"
-    "BM_string_memcpy/256/2/8/iterations:1\n"
-    "BM_string_memcpy/256/2/16/iterations:1\n"
-    "BM_string_memcpy/256/2/32/iterations:1\n"
-    "BM_string_memcpy/256/4/1/iterations:1\n"
-    "BM_string_memcpy/256/4/2/iterations:1\n"
-    "BM_string_memcpy/256/4/4/iterations:1\n"
-    "BM_string_memcpy/256/4/8/iterations:1\n"
-    "BM_string_memcpy/256/4/16/iterations:1\n"
-    "BM_string_memcpy/256/4/32/iterations:1\n"
-    "BM_string_memcpy/256/8/1/iterations:1\n"
-    "BM_string_memcpy/256/8/2/iterations:1\n"
-    "BM_string_memcpy/256/8/4/iterations:1\n"
-    "BM_string_memcpy/256/8/8/iterations:1\n"
-    "BM_string_memcpy/256/8/16/iterations:1\n"
-    "BM_string_memcpy/256/8/32/iterations:1\n"
-    "BM_string_memcpy/256/16/1/iterations:1\n"
-    "BM_string_memcpy/256/16/2/iterations:1\n"
-    "BM_string_memcpy/256/16/4/iterations:1\n"
-    "BM_string_memcpy/256/16/8/iterations:1\n"
-    "BM_string_memcpy/256/16/16/iterations:1\n"
-    "BM_string_memcpy/256/16/32/iterations:1\n"
-    "BM_string_memcpy/256/32/1/iterations:1\n"
-    "BM_string_memcpy/256/32/2/iterations:1\n"
-    "BM_string_memcpy/256/32/4/iterations:1\n"
-    "BM_string_memcpy/256/32/8/iterations:1\n"
-    "BM_string_memcpy/256/32/16/iterations:1\n"
-    "BM_string_memcpy/256/32/32/iterations:1\n"
-    "BM_string_memcpy/512/0/0/iterations:1\n"
-    "BM_string_memcpy/512/1/1/iterations:1\n"
-    "BM_string_memcpy/512/1/2/iterations:1\n"
-    "BM_string_memcpy/512/1/4/iterations:1\n"
-    "BM_string_memcpy/512/1/8/iterations:1\n"
-    "BM_string_memcpy/512/1/16/iterations:1\n"
-    "BM_string_memcpy/512/1/32/iterations:1\n"
-    "BM_string_memcpy/512/2/1/iterations:1\n"
-    "BM_string_memcpy/512/2/2/iterations:1\n"
-    "BM_string_memcpy/512/2/4/iterations:1\n"
-    "BM_string_memcpy/512/2/8/iterations:1\n"
-    "BM_string_memcpy/512/2/16/iterations:1\n"
-    "BM_string_memcpy/512/2/32/iterations:1\n"
-    "BM_string_memcpy/512/4/1/iterations:1\n"
-    "BM_string_memcpy/512/4/2/iterations:1\n"
-    "BM_string_memcpy/512/4/4/iterations:1\n"
-    "BM_string_memcpy/512/4/8/iterations:1\n"
-    "BM_string_memcpy/512/4/16/iterations:1\n"
-    "BM_string_memcpy/512/4/32/iterations:1\n"
-    "BM_string_memcpy/512/8/1/iterations:1\n"
-    "BM_string_memcpy/512/8/2/iterations:1\n"
-    "BM_string_memcpy/512/8/4/iterations:1\n"
-    "BM_string_memcpy/512/8/8/iterations:1\n"
-    "BM_string_memcpy/512/8/16/iterations:1\n"
-    "BM_string_memcpy/512/8/32/iterations:1\n"
-    "BM_string_memcpy/512/16/1/iterations:1\n"
-    "BM_string_memcpy/512/16/2/iterations:1\n"
-    "BM_string_memcpy/512/16/4/iterations:1\n"
-    "BM_string_memcpy/512/16/8/iterations:1\n"
-    "BM_string_memcpy/512/16/16/iterations:1\n"
-    "BM_string_memcpy/512/16/32/iterations:1\n"
-    "BM_string_memcpy/512/32/1/iterations:1\n"
-    "BM_string_memcpy/512/32/2/iterations:1\n"
-    "BM_string_memcpy/512/32/4/iterations:1\n"
-    "BM_string_memcpy/512/32/8/iterations:1\n"
-    "BM_string_memcpy/512/32/16/iterations:1\n"
-    "BM_string_memcpy/512/32/32/iterations:1\n"
-    "BM_string_memcpy/1024/0/0/iterations:1\n"
-    "BM_string_memcpy/1024/1/1/iterations:1\n"
-    "BM_string_memcpy/1024/1/2/iterations:1\n"
-    "BM_string_memcpy/1024/1/4/iterations:1\n"
-    "BM_string_memcpy/1024/1/8/iterations:1\n"
-    "BM_string_memcpy/1024/1/16/iterations:1\n"
-    "BM_string_memcpy/1024/1/32/iterations:1\n"
-    "BM_string_memcpy/1024/2/1/iterations:1\n"
-    "BM_string_memcpy/1024/2/2/iterations:1\n"
-    "BM_string_memcpy/1024/2/4/iterations:1\n"
-    "BM_string_memcpy/1024/2/8/iterations:1\n"
-    "BM_string_memcpy/1024/2/16/iterations:1\n"
-    "BM_string_memcpy/1024/2/32/iterations:1\n"
-    "BM_string_memcpy/1024/4/1/iterations:1\n"
-    "BM_string_memcpy/1024/4/2/iterations:1\n"
-    "BM_string_memcpy/1024/4/4/iterations:1\n"
-    "BM_string_memcpy/1024/4/8/iterations:1\n"
-    "BM_string_memcpy/1024/4/16/iterations:1\n"
-    "BM_string_memcpy/1024/4/32/iterations:1\n"
-    "BM_string_memcpy/1024/8/1/iterations:1\n"
-    "BM_string_memcpy/1024/8/2/iterations:1\n"
-    "BM_string_memcpy/1024/8/4/iterations:1\n"
-    "BM_string_memcpy/1024/8/8/iterations:1\n"
-    "BM_string_memcpy/1024/8/16/iterations:1\n"
-    "BM_string_memcpy/1024/8/32/iterations:1\n"
-    "BM_string_memcpy/1024/16/1/iterations:1\n"
-    "BM_string_memcpy/1024/16/2/iterations:1\n"
-    "BM_string_memcpy/1024/16/4/iterations:1\n"
-    "BM_string_memcpy/1024/16/8/iterations:1\n"
-    "BM_string_memcpy/1024/16/16/iterations:1\n"
-    "BM_string_memcpy/1024/16/32/iterations:1\n"
-    "BM_string_memcpy/1024/32/1/iterations:1\n"
-    "BM_string_memcpy/1024/32/2/iterations:1\n"
-    "BM_string_memcpy/1024/32/4/iterations:1\n"
-    "BM_string_memcpy/1024/32/8/iterations:1\n"
-    "BM_string_memcpy/1024/32/16/iterations:1\n"
-    "BM_string_memcpy/1024/32/32/iterations:1\n"
-    "BM_string_memcpy/8192/0/0/iterations:1\n"
-    "BM_string_memcpy/8192/1/1/iterations:1\n"
-    "BM_string_memcpy/8192/1/2/iterations:1\n"
-    "BM_string_memcpy/8192/1/4/iterations:1\n"
-    "BM_string_memcpy/8192/1/8/iterations:1\n"
-    "BM_string_memcpy/8192/1/16/iterations:1\n"
-    "BM_string_memcpy/8192/1/32/iterations:1\n"
-    "BM_string_memcpy/8192/2/1/iterations:1\n"
-    "BM_string_memcpy/8192/2/2/iterations:1\n"
-    "BM_string_memcpy/8192/2/4/iterations:1\n"
-    "BM_string_memcpy/8192/2/8/iterations:1\n"
-    "BM_string_memcpy/8192/2/16/iterations:1\n"
-    "BM_string_memcpy/8192/2/32/iterations:1\n"
-    "BM_string_memcpy/8192/4/1/iterations:1\n"
-    "BM_string_memcpy/8192/4/2/iterations:1\n"
-    "BM_string_memcpy/8192/4/4/iterations:1\n"
-    "BM_string_memcpy/8192/4/8/iterations:1\n"
-    "BM_string_memcpy/8192/4/16/iterations:1\n"
-    "BM_string_memcpy/8192/4/32/iterations:1\n"
-    "BM_string_memcpy/8192/8/1/iterations:1\n"
-    "BM_string_memcpy/8192/8/2/iterations:1\n"
-    "BM_string_memcpy/8192/8/4/iterations:1\n"
-    "BM_string_memcpy/8192/8/8/iterations:1\n"
-    "BM_string_memcpy/8192/8/16/iterations:1\n"
-    "BM_string_memcpy/8192/8/32/iterations:1\n"
-    "BM_string_memcpy/8192/16/1/iterations:1\n"
-    "BM_string_memcpy/8192/16/2/iterations:1\n"
-    "BM_string_memcpy/8192/16/4/iterations:1\n"
-    "BM_string_memcpy/8192/16/8/iterations:1\n"
-    "BM_string_memcpy/8192/16/16/iterations:1\n"
-    "BM_string_memcpy/8192/16/32/iterations:1\n"
-    "BM_string_memcpy/8192/32/1/iterations:1\n"
-    "BM_string_memcpy/8192/32/2/iterations:1\n"
-    "BM_string_memcpy/8192/32/4/iterations:1\n"
-    "BM_string_memcpy/8192/32/8/iterations:1\n"
-    "BM_string_memcpy/8192/32/16/iterations:1\n"
-    "BM_string_memcpy/8192/32/32/iterations:1\n"
-    "BM_string_memcpy/16384/0/0/iterations:1\n"
-    "BM_string_memcpy/16384/1/1/iterations:1\n"
-    "BM_string_memcpy/16384/1/2/iterations:1\n"
-    "BM_string_memcpy/16384/1/4/iterations:1\n"
-    "BM_string_memcpy/16384/1/8/iterations:1\n"
-    "BM_string_memcpy/16384/1/16/iterations:1\n"
-    "BM_string_memcpy/16384/1/32/iterations:1\n"
-    "BM_string_memcpy/16384/2/1/iterations:1\n"
-    "BM_string_memcpy/16384/2/2/iterations:1\n"
-    "BM_string_memcpy/16384/2/4/iterations:1\n"
-    "BM_string_memcpy/16384/2/8/iterations:1\n"
-    "BM_string_memcpy/16384/2/16/iterations:1\n"
-    "BM_string_memcpy/16384/2/32/iterations:1\n"
-    "BM_string_memcpy/16384/4/1/iterations:1\n"
-    "BM_string_memcpy/16384/4/2/iterations:1\n"
-    "BM_string_memcpy/16384/4/4/iterations:1\n"
-    "BM_string_memcpy/16384/4/8/iterations:1\n"
-    "BM_string_memcpy/16384/4/16/iterations:1\n"
-    "BM_string_memcpy/16384/4/32/iterations:1\n"
-    "BM_string_memcpy/16384/8/1/iterations:1\n"
-    "BM_string_memcpy/16384/8/2/iterations:1\n"
-    "BM_string_memcpy/16384/8/4/iterations:1\n"
-    "BM_string_memcpy/16384/8/8/iterations:1\n"
-    "BM_string_memcpy/16384/8/16/iterations:1\n"
-    "BM_string_memcpy/16384/8/32/iterations:1\n"
-    "BM_string_memcpy/16384/16/1/iterations:1\n"
-    "BM_string_memcpy/16384/16/2/iterations:1\n"
-    "BM_string_memcpy/16384/16/4/iterations:1\n"
-    "BM_string_memcpy/16384/16/8/iterations:1\n"
-    "BM_string_memcpy/16384/16/16/iterations:1\n"
-    "BM_string_memcpy/16384/16/32/iterations:1\n"
-    "BM_string_memcpy/16384/32/1/iterations:1\n"
-    "BM_string_memcpy/16384/32/2/iterations:1\n"
-    "BM_string_memcpy/16384/32/4/iterations:1\n"
-    "BM_string_memcpy/16384/32/8/iterations:1\n"
-    "BM_string_memcpy/16384/32/16/iterations:1\n"
-    "BM_string_memcpy/16384/32/32/iterations:1\n"
-    "BM_string_memcpy/32768/0/0/iterations:1\n"
-    "BM_string_memcpy/32768/1/1/iterations:1\n"
-    "BM_string_memcpy/32768/1/2/iterations:1\n"
-    "BM_string_memcpy/32768/1/4/iterations:1\n"
-    "BM_string_memcpy/32768/1/8/iterations:1\n"
-    "BM_string_memcpy/32768/1/16/iterations:1\n"
-    "BM_string_memcpy/32768/1/32/iterations:1\n"
-    "BM_string_memcpy/32768/2/1/iterations:1\n"
-    "BM_string_memcpy/32768/2/2/iterations:1\n"
-    "BM_string_memcpy/32768/2/4/iterations:1\n"
-    "BM_string_memcpy/32768/2/8/iterations:1\n"
-    "BM_string_memcpy/32768/2/16/iterations:1\n"
-    "BM_string_memcpy/32768/2/32/iterations:1\n"
-    "BM_string_memcpy/32768/4/1/iterations:1\n"
-    "BM_string_memcpy/32768/4/2/iterations:1\n"
-    "BM_string_memcpy/32768/4/4/iterations:1\n"
-    "BM_string_memcpy/32768/4/8/iterations:1\n"
-    "BM_string_memcpy/32768/4/16/iterations:1\n"
-    "BM_string_memcpy/32768/4/32/iterations:1\n"
-    "BM_string_memcpy/32768/8/1/iterations:1\n"
-    "BM_string_memcpy/32768/8/2/iterations:1\n"
-    "BM_string_memcpy/32768/8/4/iterations:1\n"
-    "BM_string_memcpy/32768/8/8/iterations:1\n"
-    "BM_string_memcpy/32768/8/16/iterations:1\n"
-    "BM_string_memcpy/32768/8/32/iterations:1\n"
-    "BM_string_memcpy/32768/16/1/iterations:1\n"
-    "BM_string_memcpy/32768/16/2/iterations:1\n"
-    "BM_string_memcpy/32768/16/4/iterations:1\n"
-    "BM_string_memcpy/32768/16/8/iterations:1\n"
-    "BM_string_memcpy/32768/16/16/iterations:1\n"
-    "BM_string_memcpy/32768/16/32/iterations:1\n"
-    "BM_string_memcpy/32768/32/1/iterations:1\n"
-    "BM_string_memcpy/32768/32/2/iterations:1\n"
-    "BM_string_memcpy/32768/32/4/iterations:1\n"
-    "BM_string_memcpy/32768/32/8/iterations:1\n"
-    "BM_string_memcpy/32768/32/16/iterations:1\n"
-    "BM_string_memcpy/32768/32/32/iterations:1\n"
-    "BM_string_memcpy/65536/0/0/iterations:1\n"
-    "BM_string_memcpy/65536/1/1/iterations:1\n"
-    "BM_string_memcpy/65536/1/2/iterations:1\n"
-    "BM_string_memcpy/65536/1/4/iterations:1\n"
-    "BM_string_memcpy/65536/1/8/iterations:1\n"
-    "BM_string_memcpy/65536/1/16/iterations:1\n"
-    "BM_string_memcpy/65536/1/32/iterations:1\n"
-    "BM_string_memcpy/65536/2/1/iterations:1\n"
-    "BM_string_memcpy/65536/2/2/iterations:1\n"
-    "BM_string_memcpy/65536/2/4/iterations:1\n"
-    "BM_string_memcpy/65536/2/8/iterations:1\n"
-    "BM_string_memcpy/65536/2/16/iterations:1\n"
-    "BM_string_memcpy/65536/2/32/iterations:1\n"
-    "BM_string_memcpy/65536/4/1/iterations:1\n"
-    "BM_string_memcpy/65536/4/2/iterations:1\n"
-    "BM_string_memcpy/65536/4/4/iterations:1\n"
-    "BM_string_memcpy/65536/4/8/iterations:1\n"
-    "BM_string_memcpy/65536/4/16/iterations:1\n"
-    "BM_string_memcpy/65536/4/32/iterations:1\n"
-    "BM_string_memcpy/65536/8/1/iterations:1\n"
-    "BM_string_memcpy/65536/8/2/iterations:1\n"
-    "BM_string_memcpy/65536/8/4/iterations:1\n"
-    "BM_string_memcpy/65536/8/8/iterations:1\n"
-    "BM_string_memcpy/65536/8/16/iterations:1\n"
-    "BM_string_memcpy/65536/8/32/iterations:1\n"
-    "BM_string_memcpy/65536/16/1/iterations:1\n"
-    "BM_string_memcpy/65536/16/2/iterations:1\n"
-    "BM_string_memcpy/65536/16/4/iterations:1\n"
-    "BM_string_memcpy/65536/16/8/iterations:1\n"
-    "BM_string_memcpy/65536/16/16/iterations:1\n"
-    "BM_string_memcpy/65536/16/32/iterations:1\n"
-    "BM_string_memcpy/65536/32/1/iterations:1\n"
-    "BM_string_memcpy/65536/32/2/iterations:1\n"
-    "BM_string_memcpy/65536/32/4/iterations:1\n"
-    "BM_string_memcpy/65536/32/8/iterations:1\n"
-    "BM_string_memcpy/65536/32/16/iterations:1\n"
-    "BM_string_memcpy/65536/32/32/iterations:1\n"
-    "BM_string_memcpy/131072/0/0/iterations:1\n"
-    "BM_string_memcpy/131072/1/1/iterations:1\n"
-    "BM_string_memcpy/131072/1/2/iterations:1\n"
-    "BM_string_memcpy/131072/1/4/iterations:1\n"
-    "BM_string_memcpy/131072/1/8/iterations:1\n"
-    "BM_string_memcpy/131072/1/16/iterations:1\n"
-    "BM_string_memcpy/131072/1/32/iterations:1\n"
-    "BM_string_memcpy/131072/2/1/iterations:1\n"
-    "BM_string_memcpy/131072/2/2/iterations:1\n"
-    "BM_string_memcpy/131072/2/4/iterations:1\n"
-    "BM_string_memcpy/131072/2/8/iterations:1\n"
-    "BM_string_memcpy/131072/2/16/iterations:1\n"
-    "BM_string_memcpy/131072/2/32/iterations:1\n"
-    "BM_string_memcpy/131072/4/1/iterations:1\n"
-    "BM_string_memcpy/131072/4/2/iterations:1\n"
-    "BM_string_memcpy/131072/4/4/iterations:1\n"
-    "BM_string_memcpy/131072/4/8/iterations:1\n"
-    "BM_string_memcpy/131072/4/16/iterations:1\n"
-    "BM_string_memcpy/131072/4/32/iterations:1\n"
-    "BM_string_memcpy/131072/8/1/iterations:1\n"
-    "BM_string_memcpy/131072/8/2/iterations:1\n"
-    "BM_string_memcpy/131072/8/4/iterations:1\n"
-    "BM_string_memcpy/131072/8/8/iterations:1\n"
-    "BM_string_memcpy/131072/8/16/iterations:1\n"
-    "BM_string_memcpy/131072/8/32/iterations:1\n"
-    "BM_string_memcpy/131072/16/1/iterations:1\n"
-    "BM_string_memcpy/131072/16/2/iterations:1\n"
-    "BM_string_memcpy/131072/16/4/iterations:1\n"
-    "BM_string_memcpy/131072/16/8/iterations:1\n"
-    "BM_string_memcpy/131072/16/16/iterations:1\n"
-    "BM_string_memcpy/131072/16/32/iterations:1\n"
-    "BM_string_memcpy/131072/32/1/iterations:1\n"
-    "BM_string_memcpy/131072/32/2/iterations:1\n"
-    "BM_string_memcpy/131072/32/4/iterations:1\n"
-    "BM_string_memcpy/131072/32/8/iterations:1\n"
-    "BM_string_memcpy/131072/32/16/iterations:1\n"
-    "BM_string_memcpy/131072/32/32/iterations:1\n"
-    "BM_string_memcpy/262144/0/0/iterations:1\n"
-    "BM_string_memcpy/262144/1/1/iterations:1\n"
-    "BM_string_memcpy/262144/1/2/iterations:1\n"
-    "BM_string_memcpy/262144/1/4/iterations:1\n"
-    "BM_string_memcpy/262144/1/8/iterations:1\n"
-    "BM_string_memcpy/262144/1/16/iterations:1\n"
-    "BM_string_memcpy/262144/1/32/iterations:1\n"
-    "BM_string_memcpy/262144/2/1/iterations:1\n"
-    "BM_string_memcpy/262144/2/2/iterations:1\n"
-    "BM_string_memcpy/262144/2/4/iterations:1\n"
-    "BM_string_memcpy/262144/2/8/iterations:1\n"
-    "BM_string_memcpy/262144/2/16/iterations:1\n"
-    "BM_string_memcpy/262144/2/32/iterations:1\n"
-    "BM_string_memcpy/262144/4/1/iterations:1\n"
-    "BM_string_memcpy/262144/4/2/iterations:1\n"
-    "BM_string_memcpy/262144/4/4/iterations:1\n"
-    "BM_string_memcpy/262144/4/8/iterations:1\n"
-    "BM_string_memcpy/262144/4/16/iterations:1\n"
-    "BM_string_memcpy/262144/4/32/iterations:1\n"
-    "BM_string_memcpy/262144/8/1/iterations:1\n"
-    "BM_string_memcpy/262144/8/2/iterations:1\n"
-    "BM_string_memcpy/262144/8/4/iterations:1\n"
-    "BM_string_memcpy/262144/8/8/iterations:1\n"
-    "BM_string_memcpy/262144/8/16/iterations:1\n"
-    "BM_string_memcpy/262144/8/32/iterations:1\n"
-    "BM_string_memcpy/262144/16/1/iterations:1\n"
-    "BM_string_memcpy/262144/16/2/iterations:1\n"
-    "BM_string_memcpy/262144/16/4/iterations:1\n"
-    "BM_string_memcpy/262144/16/8/iterations:1\n"
-    "BM_string_memcpy/262144/16/16/iterations:1\n"
-    "BM_string_memcpy/262144/16/32/iterations:1\n"
-    "BM_string_memcpy/262144/32/1/iterations:1\n"
-    "BM_string_memcpy/262144/32/2/iterations:1\n"
-    "BM_string_memcpy/262144/32/4/iterations:1\n"
-    "BM_string_memcpy/262144/32/8/iterations:1\n"
-    "BM_string_memcpy/262144/32/16/iterations:1\n"
-    "BM_string_memcpy/262144/32/32/iterations:1\n"
-    "BM_string_memcpy/524288/0/0/iterations:1\n"
-    "BM_string_memcpy/524288/1/1/iterations:1\n"
-    "BM_string_memcpy/524288/1/2/iterations:1\n"
-    "BM_string_memcpy/524288/1/4/iterations:1\n"
-    "BM_string_memcpy/524288/1/8/iterations:1\n"
-    "BM_string_memcpy/524288/1/16/iterations:1\n"
-    "BM_string_memcpy/524288/1/32/iterations:1\n"
-    "BM_string_memcpy/524288/2/1/iterations:1\n"
-    "BM_string_memcpy/524288/2/2/iterations:1\n"
-    "BM_string_memcpy/524288/2/4/iterations:1\n"
-    "BM_string_memcpy/524288/2/8/iterations:1\n"
-    "BM_string_memcpy/524288/2/16/iterations:1\n"
-    "BM_string_memcpy/524288/2/32/iterations:1\n"
-    "BM_string_memcpy/524288/4/1/iterations:1\n"
-    "BM_string_memcpy/524288/4/2/iterations:1\n"
-    "BM_string_memcpy/524288/4/4/iterations:1\n"
-    "BM_string_memcpy/524288/4/8/iterations:1\n"
-    "BM_string_memcpy/524288/4/16/iterations:1\n"
-    "BM_string_memcpy/524288/4/32/iterations:1\n"
-    "BM_string_memcpy/524288/8/1/iterations:1\n"
-    "BM_string_memcpy/524288/8/2/iterations:1\n"
-    "BM_string_memcpy/524288/8/4/iterations:1\n"
-    "BM_string_memcpy/524288/8/8/iterations:1\n"
-    "BM_string_memcpy/524288/8/16/iterations:1\n"
-    "BM_string_memcpy/524288/8/32/iterations:1\n"
-    "BM_string_memcpy/524288/16/1/iterations:1\n"
-    "BM_string_memcpy/524288/16/2/iterations:1\n"
-    "BM_string_memcpy/524288/16/4/iterations:1\n"
-    "BM_string_memcpy/524288/16/8/iterations:1\n"
-    "BM_string_memcpy/524288/16/16/iterations:1\n"
-    "BM_string_memcpy/524288/16/32/iterations:1\n"
-    "BM_string_memcpy/524288/32/1/iterations:1\n"
-    "BM_string_memcpy/524288/32/2/iterations:1\n"
-    "BM_string_memcpy/524288/32/4/iterations:1\n"
-    "BM_string_memcpy/524288/32/8/iterations:1\n"
-    "BM_string_memcpy/524288/32/16/iterations:1\n"
-    "BM_string_memcpy/524288/32/32/iterations:1\n"
-    "BM_string_memcpy/1048576/0/0/iterations:1\n"
-    "BM_string_memcpy/1048576/1/1/iterations:1\n"
-    "BM_string_memcpy/1048576/1/2/iterations:1\n"
-    "BM_string_memcpy/1048576/1/4/iterations:1\n"
-    "BM_string_memcpy/1048576/1/8/iterations:1\n"
-    "BM_string_memcpy/1048576/1/16/iterations:1\n"
-    "BM_string_memcpy/1048576/1/32/iterations:1\n"
-    "BM_string_memcpy/1048576/2/1/iterations:1\n"
-    "BM_string_memcpy/1048576/2/2/iterations:1\n"
-    "BM_string_memcpy/1048576/2/4/iterations:1\n"
-    "BM_string_memcpy/1048576/2/8/iterations:1\n"
-    "BM_string_memcpy/1048576/2/16/iterations:1\n"
-    "BM_string_memcpy/1048576/2/32/iterations:1\n"
-    "BM_string_memcpy/1048576/4/1/iterations:1\n"
-    "BM_string_memcpy/1048576/4/2/iterations:1\n"
-    "BM_string_memcpy/1048576/4/4/iterations:1\n"
-    "BM_string_memcpy/1048576/4/8/iterations:1\n"
-    "BM_string_memcpy/1048576/4/16/iterations:1\n"
-    "BM_string_memcpy/1048576/4/32/iterations:1\n"
-    "BM_string_memcpy/1048576/8/1/iterations:1\n"
-    "BM_string_memcpy/1048576/8/2/iterations:1\n"
-    "BM_string_memcpy/1048576/8/4/iterations:1\n"
-    "BM_string_memcpy/1048576/8/8/iterations:1\n"
-    "BM_string_memcpy/1048576/8/16/iterations:1\n"
-    "BM_string_memcpy/1048576/8/32/iterations:1\n"
-    "BM_string_memcpy/1048576/16/1/iterations:1\n"
-    "BM_string_memcpy/1048576/16/2/iterations:1\n"
-    "BM_string_memcpy/1048576/16/4/iterations:1\n"
-    "BM_string_memcpy/1048576/16/8/iterations:1\n"
-    "BM_string_memcpy/1048576/16/16/iterations:1\n"
-    "BM_string_memcpy/1048576/16/32/iterations:1\n"
-    "BM_string_memcpy/1048576/32/1/iterations:1\n"
-    "BM_string_memcpy/1048576/32/2/iterations:1\n"
-    "BM_string_memcpy/1048576/32/4/iterations:1\n"
-    "BM_string_memcpy/1048576/32/8/iterations:1\n"
-    "BM_string_memcpy/1048576/32/16/iterations:1\n"
-    "BM_string_memcpy/1048576/32/32/iterations:1\n"
-    "BM_string_memcpy/2097152/0/0/iterations:1\n"
-    "BM_string_memcpy/2097152/1/1/iterations:1\n"
-    "BM_string_memcpy/2097152/1/2/iterations:1\n"
-    "BM_string_memcpy/2097152/1/4/iterations:1\n"
-    "BM_string_memcpy/2097152/1/8/iterations:1\n"
-    "BM_string_memcpy/2097152/1/16/iterations:1\n"
-    "BM_string_memcpy/2097152/1/32/iterations:1\n"
-    "BM_string_memcpy/2097152/2/1/iterations:1\n"
-    "BM_string_memcpy/2097152/2/2/iterations:1\n"
-    "BM_string_memcpy/2097152/2/4/iterations:1\n"
-    "BM_string_memcpy/2097152/2/8/iterations:1\n"
-    "BM_string_memcpy/2097152/2/16/iterations:1\n"
-    "BM_string_memcpy/2097152/2/32/iterations:1\n"
-    "BM_string_memcpy/2097152/4/1/iterations:1\n"
-    "BM_string_memcpy/2097152/4/2/iterations:1\n"
-    "BM_string_memcpy/2097152/4/4/iterations:1\n"
-    "BM_string_memcpy/2097152/4/8/iterations:1\n"
-    "BM_string_memcpy/2097152/4/16/iterations:1\n"
-    "BM_string_memcpy/2097152/4/32/iterations:1\n"
-    "BM_string_memcpy/2097152/8/1/iterations:1\n"
-    "BM_string_memcpy/2097152/8/2/iterations:1\n"
-    "BM_string_memcpy/2097152/8/4/iterations:1\n"
-    "BM_string_memcpy/2097152/8/8/iterations:1\n"
-    "BM_string_memcpy/2097152/8/16/iterations:1\n"
-    "BM_string_memcpy/2097152/8/32/iterations:1\n"
-    "BM_string_memcpy/2097152/16/1/iterations:1\n"
-    "BM_string_memcpy/2097152/16/2/iterations:1\n"
-    "BM_string_memcpy/2097152/16/4/iterations:1\n"
-    "BM_string_memcpy/2097152/16/8/iterations:1\n"
-    "BM_string_memcpy/2097152/16/16/iterations:1\n"
-    "BM_string_memcpy/2097152/16/32/iterations:1\n"
-    "BM_string_memcpy/2097152/32/1/iterations:1\n"
-    "BM_string_memcpy/2097152/32/2/iterations:1\n"
-    "BM_string_memcpy/2097152/32/4/iterations:1\n"
-    "BM_string_memcpy/2097152/32/8/iterations:1\n"
-    "BM_string_memcpy/2097152/32/16/iterations:1\n"
-    "BM_string_memcpy/2097152/32/32/iterations:1\n";
+      "BM_string_strcpy/8/0/0/iterations:1\n"
+      "BM_string_strcpy/16/0/0/iterations:1\n"
+      "BM_string_strcpy/32/0/0/iterations:1\n"
+      "BM_string_strcpy/64/0/0/iterations:1\n"
+      "BM_string_strcpy/512/0/0/iterations:1\n"
+      "BM_string_strcpy/1024/0/0/iterations:1\n"
+      "BM_string_strcpy/8192/0/0/iterations:1\n"
+      "BM_string_strcpy/16384/0/0/iterations:1\n"
+      "BM_string_strcpy/32768/0/0/iterations:1\n"
+      "BM_string_strcpy/65536/0/0/iterations:1\n"
+      "BM_string_strcpy/131072/0/0/iterations:1\n"
+      "BM_string_memcpy/1/0/0/iterations:1\n"
+      "BM_string_memcpy/2/0/0/iterations:1\n"
+      "BM_string_memcpy/3/0/0/iterations:1\n"
+      "BM_string_memcpy/4/0/0/iterations:1\n"
+      "BM_string_memcpy/5/0/0/iterations:1\n"
+      "BM_string_memcpy/6/0/0/iterations:1\n"
+      "BM_string_memcpy/7/0/0/iterations:1\n"
+      "BM_string_memcpy/8/0/0/iterations:1\n"
+      "BM_string_memcpy/9/0/0/iterations:1\n"
+      "BM_string_memcpy/10/0/0/iterations:1\n"
+      "BM_string_memcpy/11/0/0/iterations:1\n"
+      "BM_string_memcpy/12/0/0/iterations:1\n"
+      "BM_string_memcpy/13/0/0/iterations:1\n"
+      "BM_string_memcpy/14/0/0/iterations:1\n"
+      "BM_string_memcpy/15/0/0/iterations:1\n"
+      "BM_string_memcpy/16/0/0/iterations:1\n"
+      "BM_string_memcpy/24/0/0/iterations:1\n"
+      "BM_string_memcpy/32/0/0/iterations:1\n"
+      "BM_string_memcpy/40/0/0/iterations:1\n"
+      "BM_string_memcpy/48/0/0/iterations:1\n"
+      "BM_string_memcpy/56/0/0/iterations:1\n"
+      "BM_string_memcpy/64/0/0/iterations:1\n"
+      "BM_string_memcpy/72/0/0/iterations:1\n"
+      "BM_string_memcpy/80/0/0/iterations:1\n"
+      "BM_string_memcpy/88/0/0/iterations:1\n"
+      "BM_string_memcpy/96/0/0/iterations:1\n"
+      "BM_string_memcpy/104/0/0/iterations:1\n"
+      "BM_string_memcpy/112/0/0/iterations:1\n"
+      "BM_string_memcpy/120/0/0/iterations:1\n"
+      "BM_string_memcpy/128/0/0/iterations:1\n"
+      "BM_string_memcpy/136/0/0/iterations:1\n"
+      "BM_string_memcpy/144/0/0/iterations:1\n"
+      "BM_string_memcpy/160/0/0/iterations:1\n"
+      "BM_string_memcpy/176/0/0/iterations:1\n"
+      "BM_string_memcpy/192/0/0/iterations:1\n"
+      "BM_string_memcpy/208/0/0/iterations:1\n"
+      "BM_string_memcpy/224/0/0/iterations:1\n"
+      "BM_string_memcpy/240/0/0/iterations:1\n"
+      "BM_string_memcpy/256/0/0/iterations:1\n"
+      "BM_string_strcpy/512/0/0/iterations:1\n"
+      "BM_string_strcpy/1024/0/0/iterations:1\n"
+      "BM_string_strcpy/8192/0/0/iterations:1\n"
+      "BM_string_strcpy/16384/0/0/iterations:1\n"
+      "BM_string_strcpy/32768/0/0/iterations:1\n"
+      "BM_string_strcpy/65536/0/0/iterations:1\n"
+      "BM_string_strcpy/131072/0/0/iterations:1\n"
+      "BM_string_memcpy/262144/0/0/iterations:1\n"
+      "BM_string_memcpy/524288/0/0/iterations:1\n"
+      "BM_string_memcpy/1048576/0/0/iterations:1\n"
+      "BM_string_memcpy/2097152/0/0/iterations:1\n"
+      "BM_string_strcpy/1/0/0/iterations:1\n"
+      "BM_string_strcpy/2/0/0/iterations:1\n"
+      "BM_string_strcpy/3/0/0/iterations:1\n"
+      "BM_string_strcpy/4/0/0/iterations:1\n"
+      "BM_string_strcpy/5/0/0/iterations:1\n"
+      "BM_string_strcpy/6/0/0/iterations:1\n"
+      "BM_string_strcpy/7/0/0/iterations:1\n"
+      "BM_string_strcpy/8/0/0/iterations:1\n"
+      "BM_string_strcpy/9/0/0/iterations:1\n"
+      "BM_string_strcpy/10/0/0/iterations:1\n"
+      "BM_string_strcpy/11/0/0/iterations:1\n"
+      "BM_string_strcpy/12/0/0/iterations:1\n"
+      "BM_string_strcpy/13/0/0/iterations:1\n"
+      "BM_string_strcpy/14/0/0/iterations:1\n"
+      "BM_string_strcpy/15/0/0/iterations:1\n"
+      "BM_string_strcpy/16/0/0/iterations:1\n"
+      "BM_string_strcpy/24/0/0/iterations:1\n"
+      "BM_string_strcpy/32/0/0/iterations:1\n"
+      "BM_string_strcpy/40/0/0/iterations:1\n"
+      "BM_string_strcpy/48/0/0/iterations:1\n"
+      "BM_string_strcpy/56/0/0/iterations:1\n"
+      "BM_string_strcpy/64/0/0/iterations:1\n"
+      "BM_string_strcpy/72/0/0/iterations:1\n"
+      "BM_string_strcpy/80/0/0/iterations:1\n"
+      "BM_string_strcpy/88/0/0/iterations:1\n"
+      "BM_string_strcpy/96/0/0/iterations:1\n"
+      "BM_string_strcpy/104/0/0/iterations:1\n"
+      "BM_string_strcpy/112/0/0/iterations:1\n"
+      "BM_string_strcpy/120/0/0/iterations:1\n"
+      "BM_string_strcpy/128/0/0/iterations:1\n"
+      "BM_string_strcpy/136/0/0/iterations:1\n"
+      "BM_string_strcpy/144/0/0/iterations:1\n"
+      "BM_string_strcpy/160/0/0/iterations:1\n"
+      "BM_string_strcpy/176/0/0/iterations:1\n"
+      "BM_string_strcpy/192/0/0/iterations:1\n"
+      "BM_string_strcpy/208/0/0/iterations:1\n"
+      "BM_string_strcpy/224/0/0/iterations:1\n"
+      "BM_string_strcpy/240/0/0/iterations:1\n"
+      "BM_string_strcpy/256/0/0/iterations:1\n"
+      "BM_string_strcpy/512/0/0/iterations:1\n"
+      "BM_string_strcpy/1024/0/0/iterations:1\n"
+      "BM_string_strcpy/8192/0/0/iterations:1\n"
+      "BM_string_strcpy/16384/0/0/iterations:1\n"
+      "BM_string_strcpy/32768/0/0/iterations:1\n"
+      "BM_string_strcpy/65536/0/0/iterations:1\n"
+      "BM_string_strcpy/131072/0/0/iterations:1\n"
+      "BM_string_strcpy/262144/0/0/iterations:1\n"
+      "BM_string_strcpy/524288/0/0/iterations:1\n"
+      "BM_string_strcpy/1048576/0/0/iterations:1\n"
+      "BM_string_strcpy/2097152/0/0/iterations:1\n"
+      "BM_string_memcpy/1/0/0/iterations:1\n"
+      "BM_string_memcpy/1/1/1/iterations:1\n"
+      "BM_string_memcpy/1/1/2/iterations:1\n"
+      "BM_string_memcpy/1/1/4/iterations:1\n"
+      "BM_string_memcpy/1/1/8/iterations:1\n"
+      "BM_string_memcpy/1/1/16/iterations:1\n"
+      "BM_string_memcpy/1/1/32/iterations:1\n"
+      "BM_string_memcpy/1/2/1/iterations:1\n"
+      "BM_string_memcpy/1/2/2/iterations:1\n"
+      "BM_string_memcpy/1/2/4/iterations:1\n"
+      "BM_string_memcpy/1/2/8/iterations:1\n"
+      "BM_string_memcpy/1/2/16/iterations:1\n"
+      "BM_string_memcpy/1/2/32/iterations:1\n"
+      "BM_string_memcpy/1/4/1/iterations:1\n"
+      "BM_string_memcpy/1/4/2/iterations:1\n"
+      "BM_string_memcpy/1/4/4/iterations:1\n"
+      "BM_string_memcpy/1/4/8/iterations:1\n"
+      "BM_string_memcpy/1/4/16/iterations:1\n"
+      "BM_string_memcpy/1/4/32/iterations:1\n"
+      "BM_string_memcpy/1/8/1/iterations:1\n"
+      "BM_string_memcpy/1/8/2/iterations:1\n"
+      "BM_string_memcpy/1/8/4/iterations:1\n"
+      "BM_string_memcpy/1/8/8/iterations:1\n"
+      "BM_string_memcpy/1/8/16/iterations:1\n"
+      "BM_string_memcpy/1/8/32/iterations:1\n"
+      "BM_string_memcpy/1/16/1/iterations:1\n"
+      "BM_string_memcpy/1/16/2/iterations:1\n"
+      "BM_string_memcpy/1/16/4/iterations:1\n"
+      "BM_string_memcpy/1/16/8/iterations:1\n"
+      "BM_string_memcpy/1/16/16/iterations:1\n"
+      "BM_string_memcpy/1/16/32/iterations:1\n"
+      "BM_string_memcpy/1/32/1/iterations:1\n"
+      "BM_string_memcpy/1/32/2/iterations:1\n"
+      "BM_string_memcpy/1/32/4/iterations:1\n"
+      "BM_string_memcpy/1/32/8/iterations:1\n"
+      "BM_string_memcpy/1/32/16/iterations:1\n"
+      "BM_string_memcpy/1/32/32/iterations:1\n"
+      "BM_string_memcpy/2/0/0/iterations:1\n"
+      "BM_string_memcpy/2/1/1/iterations:1\n"
+      "BM_string_memcpy/2/1/2/iterations:1\n"
+      "BM_string_memcpy/2/1/4/iterations:1\n"
+      "BM_string_memcpy/2/1/8/iterations:1\n"
+      "BM_string_memcpy/2/1/16/iterations:1\n"
+      "BM_string_memcpy/2/1/32/iterations:1\n"
+      "BM_string_memcpy/2/2/1/iterations:1\n"
+      "BM_string_memcpy/2/2/2/iterations:1\n"
+      "BM_string_memcpy/2/2/4/iterations:1\n"
+      "BM_string_memcpy/2/2/8/iterations:1\n"
+      "BM_string_memcpy/2/2/16/iterations:1\n"
+      "BM_string_memcpy/2/2/32/iterations:1\n"
+      "BM_string_memcpy/2/4/1/iterations:1\n"
+      "BM_string_memcpy/2/4/2/iterations:1\n"
+      "BM_string_memcpy/2/4/4/iterations:1\n"
+      "BM_string_memcpy/2/4/8/iterations:1\n"
+      "BM_string_memcpy/2/4/16/iterations:1\n"
+      "BM_string_memcpy/2/4/32/iterations:1\n"
+      "BM_string_memcpy/2/8/1/iterations:1\n"
+      "BM_string_memcpy/2/8/2/iterations:1\n"
+      "BM_string_memcpy/2/8/4/iterations:1\n"
+      "BM_string_memcpy/2/8/8/iterations:1\n"
+      "BM_string_memcpy/2/8/16/iterations:1\n"
+      "BM_string_memcpy/2/8/32/iterations:1\n"
+      "BM_string_memcpy/2/16/1/iterations:1\n"
+      "BM_string_memcpy/2/16/2/iterations:1\n"
+      "BM_string_memcpy/2/16/4/iterations:1\n"
+      "BM_string_memcpy/2/16/8/iterations:1\n"
+      "BM_string_memcpy/2/16/16/iterations:1\n"
+      "BM_string_memcpy/2/16/32/iterations:1\n"
+      "BM_string_memcpy/2/32/1/iterations:1\n"
+      "BM_string_memcpy/2/32/2/iterations:1\n"
+      "BM_string_memcpy/2/32/4/iterations:1\n"
+      "BM_string_memcpy/2/32/8/iterations:1\n"
+      "BM_string_memcpy/2/32/16/iterations:1\n"
+      "BM_string_memcpy/2/32/32/iterations:1\n"
+      "BM_string_memcpy/3/0/0/iterations:1\n"
+      "BM_string_memcpy/3/1/1/iterations:1\n"
+      "BM_string_memcpy/3/1/2/iterations:1\n"
+      "BM_string_memcpy/3/1/4/iterations:1\n"
+      "BM_string_memcpy/3/1/8/iterations:1\n"
+      "BM_string_memcpy/3/1/16/iterations:1\n"
+      "BM_string_memcpy/3/1/32/iterations:1\n"
+      "BM_string_memcpy/3/2/1/iterations:1\n"
+      "BM_string_memcpy/3/2/2/iterations:1\n"
+      "BM_string_memcpy/3/2/4/iterations:1\n"
+      "BM_string_memcpy/3/2/8/iterations:1\n"
+      "BM_string_memcpy/3/2/16/iterations:1\n"
+      "BM_string_memcpy/3/2/32/iterations:1\n"
+      "BM_string_memcpy/3/4/1/iterations:1\n"
+      "BM_string_memcpy/3/4/2/iterations:1\n"
+      "BM_string_memcpy/3/4/4/iterations:1\n"
+      "BM_string_memcpy/3/4/8/iterations:1\n"
+      "BM_string_memcpy/3/4/16/iterations:1\n"
+      "BM_string_memcpy/3/4/32/iterations:1\n"
+      "BM_string_memcpy/3/8/1/iterations:1\n"
+      "BM_string_memcpy/3/8/2/iterations:1\n"
+      "BM_string_memcpy/3/8/4/iterations:1\n"
+      "BM_string_memcpy/3/8/8/iterations:1\n"
+      "BM_string_memcpy/3/8/16/iterations:1\n"
+      "BM_string_memcpy/3/8/32/iterations:1\n"
+      "BM_string_memcpy/3/16/1/iterations:1\n"
+      "BM_string_memcpy/3/16/2/iterations:1\n"
+      "BM_string_memcpy/3/16/4/iterations:1\n"
+      "BM_string_memcpy/3/16/8/iterations:1\n"
+      "BM_string_memcpy/3/16/16/iterations:1\n"
+      "BM_string_memcpy/3/16/32/iterations:1\n"
+      "BM_string_memcpy/3/32/1/iterations:1\n"
+      "BM_string_memcpy/3/32/2/iterations:1\n"
+      "BM_string_memcpy/3/32/4/iterations:1\n"
+      "BM_string_memcpy/3/32/8/iterations:1\n"
+      "BM_string_memcpy/3/32/16/iterations:1\n"
+      "BM_string_memcpy/3/32/32/iterations:1\n"
+      "BM_string_memcpy/4/0/0/iterations:1\n"
+      "BM_string_memcpy/4/1/1/iterations:1\n"
+      "BM_string_memcpy/4/1/2/iterations:1\n"
+      "BM_string_memcpy/4/1/4/iterations:1\n"
+      "BM_string_memcpy/4/1/8/iterations:1\n"
+      "BM_string_memcpy/4/1/16/iterations:1\n"
+      "BM_string_memcpy/4/1/32/iterations:1\n"
+      "BM_string_memcpy/4/2/1/iterations:1\n"
+      "BM_string_memcpy/4/2/2/iterations:1\n"
+      "BM_string_memcpy/4/2/4/iterations:1\n"
+      "BM_string_memcpy/4/2/8/iterations:1\n"
+      "BM_string_memcpy/4/2/16/iterations:1\n"
+      "BM_string_memcpy/4/2/32/iterations:1\n"
+      "BM_string_memcpy/4/4/1/iterations:1\n"
+      "BM_string_memcpy/4/4/2/iterations:1\n"
+      "BM_string_memcpy/4/4/4/iterations:1\n"
+      "BM_string_memcpy/4/4/8/iterations:1\n"
+      "BM_string_memcpy/4/4/16/iterations:1\n"
+      "BM_string_memcpy/4/4/32/iterations:1\n"
+      "BM_string_memcpy/4/8/1/iterations:1\n"
+      "BM_string_memcpy/4/8/2/iterations:1\n"
+      "BM_string_memcpy/4/8/4/iterations:1\n"
+      "BM_string_memcpy/4/8/8/iterations:1\n"
+      "BM_string_memcpy/4/8/16/iterations:1\n"
+      "BM_string_memcpy/4/8/32/iterations:1\n"
+      "BM_string_memcpy/4/16/1/iterations:1\n"
+      "BM_string_memcpy/4/16/2/iterations:1\n"
+      "BM_string_memcpy/4/16/4/iterations:1\n"
+      "BM_string_memcpy/4/16/8/iterations:1\n"
+      "BM_string_memcpy/4/16/16/iterations:1\n"
+      "BM_string_memcpy/4/16/32/iterations:1\n"
+      "BM_string_memcpy/4/32/1/iterations:1\n"
+      "BM_string_memcpy/4/32/2/iterations:1\n"
+      "BM_string_memcpy/4/32/4/iterations:1\n"
+      "BM_string_memcpy/4/32/8/iterations:1\n"
+      "BM_string_memcpy/4/32/16/iterations:1\n"
+      "BM_string_memcpy/4/32/32/iterations:1\n"
+      "BM_string_memcpy/5/0/0/iterations:1\n"
+      "BM_string_memcpy/5/1/1/iterations:1\n"
+      "BM_string_memcpy/5/1/2/iterations:1\n"
+      "BM_string_memcpy/5/1/4/iterations:1\n"
+      "BM_string_memcpy/5/1/8/iterations:1\n"
+      "BM_string_memcpy/5/1/16/iterations:1\n"
+      "BM_string_memcpy/5/1/32/iterations:1\n"
+      "BM_string_memcpy/5/2/1/iterations:1\n"
+      "BM_string_memcpy/5/2/2/iterations:1\n"
+      "BM_string_memcpy/5/2/4/iterations:1\n"
+      "BM_string_memcpy/5/2/8/iterations:1\n"
+      "BM_string_memcpy/5/2/16/iterations:1\n"
+      "BM_string_memcpy/5/2/32/iterations:1\n"
+      "BM_string_memcpy/5/4/1/iterations:1\n"
+      "BM_string_memcpy/5/4/2/iterations:1\n"
+      "BM_string_memcpy/5/4/4/iterations:1\n"
+      "BM_string_memcpy/5/4/8/iterations:1\n"
+      "BM_string_memcpy/5/4/16/iterations:1\n"
+      "BM_string_memcpy/5/4/32/iterations:1\n"
+      "BM_string_memcpy/5/8/1/iterations:1\n"
+      "BM_string_memcpy/5/8/2/iterations:1\n"
+      "BM_string_memcpy/5/8/4/iterations:1\n"
+      "BM_string_memcpy/5/8/8/iterations:1\n"
+      "BM_string_memcpy/5/8/16/iterations:1\n"
+      "BM_string_memcpy/5/8/32/iterations:1\n"
+      "BM_string_memcpy/5/16/1/iterations:1\n"
+      "BM_string_memcpy/5/16/2/iterations:1\n"
+      "BM_string_memcpy/5/16/4/iterations:1\n"
+      "BM_string_memcpy/5/16/8/iterations:1\n"
+      "BM_string_memcpy/5/16/16/iterations:1\n"
+      "BM_string_memcpy/5/16/32/iterations:1\n"
+      "BM_string_memcpy/5/32/1/iterations:1\n"
+      "BM_string_memcpy/5/32/2/iterations:1\n"
+      "BM_string_memcpy/5/32/4/iterations:1\n"
+      "BM_string_memcpy/5/32/8/iterations:1\n"
+      "BM_string_memcpy/5/32/16/iterations:1\n"
+      "BM_string_memcpy/5/32/32/iterations:1\n"
+      "BM_string_memcpy/6/0/0/iterations:1\n"
+      "BM_string_memcpy/6/1/1/iterations:1\n"
+      "BM_string_memcpy/6/1/2/iterations:1\n"
+      "BM_string_memcpy/6/1/4/iterations:1\n"
+      "BM_string_memcpy/6/1/8/iterations:1\n"
+      "BM_string_memcpy/6/1/16/iterations:1\n"
+      "BM_string_memcpy/6/1/32/iterations:1\n"
+      "BM_string_memcpy/6/2/1/iterations:1\n"
+      "BM_string_memcpy/6/2/2/iterations:1\n"
+      "BM_string_memcpy/6/2/4/iterations:1\n"
+      "BM_string_memcpy/6/2/8/iterations:1\n"
+      "BM_string_memcpy/6/2/16/iterations:1\n"
+      "BM_string_memcpy/6/2/32/iterations:1\n"
+      "BM_string_memcpy/6/4/1/iterations:1\n"
+      "BM_string_memcpy/6/4/2/iterations:1\n"
+      "BM_string_memcpy/6/4/4/iterations:1\n"
+      "BM_string_memcpy/6/4/8/iterations:1\n"
+      "BM_string_memcpy/6/4/16/iterations:1\n"
+      "BM_string_memcpy/6/4/32/iterations:1\n"
+      "BM_string_memcpy/6/8/1/iterations:1\n"
+      "BM_string_memcpy/6/8/2/iterations:1\n"
+      "BM_string_memcpy/6/8/4/iterations:1\n"
+      "BM_string_memcpy/6/8/8/iterations:1\n"
+      "BM_string_memcpy/6/8/16/iterations:1\n"
+      "BM_string_memcpy/6/8/32/iterations:1\n"
+      "BM_string_memcpy/6/16/1/iterations:1\n"
+      "BM_string_memcpy/6/16/2/iterations:1\n"
+      "BM_string_memcpy/6/16/4/iterations:1\n"
+      "BM_string_memcpy/6/16/8/iterations:1\n"
+      "BM_string_memcpy/6/16/16/iterations:1\n"
+      "BM_string_memcpy/6/16/32/iterations:1\n"
+      "BM_string_memcpy/6/32/1/iterations:1\n"
+      "BM_string_memcpy/6/32/2/iterations:1\n"
+      "BM_string_memcpy/6/32/4/iterations:1\n"
+      "BM_string_memcpy/6/32/8/iterations:1\n"
+      "BM_string_memcpy/6/32/16/iterations:1\n"
+      "BM_string_memcpy/6/32/32/iterations:1\n"
+      "BM_string_memcpy/7/0/0/iterations:1\n"
+      "BM_string_memcpy/7/1/1/iterations:1\n"
+      "BM_string_memcpy/7/1/2/iterations:1\n"
+      "BM_string_memcpy/7/1/4/iterations:1\n"
+      "BM_string_memcpy/7/1/8/iterations:1\n"
+      "BM_string_memcpy/7/1/16/iterations:1\n"
+      "BM_string_memcpy/7/1/32/iterations:1\n"
+      "BM_string_memcpy/7/2/1/iterations:1\n"
+      "BM_string_memcpy/7/2/2/iterations:1\n"
+      "BM_string_memcpy/7/2/4/iterations:1\n"
+      "BM_string_memcpy/7/2/8/iterations:1\n"
+      "BM_string_memcpy/7/2/16/iterations:1\n"
+      "BM_string_memcpy/7/2/32/iterations:1\n"
+      "BM_string_memcpy/7/4/1/iterations:1\n"
+      "BM_string_memcpy/7/4/2/iterations:1\n"
+      "BM_string_memcpy/7/4/4/iterations:1\n"
+      "BM_string_memcpy/7/4/8/iterations:1\n"
+      "BM_string_memcpy/7/4/16/iterations:1\n"
+      "BM_string_memcpy/7/4/32/iterations:1\n"
+      "BM_string_memcpy/7/8/1/iterations:1\n"
+      "BM_string_memcpy/7/8/2/iterations:1\n"
+      "BM_string_memcpy/7/8/4/iterations:1\n"
+      "BM_string_memcpy/7/8/8/iterations:1\n"
+      "BM_string_memcpy/7/8/16/iterations:1\n"
+      "BM_string_memcpy/7/8/32/iterations:1\n"
+      "BM_string_memcpy/7/16/1/iterations:1\n"
+      "BM_string_memcpy/7/16/2/iterations:1\n"
+      "BM_string_memcpy/7/16/4/iterations:1\n"
+      "BM_string_memcpy/7/16/8/iterations:1\n"
+      "BM_string_memcpy/7/16/16/iterations:1\n"
+      "BM_string_memcpy/7/16/32/iterations:1\n"
+      "BM_string_memcpy/7/32/1/iterations:1\n"
+      "BM_string_memcpy/7/32/2/iterations:1\n"
+      "BM_string_memcpy/7/32/4/iterations:1\n"
+      "BM_string_memcpy/7/32/8/iterations:1\n"
+      "BM_string_memcpy/7/32/16/iterations:1\n"
+      "BM_string_memcpy/7/32/32/iterations:1\n"
+      "BM_string_memcpy/8/0/0/iterations:1\n"
+      "BM_string_memcpy/8/1/1/iterations:1\n"
+      "BM_string_memcpy/8/1/2/iterations:1\n"
+      "BM_string_memcpy/8/1/4/iterations:1\n"
+      "BM_string_memcpy/8/1/8/iterations:1\n"
+      "BM_string_memcpy/8/1/16/iterations:1\n"
+      "BM_string_memcpy/8/1/32/iterations:1\n"
+      "BM_string_memcpy/8/2/1/iterations:1\n"
+      "BM_string_memcpy/8/2/2/iterations:1\n"
+      "BM_string_memcpy/8/2/4/iterations:1\n"
+      "BM_string_memcpy/8/2/8/iterations:1\n"
+      "BM_string_memcpy/8/2/16/iterations:1\n"
+      "BM_string_memcpy/8/2/32/iterations:1\n"
+      "BM_string_memcpy/8/4/1/iterations:1\n"
+      "BM_string_memcpy/8/4/2/iterations:1\n"
+      "BM_string_memcpy/8/4/4/iterations:1\n"
+      "BM_string_memcpy/8/4/8/iterations:1\n"
+      "BM_string_memcpy/8/4/16/iterations:1\n"
+      "BM_string_memcpy/8/4/32/iterations:1\n"
+      "BM_string_memcpy/8/8/1/iterations:1\n"
+      "BM_string_memcpy/8/8/2/iterations:1\n"
+      "BM_string_memcpy/8/8/4/iterations:1\n"
+      "BM_string_memcpy/8/8/8/iterations:1\n"
+      "BM_string_memcpy/8/8/16/iterations:1\n"
+      "BM_string_memcpy/8/8/32/iterations:1\n"
+      "BM_string_memcpy/8/16/1/iterations:1\n"
+      "BM_string_memcpy/8/16/2/iterations:1\n"
+      "BM_string_memcpy/8/16/4/iterations:1\n"
+      "BM_string_memcpy/8/16/8/iterations:1\n"
+      "BM_string_memcpy/8/16/16/iterations:1\n"
+      "BM_string_memcpy/8/16/32/iterations:1\n"
+      "BM_string_memcpy/8/32/1/iterations:1\n"
+      "BM_string_memcpy/8/32/2/iterations:1\n"
+      "BM_string_memcpy/8/32/4/iterations:1\n"
+      "BM_string_memcpy/8/32/8/iterations:1\n"
+      "BM_string_memcpy/8/32/16/iterations:1\n"
+      "BM_string_memcpy/8/32/32/iterations:1\n"
+      "BM_string_memcpy/9/0/0/iterations:1\n"
+      "BM_string_memcpy/9/1/1/iterations:1\n"
+      "BM_string_memcpy/9/1/2/iterations:1\n"
+      "BM_string_memcpy/9/1/4/iterations:1\n"
+      "BM_string_memcpy/9/1/8/iterations:1\n"
+      "BM_string_memcpy/9/1/16/iterations:1\n"
+      "BM_string_memcpy/9/1/32/iterations:1\n"
+      "BM_string_memcpy/9/2/1/iterations:1\n"
+      "BM_string_memcpy/9/2/2/iterations:1\n"
+      "BM_string_memcpy/9/2/4/iterations:1\n"
+      "BM_string_memcpy/9/2/8/iterations:1\n"
+      "BM_string_memcpy/9/2/16/iterations:1\n"
+      "BM_string_memcpy/9/2/32/iterations:1\n"
+      "BM_string_memcpy/9/4/1/iterations:1\n"
+      "BM_string_memcpy/9/4/2/iterations:1\n"
+      "BM_string_memcpy/9/4/4/iterations:1\n"
+      "BM_string_memcpy/9/4/8/iterations:1\n"
+      "BM_string_memcpy/9/4/16/iterations:1\n"
+      "BM_string_memcpy/9/4/32/iterations:1\n"
+      "BM_string_memcpy/9/8/1/iterations:1\n"
+      "BM_string_memcpy/9/8/2/iterations:1\n"
+      "BM_string_memcpy/9/8/4/iterations:1\n"
+      "BM_string_memcpy/9/8/8/iterations:1\n"
+      "BM_string_memcpy/9/8/16/iterations:1\n"
+      "BM_string_memcpy/9/8/32/iterations:1\n"
+      "BM_string_memcpy/9/16/1/iterations:1\n"
+      "BM_string_memcpy/9/16/2/iterations:1\n"
+      "BM_string_memcpy/9/16/4/iterations:1\n"
+      "BM_string_memcpy/9/16/8/iterations:1\n"
+      "BM_string_memcpy/9/16/16/iterations:1\n"
+      "BM_string_memcpy/9/16/32/iterations:1\n"
+      "BM_string_memcpy/9/32/1/iterations:1\n"
+      "BM_string_memcpy/9/32/2/iterations:1\n"
+      "BM_string_memcpy/9/32/4/iterations:1\n"
+      "BM_string_memcpy/9/32/8/iterations:1\n"
+      "BM_string_memcpy/9/32/16/iterations:1\n"
+      "BM_string_memcpy/9/32/32/iterations:1\n"
+      "BM_string_memcpy/10/0/0/iterations:1\n"
+      "BM_string_memcpy/10/1/1/iterations:1\n"
+      "BM_string_memcpy/10/1/2/iterations:1\n"
+      "BM_string_memcpy/10/1/4/iterations:1\n"
+      "BM_string_memcpy/10/1/8/iterations:1\n"
+      "BM_string_memcpy/10/1/16/iterations:1\n"
+      "BM_string_memcpy/10/1/32/iterations:1\n"
+      "BM_string_memcpy/10/2/1/iterations:1\n"
+      "BM_string_memcpy/10/2/2/iterations:1\n"
+      "BM_string_memcpy/10/2/4/iterations:1\n"
+      "BM_string_memcpy/10/2/8/iterations:1\n"
+      "BM_string_memcpy/10/2/16/iterations:1\n"
+      "BM_string_memcpy/10/2/32/iterations:1\n"
+      "BM_string_memcpy/10/4/1/iterations:1\n"
+      "BM_string_memcpy/10/4/2/iterations:1\n"
+      "BM_string_memcpy/10/4/4/iterations:1\n"
+      "BM_string_memcpy/10/4/8/iterations:1\n"
+      "BM_string_memcpy/10/4/16/iterations:1\n"
+      "BM_string_memcpy/10/4/32/iterations:1\n"
+      "BM_string_memcpy/10/8/1/iterations:1\n"
+      "BM_string_memcpy/10/8/2/iterations:1\n"
+      "BM_string_memcpy/10/8/4/iterations:1\n"
+      "BM_string_memcpy/10/8/8/iterations:1\n"
+      "BM_string_memcpy/10/8/16/iterations:1\n"
+      "BM_string_memcpy/10/8/32/iterations:1\n"
+      "BM_string_memcpy/10/16/1/iterations:1\n"
+      "BM_string_memcpy/10/16/2/iterations:1\n"
+      "BM_string_memcpy/10/16/4/iterations:1\n"
+      "BM_string_memcpy/10/16/8/iterations:1\n"
+      "BM_string_memcpy/10/16/16/iterations:1\n"
+      "BM_string_memcpy/10/16/32/iterations:1\n"
+      "BM_string_memcpy/10/32/1/iterations:1\n"
+      "BM_string_memcpy/10/32/2/iterations:1\n"
+      "BM_string_memcpy/10/32/4/iterations:1\n"
+      "BM_string_memcpy/10/32/8/iterations:1\n"
+      "BM_string_memcpy/10/32/16/iterations:1\n"
+      "BM_string_memcpy/10/32/32/iterations:1\n"
+      "BM_string_memcpy/11/0/0/iterations:1\n"
+      "BM_string_memcpy/11/1/1/iterations:1\n"
+      "BM_string_memcpy/11/1/2/iterations:1\n"
+      "BM_string_memcpy/11/1/4/iterations:1\n"
+      "BM_string_memcpy/11/1/8/iterations:1\n"
+      "BM_string_memcpy/11/1/16/iterations:1\n"
+      "BM_string_memcpy/11/1/32/iterations:1\n"
+      "BM_string_memcpy/11/2/1/iterations:1\n"
+      "BM_string_memcpy/11/2/2/iterations:1\n"
+      "BM_string_memcpy/11/2/4/iterations:1\n"
+      "BM_string_memcpy/11/2/8/iterations:1\n"
+      "BM_string_memcpy/11/2/16/iterations:1\n"
+      "BM_string_memcpy/11/2/32/iterations:1\n"
+      "BM_string_memcpy/11/4/1/iterations:1\n"
+      "BM_string_memcpy/11/4/2/iterations:1\n"
+      "BM_string_memcpy/11/4/4/iterations:1\n"
+      "BM_string_memcpy/11/4/8/iterations:1\n"
+      "BM_string_memcpy/11/4/16/iterations:1\n"
+      "BM_string_memcpy/11/4/32/iterations:1\n"
+      "BM_string_memcpy/11/8/1/iterations:1\n"
+      "BM_string_memcpy/11/8/2/iterations:1\n"
+      "BM_string_memcpy/11/8/4/iterations:1\n"
+      "BM_string_memcpy/11/8/8/iterations:1\n"
+      "BM_string_memcpy/11/8/16/iterations:1\n"
+      "BM_string_memcpy/11/8/32/iterations:1\n"
+      "BM_string_memcpy/11/16/1/iterations:1\n"
+      "BM_string_memcpy/11/16/2/iterations:1\n"
+      "BM_string_memcpy/11/16/4/iterations:1\n"
+      "BM_string_memcpy/11/16/8/iterations:1\n"
+      "BM_string_memcpy/11/16/16/iterations:1\n"
+      "BM_string_memcpy/11/16/32/iterations:1\n"
+      "BM_string_memcpy/11/32/1/iterations:1\n"
+      "BM_string_memcpy/11/32/2/iterations:1\n"
+      "BM_string_memcpy/11/32/4/iterations:1\n"
+      "BM_string_memcpy/11/32/8/iterations:1\n"
+      "BM_string_memcpy/11/32/16/iterations:1\n"
+      "BM_string_memcpy/11/32/32/iterations:1\n"
+      "BM_string_memcpy/12/0/0/iterations:1\n"
+      "BM_string_memcpy/12/1/1/iterations:1\n"
+      "BM_string_memcpy/12/1/2/iterations:1\n"
+      "BM_string_memcpy/12/1/4/iterations:1\n"
+      "BM_string_memcpy/12/1/8/iterations:1\n"
+      "BM_string_memcpy/12/1/16/iterations:1\n"
+      "BM_string_memcpy/12/1/32/iterations:1\n"
+      "BM_string_memcpy/12/2/1/iterations:1\n"
+      "BM_string_memcpy/12/2/2/iterations:1\n"
+      "BM_string_memcpy/12/2/4/iterations:1\n"
+      "BM_string_memcpy/12/2/8/iterations:1\n"
+      "BM_string_memcpy/12/2/16/iterations:1\n"
+      "BM_string_memcpy/12/2/32/iterations:1\n"
+      "BM_string_memcpy/12/4/1/iterations:1\n"
+      "BM_string_memcpy/12/4/2/iterations:1\n"
+      "BM_string_memcpy/12/4/4/iterations:1\n"
+      "BM_string_memcpy/12/4/8/iterations:1\n"
+      "BM_string_memcpy/12/4/16/iterations:1\n"
+      "BM_string_memcpy/12/4/32/iterations:1\n"
+      "BM_string_memcpy/12/8/1/iterations:1\n"
+      "BM_string_memcpy/12/8/2/iterations:1\n"
+      "BM_string_memcpy/12/8/4/iterations:1\n"
+      "BM_string_memcpy/12/8/8/iterations:1\n"
+      "BM_string_memcpy/12/8/16/iterations:1\n"
+      "BM_string_memcpy/12/8/32/iterations:1\n"
+      "BM_string_memcpy/12/16/1/iterations:1\n"
+      "BM_string_memcpy/12/16/2/iterations:1\n"
+      "BM_string_memcpy/12/16/4/iterations:1\n"
+      "BM_string_memcpy/12/16/8/iterations:1\n"
+      "BM_string_memcpy/12/16/16/iterations:1\n"
+      "BM_string_memcpy/12/16/32/iterations:1\n"
+      "BM_string_memcpy/12/32/1/iterations:1\n"
+      "BM_string_memcpy/12/32/2/iterations:1\n"
+      "BM_string_memcpy/12/32/4/iterations:1\n"
+      "BM_string_memcpy/12/32/8/iterations:1\n"
+      "BM_string_memcpy/12/32/16/iterations:1\n"
+      "BM_string_memcpy/12/32/32/iterations:1\n"
+      "BM_string_memcpy/13/0/0/iterations:1\n"
+      "BM_string_memcpy/13/1/1/iterations:1\n"
+      "BM_string_memcpy/13/1/2/iterations:1\n"
+      "BM_string_memcpy/13/1/4/iterations:1\n"
+      "BM_string_memcpy/13/1/8/iterations:1\n"
+      "BM_string_memcpy/13/1/16/iterations:1\n"
+      "BM_string_memcpy/13/1/32/iterations:1\n"
+      "BM_string_memcpy/13/2/1/iterations:1\n"
+      "BM_string_memcpy/13/2/2/iterations:1\n"
+      "BM_string_memcpy/13/2/4/iterations:1\n"
+      "BM_string_memcpy/13/2/8/iterations:1\n"
+      "BM_string_memcpy/13/2/16/iterations:1\n"
+      "BM_string_memcpy/13/2/32/iterations:1\n"
+      "BM_string_memcpy/13/4/1/iterations:1\n"
+      "BM_string_memcpy/13/4/2/iterations:1\n"
+      "BM_string_memcpy/13/4/4/iterations:1\n"
+      "BM_string_memcpy/13/4/8/iterations:1\n"
+      "BM_string_memcpy/13/4/16/iterations:1\n"
+      "BM_string_memcpy/13/4/32/iterations:1\n"
+      "BM_string_memcpy/13/8/1/iterations:1\n"
+      "BM_string_memcpy/13/8/2/iterations:1\n"
+      "BM_string_memcpy/13/8/4/iterations:1\n"
+      "BM_string_memcpy/13/8/8/iterations:1\n"
+      "BM_string_memcpy/13/8/16/iterations:1\n"
+      "BM_string_memcpy/13/8/32/iterations:1\n"
+      "BM_string_memcpy/13/16/1/iterations:1\n"
+      "BM_string_memcpy/13/16/2/iterations:1\n"
+      "BM_string_memcpy/13/16/4/iterations:1\n"
+      "BM_string_memcpy/13/16/8/iterations:1\n"
+      "BM_string_memcpy/13/16/16/iterations:1\n"
+      "BM_string_memcpy/13/16/32/iterations:1\n"
+      "BM_string_memcpy/13/32/1/iterations:1\n"
+      "BM_string_memcpy/13/32/2/iterations:1\n"
+      "BM_string_memcpy/13/32/4/iterations:1\n"
+      "BM_string_memcpy/13/32/8/iterations:1\n"
+      "BM_string_memcpy/13/32/16/iterations:1\n"
+      "BM_string_memcpy/13/32/32/iterations:1\n"
+      "BM_string_memcpy/14/0/0/iterations:1\n"
+      "BM_string_memcpy/14/1/1/iterations:1\n"
+      "BM_string_memcpy/14/1/2/iterations:1\n"
+      "BM_string_memcpy/14/1/4/iterations:1\n"
+      "BM_string_memcpy/14/1/8/iterations:1\n"
+      "BM_string_memcpy/14/1/16/iterations:1\n"
+      "BM_string_memcpy/14/1/32/iterations:1\n"
+      "BM_string_memcpy/14/2/1/iterations:1\n"
+      "BM_string_memcpy/14/2/2/iterations:1\n"
+      "BM_string_memcpy/14/2/4/iterations:1\n"
+      "BM_string_memcpy/14/2/8/iterations:1\n"
+      "BM_string_memcpy/14/2/16/iterations:1\n"
+      "BM_string_memcpy/14/2/32/iterations:1\n"
+      "BM_string_memcpy/14/4/1/iterations:1\n"
+      "BM_string_memcpy/14/4/2/iterations:1\n"
+      "BM_string_memcpy/14/4/4/iterations:1\n"
+      "BM_string_memcpy/14/4/8/iterations:1\n"
+      "BM_string_memcpy/14/4/16/iterations:1\n"
+      "BM_string_memcpy/14/4/32/iterations:1\n"
+      "BM_string_memcpy/14/8/1/iterations:1\n"
+      "BM_string_memcpy/14/8/2/iterations:1\n"
+      "BM_string_memcpy/14/8/4/iterations:1\n"
+      "BM_string_memcpy/14/8/8/iterations:1\n"
+      "BM_string_memcpy/14/8/16/iterations:1\n"
+      "BM_string_memcpy/14/8/32/iterations:1\n"
+      "BM_string_memcpy/14/16/1/iterations:1\n"
+      "BM_string_memcpy/14/16/2/iterations:1\n"
+      "BM_string_memcpy/14/16/4/iterations:1\n"
+      "BM_string_memcpy/14/16/8/iterations:1\n"
+      "BM_string_memcpy/14/16/16/iterations:1\n"
+      "BM_string_memcpy/14/16/32/iterations:1\n"
+      "BM_string_memcpy/14/32/1/iterations:1\n"
+      "BM_string_memcpy/14/32/2/iterations:1\n"
+      "BM_string_memcpy/14/32/4/iterations:1\n"
+      "BM_string_memcpy/14/32/8/iterations:1\n"
+      "BM_string_memcpy/14/32/16/iterations:1\n"
+      "BM_string_memcpy/14/32/32/iterations:1\n"
+      "BM_string_memcpy/15/0/0/iterations:1\n"
+      "BM_string_memcpy/15/1/1/iterations:1\n"
+      "BM_string_memcpy/15/1/2/iterations:1\n"
+      "BM_string_memcpy/15/1/4/iterations:1\n"
+      "BM_string_memcpy/15/1/8/iterations:1\n"
+      "BM_string_memcpy/15/1/16/iterations:1\n"
+      "BM_string_memcpy/15/1/32/iterations:1\n"
+      "BM_string_memcpy/15/2/1/iterations:1\n"
+      "BM_string_memcpy/15/2/2/iterations:1\n"
+      "BM_string_memcpy/15/2/4/iterations:1\n"
+      "BM_string_memcpy/15/2/8/iterations:1\n"
+      "BM_string_memcpy/15/2/16/iterations:1\n"
+      "BM_string_memcpy/15/2/32/iterations:1\n"
+      "BM_string_memcpy/15/4/1/iterations:1\n"
+      "BM_string_memcpy/15/4/2/iterations:1\n"
+      "BM_string_memcpy/15/4/4/iterations:1\n"
+      "BM_string_memcpy/15/4/8/iterations:1\n"
+      "BM_string_memcpy/15/4/16/iterations:1\n"
+      "BM_string_memcpy/15/4/32/iterations:1\n"
+      "BM_string_memcpy/15/8/1/iterations:1\n"
+      "BM_string_memcpy/15/8/2/iterations:1\n"
+      "BM_string_memcpy/15/8/4/iterations:1\n"
+      "BM_string_memcpy/15/8/8/iterations:1\n"
+      "BM_string_memcpy/15/8/16/iterations:1\n"
+      "BM_string_memcpy/15/8/32/iterations:1\n"
+      "BM_string_memcpy/15/16/1/iterations:1\n"
+      "BM_string_memcpy/15/16/2/iterations:1\n"
+      "BM_string_memcpy/15/16/4/iterations:1\n"
+      "BM_string_memcpy/15/16/8/iterations:1\n"
+      "BM_string_memcpy/15/16/16/iterations:1\n"
+      "BM_string_memcpy/15/16/32/iterations:1\n"
+      "BM_string_memcpy/15/32/1/iterations:1\n"
+      "BM_string_memcpy/15/32/2/iterations:1\n"
+      "BM_string_memcpy/15/32/4/iterations:1\n"
+      "BM_string_memcpy/15/32/8/iterations:1\n"
+      "BM_string_memcpy/15/32/16/iterations:1\n"
+      "BM_string_memcpy/15/32/32/iterations:1\n"
+      "BM_string_memcpy/16/0/0/iterations:1\n"
+      "BM_string_memcpy/16/1/1/iterations:1\n"
+      "BM_string_memcpy/16/1/2/iterations:1\n"
+      "BM_string_memcpy/16/1/4/iterations:1\n"
+      "BM_string_memcpy/16/1/8/iterations:1\n"
+      "BM_string_memcpy/16/1/16/iterations:1\n"
+      "BM_string_memcpy/16/1/32/iterations:1\n"
+      "BM_string_memcpy/16/2/1/iterations:1\n"
+      "BM_string_memcpy/16/2/2/iterations:1\n"
+      "BM_string_memcpy/16/2/4/iterations:1\n"
+      "BM_string_memcpy/16/2/8/iterations:1\n"
+      "BM_string_memcpy/16/2/16/iterations:1\n"
+      "BM_string_memcpy/16/2/32/iterations:1\n"
+      "BM_string_memcpy/16/4/1/iterations:1\n"
+      "BM_string_memcpy/16/4/2/iterations:1\n"
+      "BM_string_memcpy/16/4/4/iterations:1\n"
+      "BM_string_memcpy/16/4/8/iterations:1\n"
+      "BM_string_memcpy/16/4/16/iterations:1\n"
+      "BM_string_memcpy/16/4/32/iterations:1\n"
+      "BM_string_memcpy/16/8/1/iterations:1\n"
+      "BM_string_memcpy/16/8/2/iterations:1\n"
+      "BM_string_memcpy/16/8/4/iterations:1\n"
+      "BM_string_memcpy/16/8/8/iterations:1\n"
+      "BM_string_memcpy/16/8/16/iterations:1\n"
+      "BM_string_memcpy/16/8/32/iterations:1\n"
+      "BM_string_memcpy/16/16/1/iterations:1\n"
+      "BM_string_memcpy/16/16/2/iterations:1\n"
+      "BM_string_memcpy/16/16/4/iterations:1\n"
+      "BM_string_memcpy/16/16/8/iterations:1\n"
+      "BM_string_memcpy/16/16/16/iterations:1\n"
+      "BM_string_memcpy/16/16/32/iterations:1\n"
+      "BM_string_memcpy/16/32/1/iterations:1\n"
+      "BM_string_memcpy/16/32/2/iterations:1\n"
+      "BM_string_memcpy/16/32/4/iterations:1\n"
+      "BM_string_memcpy/16/32/8/iterations:1\n"
+      "BM_string_memcpy/16/32/16/iterations:1\n"
+      "BM_string_memcpy/16/32/32/iterations:1\n"
+      "BM_string_memcpy/24/0/0/iterations:1\n"
+      "BM_string_memcpy/24/1/1/iterations:1\n"
+      "BM_string_memcpy/24/1/2/iterations:1\n"
+      "BM_string_memcpy/24/1/4/iterations:1\n"
+      "BM_string_memcpy/24/1/8/iterations:1\n"
+      "BM_string_memcpy/24/1/16/iterations:1\n"
+      "BM_string_memcpy/24/1/32/iterations:1\n"
+      "BM_string_memcpy/24/2/1/iterations:1\n"
+      "BM_string_memcpy/24/2/2/iterations:1\n"
+      "BM_string_memcpy/24/2/4/iterations:1\n"
+      "BM_string_memcpy/24/2/8/iterations:1\n"
+      "BM_string_memcpy/24/2/16/iterations:1\n"
+      "BM_string_memcpy/24/2/32/iterations:1\n"
+      "BM_string_memcpy/24/4/1/iterations:1\n"
+      "BM_string_memcpy/24/4/2/iterations:1\n"
+      "BM_string_memcpy/24/4/4/iterations:1\n"
+      "BM_string_memcpy/24/4/8/iterations:1\n"
+      "BM_string_memcpy/24/4/16/iterations:1\n"
+      "BM_string_memcpy/24/4/32/iterations:1\n"
+      "BM_string_memcpy/24/8/1/iterations:1\n"
+      "BM_string_memcpy/24/8/2/iterations:1\n"
+      "BM_string_memcpy/24/8/4/iterations:1\n"
+      "BM_string_memcpy/24/8/8/iterations:1\n"
+      "BM_string_memcpy/24/8/16/iterations:1\n"
+      "BM_string_memcpy/24/8/32/iterations:1\n"
+      "BM_string_memcpy/24/16/1/iterations:1\n"
+      "BM_string_memcpy/24/16/2/iterations:1\n"
+      "BM_string_memcpy/24/16/4/iterations:1\n"
+      "BM_string_memcpy/24/16/8/iterations:1\n"
+      "BM_string_memcpy/24/16/16/iterations:1\n"
+      "BM_string_memcpy/24/16/32/iterations:1\n"
+      "BM_string_memcpy/24/32/1/iterations:1\n"
+      "BM_string_memcpy/24/32/2/iterations:1\n"
+      "BM_string_memcpy/24/32/4/iterations:1\n"
+      "BM_string_memcpy/24/32/8/iterations:1\n"
+      "BM_string_memcpy/24/32/16/iterations:1\n"
+      "BM_string_memcpy/24/32/32/iterations:1\n"
+      "BM_string_memcpy/32/0/0/iterations:1\n"
+      "BM_string_memcpy/32/1/1/iterations:1\n"
+      "BM_string_memcpy/32/1/2/iterations:1\n"
+      "BM_string_memcpy/32/1/4/iterations:1\n"
+      "BM_string_memcpy/32/1/8/iterations:1\n"
+      "BM_string_memcpy/32/1/16/iterations:1\n"
+      "BM_string_memcpy/32/1/32/iterations:1\n"
+      "BM_string_memcpy/32/2/1/iterations:1\n"
+      "BM_string_memcpy/32/2/2/iterations:1\n"
+      "BM_string_memcpy/32/2/4/iterations:1\n"
+      "BM_string_memcpy/32/2/8/iterations:1\n"
+      "BM_string_memcpy/32/2/16/iterations:1\n"
+      "BM_string_memcpy/32/2/32/iterations:1\n"
+      "BM_string_memcpy/32/4/1/iterations:1\n"
+      "BM_string_memcpy/32/4/2/iterations:1\n"
+      "BM_string_memcpy/32/4/4/iterations:1\n"
+      "BM_string_memcpy/32/4/8/iterations:1\n"
+      "BM_string_memcpy/32/4/16/iterations:1\n"
+      "BM_string_memcpy/32/4/32/iterations:1\n"
+      "BM_string_memcpy/32/8/1/iterations:1\n"
+      "BM_string_memcpy/32/8/2/iterations:1\n"
+      "BM_string_memcpy/32/8/4/iterations:1\n"
+      "BM_string_memcpy/32/8/8/iterations:1\n"
+      "BM_string_memcpy/32/8/16/iterations:1\n"
+      "BM_string_memcpy/32/8/32/iterations:1\n"
+      "BM_string_memcpy/32/16/1/iterations:1\n"
+      "BM_string_memcpy/32/16/2/iterations:1\n"
+      "BM_string_memcpy/32/16/4/iterations:1\n"
+      "BM_string_memcpy/32/16/8/iterations:1\n"
+      "BM_string_memcpy/32/16/16/iterations:1\n"
+      "BM_string_memcpy/32/16/32/iterations:1\n"
+      "BM_string_memcpy/32/32/1/iterations:1\n"
+      "BM_string_memcpy/32/32/2/iterations:1\n"
+      "BM_string_memcpy/32/32/4/iterations:1\n"
+      "BM_string_memcpy/32/32/8/iterations:1\n"
+      "BM_string_memcpy/32/32/16/iterations:1\n"
+      "BM_string_memcpy/32/32/32/iterations:1\n"
+      "BM_string_memcpy/40/0/0/iterations:1\n"
+      "BM_string_memcpy/40/1/1/iterations:1\n"
+      "BM_string_memcpy/40/1/2/iterations:1\n"
+      "BM_string_memcpy/40/1/4/iterations:1\n"
+      "BM_string_memcpy/40/1/8/iterations:1\n"
+      "BM_string_memcpy/40/1/16/iterations:1\n"
+      "BM_string_memcpy/40/1/32/iterations:1\n"
+      "BM_string_memcpy/40/2/1/iterations:1\n"
+      "BM_string_memcpy/40/2/2/iterations:1\n"
+      "BM_string_memcpy/40/2/4/iterations:1\n"
+      "BM_string_memcpy/40/2/8/iterations:1\n"
+      "BM_string_memcpy/40/2/16/iterations:1\n"
+      "BM_string_memcpy/40/2/32/iterations:1\n"
+      "BM_string_memcpy/40/4/1/iterations:1\n"
+      "BM_string_memcpy/40/4/2/iterations:1\n"
+      "BM_string_memcpy/40/4/4/iterations:1\n"
+      "BM_string_memcpy/40/4/8/iterations:1\n"
+      "BM_string_memcpy/40/4/16/iterations:1\n"
+      "BM_string_memcpy/40/4/32/iterations:1\n"
+      "BM_string_memcpy/40/8/1/iterations:1\n"
+      "BM_string_memcpy/40/8/2/iterations:1\n"
+      "BM_string_memcpy/40/8/4/iterations:1\n"
+      "BM_string_memcpy/40/8/8/iterations:1\n"
+      "BM_string_memcpy/40/8/16/iterations:1\n"
+      "BM_string_memcpy/40/8/32/iterations:1\n"
+      "BM_string_memcpy/40/16/1/iterations:1\n"
+      "BM_string_memcpy/40/16/2/iterations:1\n"
+      "BM_string_memcpy/40/16/4/iterations:1\n"
+      "BM_string_memcpy/40/16/8/iterations:1\n"
+      "BM_string_memcpy/40/16/16/iterations:1\n"
+      "BM_string_memcpy/40/16/32/iterations:1\n"
+      "BM_string_memcpy/40/32/1/iterations:1\n"
+      "BM_string_memcpy/40/32/2/iterations:1\n"
+      "BM_string_memcpy/40/32/4/iterations:1\n"
+      "BM_string_memcpy/40/32/8/iterations:1\n"
+      "BM_string_memcpy/40/32/16/iterations:1\n"
+      "BM_string_memcpy/40/32/32/iterations:1\n"
+      "BM_string_memcpy/48/0/0/iterations:1\n"
+      "BM_string_memcpy/48/1/1/iterations:1\n"
+      "BM_string_memcpy/48/1/2/iterations:1\n"
+      "BM_string_memcpy/48/1/4/iterations:1\n"
+      "BM_string_memcpy/48/1/8/iterations:1\n"
+      "BM_string_memcpy/48/1/16/iterations:1\n"
+      "BM_string_memcpy/48/1/32/iterations:1\n"
+      "BM_string_memcpy/48/2/1/iterations:1\n"
+      "BM_string_memcpy/48/2/2/iterations:1\n"
+      "BM_string_memcpy/48/2/4/iterations:1\n"
+      "BM_string_memcpy/48/2/8/iterations:1\n"
+      "BM_string_memcpy/48/2/16/iterations:1\n"
+      "BM_string_memcpy/48/2/32/iterations:1\n"
+      "BM_string_memcpy/48/4/1/iterations:1\n"
+      "BM_string_memcpy/48/4/2/iterations:1\n"
+      "BM_string_memcpy/48/4/4/iterations:1\n"
+      "BM_string_memcpy/48/4/8/iterations:1\n"
+      "BM_string_memcpy/48/4/16/iterations:1\n"
+      "BM_string_memcpy/48/4/32/iterations:1\n"
+      "BM_string_memcpy/48/8/1/iterations:1\n"
+      "BM_string_memcpy/48/8/2/iterations:1\n"
+      "BM_string_memcpy/48/8/4/iterations:1\n"
+      "BM_string_memcpy/48/8/8/iterations:1\n"
+      "BM_string_memcpy/48/8/16/iterations:1\n"
+      "BM_string_memcpy/48/8/32/iterations:1\n"
+      "BM_string_memcpy/48/16/1/iterations:1\n"
+      "BM_string_memcpy/48/16/2/iterations:1\n"
+      "BM_string_memcpy/48/16/4/iterations:1\n"
+      "BM_string_memcpy/48/16/8/iterations:1\n"
+      "BM_string_memcpy/48/16/16/iterations:1\n"
+      "BM_string_memcpy/48/16/32/iterations:1\n"
+      "BM_string_memcpy/48/32/1/iterations:1\n"
+      "BM_string_memcpy/48/32/2/iterations:1\n"
+      "BM_string_memcpy/48/32/4/iterations:1\n"
+      "BM_string_memcpy/48/32/8/iterations:1\n"
+      "BM_string_memcpy/48/32/16/iterations:1\n"
+      "BM_string_memcpy/48/32/32/iterations:1\n"
+      "BM_string_memcpy/56/0/0/iterations:1\n"
+      "BM_string_memcpy/56/1/1/iterations:1\n"
+      "BM_string_memcpy/56/1/2/iterations:1\n"
+      "BM_string_memcpy/56/1/4/iterations:1\n"
+      "BM_string_memcpy/56/1/8/iterations:1\n"
+      "BM_string_memcpy/56/1/16/iterations:1\n"
+      "BM_string_memcpy/56/1/32/iterations:1\n"
+      "BM_string_memcpy/56/2/1/iterations:1\n"
+      "BM_string_memcpy/56/2/2/iterations:1\n"
+      "BM_string_memcpy/56/2/4/iterations:1\n"
+      "BM_string_memcpy/56/2/8/iterations:1\n"
+      "BM_string_memcpy/56/2/16/iterations:1\n"
+      "BM_string_memcpy/56/2/32/iterations:1\n"
+      "BM_string_memcpy/56/4/1/iterations:1\n"
+      "BM_string_memcpy/56/4/2/iterations:1\n"
+      "BM_string_memcpy/56/4/4/iterations:1\n"
+      "BM_string_memcpy/56/4/8/iterations:1\n"
+      "BM_string_memcpy/56/4/16/iterations:1\n"
+      "BM_string_memcpy/56/4/32/iterations:1\n"
+      "BM_string_memcpy/56/8/1/iterations:1\n"
+      "BM_string_memcpy/56/8/2/iterations:1\n"
+      "BM_string_memcpy/56/8/4/iterations:1\n"
+      "BM_string_memcpy/56/8/8/iterations:1\n"
+      "BM_string_memcpy/56/8/16/iterations:1\n"
+      "BM_string_memcpy/56/8/32/iterations:1\n"
+      "BM_string_memcpy/56/16/1/iterations:1\n"
+      "BM_string_memcpy/56/16/2/iterations:1\n"
+      "BM_string_memcpy/56/16/4/iterations:1\n"
+      "BM_string_memcpy/56/16/8/iterations:1\n"
+      "BM_string_memcpy/56/16/16/iterations:1\n"
+      "BM_string_memcpy/56/16/32/iterations:1\n"
+      "BM_string_memcpy/56/32/1/iterations:1\n"
+      "BM_string_memcpy/56/32/2/iterations:1\n"
+      "BM_string_memcpy/56/32/4/iterations:1\n"
+      "BM_string_memcpy/56/32/8/iterations:1\n"
+      "BM_string_memcpy/56/32/16/iterations:1\n"
+      "BM_string_memcpy/56/32/32/iterations:1\n"
+      "BM_string_memcpy/64/0/0/iterations:1\n"
+      "BM_string_memcpy/64/1/1/iterations:1\n"
+      "BM_string_memcpy/64/1/2/iterations:1\n"
+      "BM_string_memcpy/64/1/4/iterations:1\n"
+      "BM_string_memcpy/64/1/8/iterations:1\n"
+      "BM_string_memcpy/64/1/16/iterations:1\n"
+      "BM_string_memcpy/64/1/32/iterations:1\n"
+      "BM_string_memcpy/64/2/1/iterations:1\n"
+      "BM_string_memcpy/64/2/2/iterations:1\n"
+      "BM_string_memcpy/64/2/4/iterations:1\n"
+      "BM_string_memcpy/64/2/8/iterations:1\n"
+      "BM_string_memcpy/64/2/16/iterations:1\n"
+      "BM_string_memcpy/64/2/32/iterations:1\n"
+      "BM_string_memcpy/64/4/1/iterations:1\n"
+      "BM_string_memcpy/64/4/2/iterations:1\n"
+      "BM_string_memcpy/64/4/4/iterations:1\n"
+      "BM_string_memcpy/64/4/8/iterations:1\n"
+      "BM_string_memcpy/64/4/16/iterations:1\n"
+      "BM_string_memcpy/64/4/32/iterations:1\n"
+      "BM_string_memcpy/64/8/1/iterations:1\n"
+      "BM_string_memcpy/64/8/2/iterations:1\n"
+      "BM_string_memcpy/64/8/4/iterations:1\n"
+      "BM_string_memcpy/64/8/8/iterations:1\n"
+      "BM_string_memcpy/64/8/16/iterations:1\n"
+      "BM_string_memcpy/64/8/32/iterations:1\n"
+      "BM_string_memcpy/64/16/1/iterations:1\n"
+      "BM_string_memcpy/64/16/2/iterations:1\n"
+      "BM_string_memcpy/64/16/4/iterations:1\n"
+      "BM_string_memcpy/64/16/8/iterations:1\n"
+      "BM_string_memcpy/64/16/16/iterations:1\n"
+      "BM_string_memcpy/64/16/32/iterations:1\n"
+      "BM_string_memcpy/64/32/1/iterations:1\n"
+      "BM_string_memcpy/64/32/2/iterations:1\n"
+      "BM_string_memcpy/64/32/4/iterations:1\n"
+      "BM_string_memcpy/64/32/8/iterations:1\n"
+      "BM_string_memcpy/64/32/16/iterations:1\n"
+      "BM_string_memcpy/64/32/32/iterations:1\n"
+      "BM_string_memcpy/72/0/0/iterations:1\n"
+      "BM_string_memcpy/72/1/1/iterations:1\n"
+      "BM_string_memcpy/72/1/2/iterations:1\n"
+      "BM_string_memcpy/72/1/4/iterations:1\n"
+      "BM_string_memcpy/72/1/8/iterations:1\n"
+      "BM_string_memcpy/72/1/16/iterations:1\n"
+      "BM_string_memcpy/72/1/32/iterations:1\n"
+      "BM_string_memcpy/72/2/1/iterations:1\n"
+      "BM_string_memcpy/72/2/2/iterations:1\n"
+      "BM_string_memcpy/72/2/4/iterations:1\n"
+      "BM_string_memcpy/72/2/8/iterations:1\n"
+      "BM_string_memcpy/72/2/16/iterations:1\n"
+      "BM_string_memcpy/72/2/32/iterations:1\n"
+      "BM_string_memcpy/72/4/1/iterations:1\n"
+      "BM_string_memcpy/72/4/2/iterations:1\n"
+      "BM_string_memcpy/72/4/4/iterations:1\n"
+      "BM_string_memcpy/72/4/8/iterations:1\n"
+      "BM_string_memcpy/72/4/16/iterations:1\n"
+      "BM_string_memcpy/72/4/32/iterations:1\n"
+      "BM_string_memcpy/72/8/1/iterations:1\n"
+      "BM_string_memcpy/72/8/2/iterations:1\n"
+      "BM_string_memcpy/72/8/4/iterations:1\n"
+      "BM_string_memcpy/72/8/8/iterations:1\n"
+      "BM_string_memcpy/72/8/16/iterations:1\n"
+      "BM_string_memcpy/72/8/32/iterations:1\n"
+      "BM_string_memcpy/72/16/1/iterations:1\n"
+      "BM_string_memcpy/72/16/2/iterations:1\n"
+      "BM_string_memcpy/72/16/4/iterations:1\n"
+      "BM_string_memcpy/72/16/8/iterations:1\n"
+      "BM_string_memcpy/72/16/16/iterations:1\n"
+      "BM_string_memcpy/72/16/32/iterations:1\n"
+      "BM_string_memcpy/72/32/1/iterations:1\n"
+      "BM_string_memcpy/72/32/2/iterations:1\n"
+      "BM_string_memcpy/72/32/4/iterations:1\n"
+      "BM_string_memcpy/72/32/8/iterations:1\n"
+      "BM_string_memcpy/72/32/16/iterations:1\n"
+      "BM_string_memcpy/72/32/32/iterations:1\n"
+      "BM_string_memcpy/80/0/0/iterations:1\n"
+      "BM_string_memcpy/80/1/1/iterations:1\n"
+      "BM_string_memcpy/80/1/2/iterations:1\n"
+      "BM_string_memcpy/80/1/4/iterations:1\n"
+      "BM_string_memcpy/80/1/8/iterations:1\n"
+      "BM_string_memcpy/80/1/16/iterations:1\n"
+      "BM_string_memcpy/80/1/32/iterations:1\n"
+      "BM_string_memcpy/80/2/1/iterations:1\n"
+      "BM_string_memcpy/80/2/2/iterations:1\n"
+      "BM_string_memcpy/80/2/4/iterations:1\n"
+      "BM_string_memcpy/80/2/8/iterations:1\n"
+      "BM_string_memcpy/80/2/16/iterations:1\n"
+      "BM_string_memcpy/80/2/32/iterations:1\n"
+      "BM_string_memcpy/80/4/1/iterations:1\n"
+      "BM_string_memcpy/80/4/2/iterations:1\n"
+      "BM_string_memcpy/80/4/4/iterations:1\n"
+      "BM_string_memcpy/80/4/8/iterations:1\n"
+      "BM_string_memcpy/80/4/16/iterations:1\n"
+      "BM_string_memcpy/80/4/32/iterations:1\n"
+      "BM_string_memcpy/80/8/1/iterations:1\n"
+      "BM_string_memcpy/80/8/2/iterations:1\n"
+      "BM_string_memcpy/80/8/4/iterations:1\n"
+      "BM_string_memcpy/80/8/8/iterations:1\n"
+      "BM_string_memcpy/80/8/16/iterations:1\n"
+      "BM_string_memcpy/80/8/32/iterations:1\n"
+      "BM_string_memcpy/80/16/1/iterations:1\n"
+      "BM_string_memcpy/80/16/2/iterations:1\n"
+      "BM_string_memcpy/80/16/4/iterations:1\n"
+      "BM_string_memcpy/80/16/8/iterations:1\n"
+      "BM_string_memcpy/80/16/16/iterations:1\n"
+      "BM_string_memcpy/80/16/32/iterations:1\n"
+      "BM_string_memcpy/80/32/1/iterations:1\n"
+      "BM_string_memcpy/80/32/2/iterations:1\n"
+      "BM_string_memcpy/80/32/4/iterations:1\n"
+      "BM_string_memcpy/80/32/8/iterations:1\n"
+      "BM_string_memcpy/80/32/16/iterations:1\n"
+      "BM_string_memcpy/80/32/32/iterations:1\n"
+      "BM_string_memcpy/88/0/0/iterations:1\n"
+      "BM_string_memcpy/88/1/1/iterations:1\n"
+      "BM_string_memcpy/88/1/2/iterations:1\n"
+      "BM_string_memcpy/88/1/4/iterations:1\n"
+      "BM_string_memcpy/88/1/8/iterations:1\n"
+      "BM_string_memcpy/88/1/16/iterations:1\n"
+      "BM_string_memcpy/88/1/32/iterations:1\n"
+      "BM_string_memcpy/88/2/1/iterations:1\n"
+      "BM_string_memcpy/88/2/2/iterations:1\n"
+      "BM_string_memcpy/88/2/4/iterations:1\n"
+      "BM_string_memcpy/88/2/8/iterations:1\n"
+      "BM_string_memcpy/88/2/16/iterations:1\n"
+      "BM_string_memcpy/88/2/32/iterations:1\n"
+      "BM_string_memcpy/88/4/1/iterations:1\n"
+      "BM_string_memcpy/88/4/2/iterations:1\n"
+      "BM_string_memcpy/88/4/4/iterations:1\n"
+      "BM_string_memcpy/88/4/8/iterations:1\n"
+      "BM_string_memcpy/88/4/16/iterations:1\n"
+      "BM_string_memcpy/88/4/32/iterations:1\n"
+      "BM_string_memcpy/88/8/1/iterations:1\n"
+      "BM_string_memcpy/88/8/2/iterations:1\n"
+      "BM_string_memcpy/88/8/4/iterations:1\n"
+      "BM_string_memcpy/88/8/8/iterations:1\n"
+      "BM_string_memcpy/88/8/16/iterations:1\n"
+      "BM_string_memcpy/88/8/32/iterations:1\n"
+      "BM_string_memcpy/88/16/1/iterations:1\n"
+      "BM_string_memcpy/88/16/2/iterations:1\n"
+      "BM_string_memcpy/88/16/4/iterations:1\n"
+      "BM_string_memcpy/88/16/8/iterations:1\n"
+      "BM_string_memcpy/88/16/16/iterations:1\n"
+      "BM_string_memcpy/88/16/32/iterations:1\n"
+      "BM_string_memcpy/88/32/1/iterations:1\n"
+      "BM_string_memcpy/88/32/2/iterations:1\n"
+      "BM_string_memcpy/88/32/4/iterations:1\n"
+      "BM_string_memcpy/88/32/8/iterations:1\n"
+      "BM_string_memcpy/88/32/16/iterations:1\n"
+      "BM_string_memcpy/88/32/32/iterations:1\n"
+      "BM_string_memcpy/96/0/0/iterations:1\n"
+      "BM_string_memcpy/96/1/1/iterations:1\n"
+      "BM_string_memcpy/96/1/2/iterations:1\n"
+      "BM_string_memcpy/96/1/4/iterations:1\n"
+      "BM_string_memcpy/96/1/8/iterations:1\n"
+      "BM_string_memcpy/96/1/16/iterations:1\n"
+      "BM_string_memcpy/96/1/32/iterations:1\n"
+      "BM_string_memcpy/96/2/1/iterations:1\n"
+      "BM_string_memcpy/96/2/2/iterations:1\n"
+      "BM_string_memcpy/96/2/4/iterations:1\n"
+      "BM_string_memcpy/96/2/8/iterations:1\n"
+      "BM_string_memcpy/96/2/16/iterations:1\n"
+      "BM_string_memcpy/96/2/32/iterations:1\n"
+      "BM_string_memcpy/96/4/1/iterations:1\n"
+      "BM_string_memcpy/96/4/2/iterations:1\n"
+      "BM_string_memcpy/96/4/4/iterations:1\n"
+      "BM_string_memcpy/96/4/8/iterations:1\n"
+      "BM_string_memcpy/96/4/16/iterations:1\n"
+      "BM_string_memcpy/96/4/32/iterations:1\n"
+      "BM_string_memcpy/96/8/1/iterations:1\n"
+      "BM_string_memcpy/96/8/2/iterations:1\n"
+      "BM_string_memcpy/96/8/4/iterations:1\n"
+      "BM_string_memcpy/96/8/8/iterations:1\n"
+      "BM_string_memcpy/96/8/16/iterations:1\n"
+      "BM_string_memcpy/96/8/32/iterations:1\n"
+      "BM_string_memcpy/96/16/1/iterations:1\n"
+      "BM_string_memcpy/96/16/2/iterations:1\n"
+      "BM_string_memcpy/96/16/4/iterations:1\n"
+      "BM_string_memcpy/96/16/8/iterations:1\n"
+      "BM_string_memcpy/96/16/16/iterations:1\n"
+      "BM_string_memcpy/96/16/32/iterations:1\n"
+      "BM_string_memcpy/96/32/1/iterations:1\n"
+      "BM_string_memcpy/96/32/2/iterations:1\n"
+      "BM_string_memcpy/96/32/4/iterations:1\n"
+      "BM_string_memcpy/96/32/8/iterations:1\n"
+      "BM_string_memcpy/96/32/16/iterations:1\n"
+      "BM_string_memcpy/96/32/32/iterations:1\n"
+      "BM_string_memcpy/104/0/0/iterations:1\n"
+      "BM_string_memcpy/104/1/1/iterations:1\n"
+      "BM_string_memcpy/104/1/2/iterations:1\n"
+      "BM_string_memcpy/104/1/4/iterations:1\n"
+      "BM_string_memcpy/104/1/8/iterations:1\n"
+      "BM_string_memcpy/104/1/16/iterations:1\n"
+      "BM_string_memcpy/104/1/32/iterations:1\n"
+      "BM_string_memcpy/104/2/1/iterations:1\n"
+      "BM_string_memcpy/104/2/2/iterations:1\n"
+      "BM_string_memcpy/104/2/4/iterations:1\n"
+      "BM_string_memcpy/104/2/8/iterations:1\n"
+      "BM_string_memcpy/104/2/16/iterations:1\n"
+      "BM_string_memcpy/104/2/32/iterations:1\n"
+      "BM_string_memcpy/104/4/1/iterations:1\n"
+      "BM_string_memcpy/104/4/2/iterations:1\n"
+      "BM_string_memcpy/104/4/4/iterations:1\n"
+      "BM_string_memcpy/104/4/8/iterations:1\n"
+      "BM_string_memcpy/104/4/16/iterations:1\n"
+      "BM_string_memcpy/104/4/32/iterations:1\n"
+      "BM_string_memcpy/104/8/1/iterations:1\n"
+      "BM_string_memcpy/104/8/2/iterations:1\n"
+      "BM_string_memcpy/104/8/4/iterations:1\n"
+      "BM_string_memcpy/104/8/8/iterations:1\n"
+      "BM_string_memcpy/104/8/16/iterations:1\n"
+      "BM_string_memcpy/104/8/32/iterations:1\n"
+      "BM_string_memcpy/104/16/1/iterations:1\n"
+      "BM_string_memcpy/104/16/2/iterations:1\n"
+      "BM_string_memcpy/104/16/4/iterations:1\n"
+      "BM_string_memcpy/104/16/8/iterations:1\n"
+      "BM_string_memcpy/104/16/16/iterations:1\n"
+      "BM_string_memcpy/104/16/32/iterations:1\n"
+      "BM_string_memcpy/104/32/1/iterations:1\n"
+      "BM_string_memcpy/104/32/2/iterations:1\n"
+      "BM_string_memcpy/104/32/4/iterations:1\n"
+      "BM_string_memcpy/104/32/8/iterations:1\n"
+      "BM_string_memcpy/104/32/16/iterations:1\n"
+      "BM_string_memcpy/104/32/32/iterations:1\n"
+      "BM_string_memcpy/112/0/0/iterations:1\n"
+      "BM_string_memcpy/112/1/1/iterations:1\n"
+      "BM_string_memcpy/112/1/2/iterations:1\n"
+      "BM_string_memcpy/112/1/4/iterations:1\n"
+      "BM_string_memcpy/112/1/8/iterations:1\n"
+      "BM_string_memcpy/112/1/16/iterations:1\n"
+      "BM_string_memcpy/112/1/32/iterations:1\n"
+      "BM_string_memcpy/112/2/1/iterations:1\n"
+      "BM_string_memcpy/112/2/2/iterations:1\n"
+      "BM_string_memcpy/112/2/4/iterations:1\n"
+      "BM_string_memcpy/112/2/8/iterations:1\n"
+      "BM_string_memcpy/112/2/16/iterations:1\n"
+      "BM_string_memcpy/112/2/32/iterations:1\n"
+      "BM_string_memcpy/112/4/1/iterations:1\n"
+      "BM_string_memcpy/112/4/2/iterations:1\n"
+      "BM_string_memcpy/112/4/4/iterations:1\n"
+      "BM_string_memcpy/112/4/8/iterations:1\n"
+      "BM_string_memcpy/112/4/16/iterations:1\n"
+      "BM_string_memcpy/112/4/32/iterations:1\n"
+      "BM_string_memcpy/112/8/1/iterations:1\n"
+      "BM_string_memcpy/112/8/2/iterations:1\n"
+      "BM_string_memcpy/112/8/4/iterations:1\n"
+      "BM_string_memcpy/112/8/8/iterations:1\n"
+      "BM_string_memcpy/112/8/16/iterations:1\n"
+      "BM_string_memcpy/112/8/32/iterations:1\n"
+      "BM_string_memcpy/112/16/1/iterations:1\n"
+      "BM_string_memcpy/112/16/2/iterations:1\n"
+      "BM_string_memcpy/112/16/4/iterations:1\n"
+      "BM_string_memcpy/112/16/8/iterations:1\n"
+      "BM_string_memcpy/112/16/16/iterations:1\n"
+      "BM_string_memcpy/112/16/32/iterations:1\n"
+      "BM_string_memcpy/112/32/1/iterations:1\n"
+      "BM_string_memcpy/112/32/2/iterations:1\n"
+      "BM_string_memcpy/112/32/4/iterations:1\n"
+      "BM_string_memcpy/112/32/8/iterations:1\n"
+      "BM_string_memcpy/112/32/16/iterations:1\n"
+      "BM_string_memcpy/112/32/32/iterations:1\n"
+      "BM_string_memcpy/120/0/0/iterations:1\n"
+      "BM_string_memcpy/120/1/1/iterations:1\n"
+      "BM_string_memcpy/120/1/2/iterations:1\n"
+      "BM_string_memcpy/120/1/4/iterations:1\n"
+      "BM_string_memcpy/120/1/8/iterations:1\n"
+      "BM_string_memcpy/120/1/16/iterations:1\n"
+      "BM_string_memcpy/120/1/32/iterations:1\n"
+      "BM_string_memcpy/120/2/1/iterations:1\n"
+      "BM_string_memcpy/120/2/2/iterations:1\n"
+      "BM_string_memcpy/120/2/4/iterations:1\n"
+      "BM_string_memcpy/120/2/8/iterations:1\n"
+      "BM_string_memcpy/120/2/16/iterations:1\n"
+      "BM_string_memcpy/120/2/32/iterations:1\n"
+      "BM_string_memcpy/120/4/1/iterations:1\n"
+      "BM_string_memcpy/120/4/2/iterations:1\n"
+      "BM_string_memcpy/120/4/4/iterations:1\n"
+      "BM_string_memcpy/120/4/8/iterations:1\n"
+      "BM_string_memcpy/120/4/16/iterations:1\n"
+      "BM_string_memcpy/120/4/32/iterations:1\n"
+      "BM_string_memcpy/120/8/1/iterations:1\n"
+      "BM_string_memcpy/120/8/2/iterations:1\n"
+      "BM_string_memcpy/120/8/4/iterations:1\n"
+      "BM_string_memcpy/120/8/8/iterations:1\n"
+      "BM_string_memcpy/120/8/16/iterations:1\n"
+      "BM_string_memcpy/120/8/32/iterations:1\n"
+      "BM_string_memcpy/120/16/1/iterations:1\n"
+      "BM_string_memcpy/120/16/2/iterations:1\n"
+      "BM_string_memcpy/120/16/4/iterations:1\n"
+      "BM_string_memcpy/120/16/8/iterations:1\n"
+      "BM_string_memcpy/120/16/16/iterations:1\n"
+      "BM_string_memcpy/120/16/32/iterations:1\n"
+      "BM_string_memcpy/120/32/1/iterations:1\n"
+      "BM_string_memcpy/120/32/2/iterations:1\n"
+      "BM_string_memcpy/120/32/4/iterations:1\n"
+      "BM_string_memcpy/120/32/8/iterations:1\n"
+      "BM_string_memcpy/120/32/16/iterations:1\n"
+      "BM_string_memcpy/120/32/32/iterations:1\n"
+      "BM_string_memcpy/128/0/0/iterations:1\n"
+      "BM_string_memcpy/128/1/1/iterations:1\n"
+      "BM_string_memcpy/128/1/2/iterations:1\n"
+      "BM_string_memcpy/128/1/4/iterations:1\n"
+      "BM_string_memcpy/128/1/8/iterations:1\n"
+      "BM_string_memcpy/128/1/16/iterations:1\n"
+      "BM_string_memcpy/128/1/32/iterations:1\n"
+      "BM_string_memcpy/128/2/1/iterations:1\n"
+      "BM_string_memcpy/128/2/2/iterations:1\n"
+      "BM_string_memcpy/128/2/4/iterations:1\n"
+      "BM_string_memcpy/128/2/8/iterations:1\n"
+      "BM_string_memcpy/128/2/16/iterations:1\n"
+      "BM_string_memcpy/128/2/32/iterations:1\n"
+      "BM_string_memcpy/128/4/1/iterations:1\n"
+      "BM_string_memcpy/128/4/2/iterations:1\n"
+      "BM_string_memcpy/128/4/4/iterations:1\n"
+      "BM_string_memcpy/128/4/8/iterations:1\n"
+      "BM_string_memcpy/128/4/16/iterations:1\n"
+      "BM_string_memcpy/128/4/32/iterations:1\n"
+      "BM_string_memcpy/128/8/1/iterations:1\n"
+      "BM_string_memcpy/128/8/2/iterations:1\n"
+      "BM_string_memcpy/128/8/4/iterations:1\n"
+      "BM_string_memcpy/128/8/8/iterations:1\n"
+      "BM_string_memcpy/128/8/16/iterations:1\n"
+      "BM_string_memcpy/128/8/32/iterations:1\n"
+      "BM_string_memcpy/128/16/1/iterations:1\n"
+      "BM_string_memcpy/128/16/2/iterations:1\n"
+      "BM_string_memcpy/128/16/4/iterations:1\n"
+      "BM_string_memcpy/128/16/8/iterations:1\n"
+      "BM_string_memcpy/128/16/16/iterations:1\n"
+      "BM_string_memcpy/128/16/32/iterations:1\n"
+      "BM_string_memcpy/128/32/1/iterations:1\n"
+      "BM_string_memcpy/128/32/2/iterations:1\n"
+      "BM_string_memcpy/128/32/4/iterations:1\n"
+      "BM_string_memcpy/128/32/8/iterations:1\n"
+      "BM_string_memcpy/128/32/16/iterations:1\n"
+      "BM_string_memcpy/128/32/32/iterations:1\n"
+      "BM_string_memcpy/136/0/0/iterations:1\n"
+      "BM_string_memcpy/136/1/1/iterations:1\n"
+      "BM_string_memcpy/136/1/2/iterations:1\n"
+      "BM_string_memcpy/136/1/4/iterations:1\n"
+      "BM_string_memcpy/136/1/8/iterations:1\n"
+      "BM_string_memcpy/136/1/16/iterations:1\n"
+      "BM_string_memcpy/136/1/32/iterations:1\n"
+      "BM_string_memcpy/136/2/1/iterations:1\n"
+      "BM_string_memcpy/136/2/2/iterations:1\n"
+      "BM_string_memcpy/136/2/4/iterations:1\n"
+      "BM_string_memcpy/136/2/8/iterations:1\n"
+      "BM_string_memcpy/136/2/16/iterations:1\n"
+      "BM_string_memcpy/136/2/32/iterations:1\n"
+      "BM_string_memcpy/136/4/1/iterations:1\n"
+      "BM_string_memcpy/136/4/2/iterations:1\n"
+      "BM_string_memcpy/136/4/4/iterations:1\n"
+      "BM_string_memcpy/136/4/8/iterations:1\n"
+      "BM_string_memcpy/136/4/16/iterations:1\n"
+      "BM_string_memcpy/136/4/32/iterations:1\n"
+      "BM_string_memcpy/136/8/1/iterations:1\n"
+      "BM_string_memcpy/136/8/2/iterations:1\n"
+      "BM_string_memcpy/136/8/4/iterations:1\n"
+      "BM_string_memcpy/136/8/8/iterations:1\n"
+      "BM_string_memcpy/136/8/16/iterations:1\n"
+      "BM_string_memcpy/136/8/32/iterations:1\n"
+      "BM_string_memcpy/136/16/1/iterations:1\n"
+      "BM_string_memcpy/136/16/2/iterations:1\n"
+      "BM_string_memcpy/136/16/4/iterations:1\n"
+      "BM_string_memcpy/136/16/8/iterations:1\n"
+      "BM_string_memcpy/136/16/16/iterations:1\n"
+      "BM_string_memcpy/136/16/32/iterations:1\n"
+      "BM_string_memcpy/136/32/1/iterations:1\n"
+      "BM_string_memcpy/136/32/2/iterations:1\n"
+      "BM_string_memcpy/136/32/4/iterations:1\n"
+      "BM_string_memcpy/136/32/8/iterations:1\n"
+      "BM_string_memcpy/136/32/16/iterations:1\n"
+      "BM_string_memcpy/136/32/32/iterations:1\n"
+      "BM_string_memcpy/144/0/0/iterations:1\n"
+      "BM_string_memcpy/144/1/1/iterations:1\n"
+      "BM_string_memcpy/144/1/2/iterations:1\n"
+      "BM_string_memcpy/144/1/4/iterations:1\n"
+      "BM_string_memcpy/144/1/8/iterations:1\n"
+      "BM_string_memcpy/144/1/16/iterations:1\n"
+      "BM_string_memcpy/144/1/32/iterations:1\n"
+      "BM_string_memcpy/144/2/1/iterations:1\n"
+      "BM_string_memcpy/144/2/2/iterations:1\n"
+      "BM_string_memcpy/144/2/4/iterations:1\n"
+      "BM_string_memcpy/144/2/8/iterations:1\n"
+      "BM_string_memcpy/144/2/16/iterations:1\n"
+      "BM_string_memcpy/144/2/32/iterations:1\n"
+      "BM_string_memcpy/144/4/1/iterations:1\n"
+      "BM_string_memcpy/144/4/2/iterations:1\n"
+      "BM_string_memcpy/144/4/4/iterations:1\n"
+      "BM_string_memcpy/144/4/8/iterations:1\n"
+      "BM_string_memcpy/144/4/16/iterations:1\n"
+      "BM_string_memcpy/144/4/32/iterations:1\n"
+      "BM_string_memcpy/144/8/1/iterations:1\n"
+      "BM_string_memcpy/144/8/2/iterations:1\n"
+      "BM_string_memcpy/144/8/4/iterations:1\n"
+      "BM_string_memcpy/144/8/8/iterations:1\n"
+      "BM_string_memcpy/144/8/16/iterations:1\n"
+      "BM_string_memcpy/144/8/32/iterations:1\n"
+      "BM_string_memcpy/144/16/1/iterations:1\n"
+      "BM_string_memcpy/144/16/2/iterations:1\n"
+      "BM_string_memcpy/144/16/4/iterations:1\n"
+      "BM_string_memcpy/144/16/8/iterations:1\n"
+      "BM_string_memcpy/144/16/16/iterations:1\n"
+      "BM_string_memcpy/144/16/32/iterations:1\n"
+      "BM_string_memcpy/144/32/1/iterations:1\n"
+      "BM_string_memcpy/144/32/2/iterations:1\n"
+      "BM_string_memcpy/144/32/4/iterations:1\n"
+      "BM_string_memcpy/144/32/8/iterations:1\n"
+      "BM_string_memcpy/144/32/16/iterations:1\n"
+      "BM_string_memcpy/144/32/32/iterations:1\n"
+      "BM_string_memcpy/160/0/0/iterations:1\n"
+      "BM_string_memcpy/160/1/1/iterations:1\n"
+      "BM_string_memcpy/160/1/2/iterations:1\n"
+      "BM_string_memcpy/160/1/4/iterations:1\n"
+      "BM_string_memcpy/160/1/8/iterations:1\n"
+      "BM_string_memcpy/160/1/16/iterations:1\n"
+      "BM_string_memcpy/160/1/32/iterations:1\n"
+      "BM_string_memcpy/160/2/1/iterations:1\n"
+      "BM_string_memcpy/160/2/2/iterations:1\n"
+      "BM_string_memcpy/160/2/4/iterations:1\n"
+      "BM_string_memcpy/160/2/8/iterations:1\n"
+      "BM_string_memcpy/160/2/16/iterations:1\n"
+      "BM_string_memcpy/160/2/32/iterations:1\n"
+      "BM_string_memcpy/160/4/1/iterations:1\n"
+      "BM_string_memcpy/160/4/2/iterations:1\n"
+      "BM_string_memcpy/160/4/4/iterations:1\n"
+      "BM_string_memcpy/160/4/8/iterations:1\n"
+      "BM_string_memcpy/160/4/16/iterations:1\n"
+      "BM_string_memcpy/160/4/32/iterations:1\n"
+      "BM_string_memcpy/160/8/1/iterations:1\n"
+      "BM_string_memcpy/160/8/2/iterations:1\n"
+      "BM_string_memcpy/160/8/4/iterations:1\n"
+      "BM_string_memcpy/160/8/8/iterations:1\n"
+      "BM_string_memcpy/160/8/16/iterations:1\n"
+      "BM_string_memcpy/160/8/32/iterations:1\n"
+      "BM_string_memcpy/160/16/1/iterations:1\n"
+      "BM_string_memcpy/160/16/2/iterations:1\n"
+      "BM_string_memcpy/160/16/4/iterations:1\n"
+      "BM_string_memcpy/160/16/8/iterations:1\n"
+      "BM_string_memcpy/160/16/16/iterations:1\n"
+      "BM_string_memcpy/160/16/32/iterations:1\n"
+      "BM_string_memcpy/160/32/1/iterations:1\n"
+      "BM_string_memcpy/160/32/2/iterations:1\n"
+      "BM_string_memcpy/160/32/4/iterations:1\n"
+      "BM_string_memcpy/160/32/8/iterations:1\n"
+      "BM_string_memcpy/160/32/16/iterations:1\n"
+      "BM_string_memcpy/160/32/32/iterations:1\n"
+      "BM_string_memcpy/176/0/0/iterations:1\n"
+      "BM_string_memcpy/176/1/1/iterations:1\n"
+      "BM_string_memcpy/176/1/2/iterations:1\n"
+      "BM_string_memcpy/176/1/4/iterations:1\n"
+      "BM_string_memcpy/176/1/8/iterations:1\n"
+      "BM_string_memcpy/176/1/16/iterations:1\n"
+      "BM_string_memcpy/176/1/32/iterations:1\n"
+      "BM_string_memcpy/176/2/1/iterations:1\n"
+      "BM_string_memcpy/176/2/2/iterations:1\n"
+      "BM_string_memcpy/176/2/4/iterations:1\n"
+      "BM_string_memcpy/176/2/8/iterations:1\n"
+      "BM_string_memcpy/176/2/16/iterations:1\n"
+      "BM_string_memcpy/176/2/32/iterations:1\n"
+      "BM_string_memcpy/176/4/1/iterations:1\n"
+      "BM_string_memcpy/176/4/2/iterations:1\n"
+      "BM_string_memcpy/176/4/4/iterations:1\n"
+      "BM_string_memcpy/176/4/8/iterations:1\n"
+      "BM_string_memcpy/176/4/16/iterations:1\n"
+      "BM_string_memcpy/176/4/32/iterations:1\n"
+      "BM_string_memcpy/176/8/1/iterations:1\n"
+      "BM_string_memcpy/176/8/2/iterations:1\n"
+      "BM_string_memcpy/176/8/4/iterations:1\n"
+      "BM_string_memcpy/176/8/8/iterations:1\n"
+      "BM_string_memcpy/176/8/16/iterations:1\n"
+      "BM_string_memcpy/176/8/32/iterations:1\n"
+      "BM_string_memcpy/176/16/1/iterations:1\n"
+      "BM_string_memcpy/176/16/2/iterations:1\n"
+      "BM_string_memcpy/176/16/4/iterations:1\n"
+      "BM_string_memcpy/176/16/8/iterations:1\n"
+      "BM_string_memcpy/176/16/16/iterations:1\n"
+      "BM_string_memcpy/176/16/32/iterations:1\n"
+      "BM_string_memcpy/176/32/1/iterations:1\n"
+      "BM_string_memcpy/176/32/2/iterations:1\n"
+      "BM_string_memcpy/176/32/4/iterations:1\n"
+      "BM_string_memcpy/176/32/8/iterations:1\n"
+      "BM_string_memcpy/176/32/16/iterations:1\n"
+      "BM_string_memcpy/176/32/32/iterations:1\n"
+      "BM_string_memcpy/192/0/0/iterations:1\n"
+      "BM_string_memcpy/192/1/1/iterations:1\n"
+      "BM_string_memcpy/192/1/2/iterations:1\n"
+      "BM_string_memcpy/192/1/4/iterations:1\n"
+      "BM_string_memcpy/192/1/8/iterations:1\n"
+      "BM_string_memcpy/192/1/16/iterations:1\n"
+      "BM_string_memcpy/192/1/32/iterations:1\n"
+      "BM_string_memcpy/192/2/1/iterations:1\n"
+      "BM_string_memcpy/192/2/2/iterations:1\n"
+      "BM_string_memcpy/192/2/4/iterations:1\n"
+      "BM_string_memcpy/192/2/8/iterations:1\n"
+      "BM_string_memcpy/192/2/16/iterations:1\n"
+      "BM_string_memcpy/192/2/32/iterations:1\n"
+      "BM_string_memcpy/192/4/1/iterations:1\n"
+      "BM_string_memcpy/192/4/2/iterations:1\n"
+      "BM_string_memcpy/192/4/4/iterations:1\n"
+      "BM_string_memcpy/192/4/8/iterations:1\n"
+      "BM_string_memcpy/192/4/16/iterations:1\n"
+      "BM_string_memcpy/192/4/32/iterations:1\n"
+      "BM_string_memcpy/192/8/1/iterations:1\n"
+      "BM_string_memcpy/192/8/2/iterations:1\n"
+      "BM_string_memcpy/192/8/4/iterations:1\n"
+      "BM_string_memcpy/192/8/8/iterations:1\n"
+      "BM_string_memcpy/192/8/16/iterations:1\n"
+      "BM_string_memcpy/192/8/32/iterations:1\n"
+      "BM_string_memcpy/192/16/1/iterations:1\n"
+      "BM_string_memcpy/192/16/2/iterations:1\n"
+      "BM_string_memcpy/192/16/4/iterations:1\n"
+      "BM_string_memcpy/192/16/8/iterations:1\n"
+      "BM_string_memcpy/192/16/16/iterations:1\n"
+      "BM_string_memcpy/192/16/32/iterations:1\n"
+      "BM_string_memcpy/192/32/1/iterations:1\n"
+      "BM_string_memcpy/192/32/2/iterations:1\n"
+      "BM_string_memcpy/192/32/4/iterations:1\n"
+      "BM_string_memcpy/192/32/8/iterations:1\n"
+      "BM_string_memcpy/192/32/16/iterations:1\n"
+      "BM_string_memcpy/192/32/32/iterations:1\n"
+      "BM_string_memcpy/208/0/0/iterations:1\n"
+      "BM_string_memcpy/208/1/1/iterations:1\n"
+      "BM_string_memcpy/208/1/2/iterations:1\n"
+      "BM_string_memcpy/208/1/4/iterations:1\n"
+      "BM_string_memcpy/208/1/8/iterations:1\n"
+      "BM_string_memcpy/208/1/16/iterations:1\n"
+      "BM_string_memcpy/208/1/32/iterations:1\n"
+      "BM_string_memcpy/208/2/1/iterations:1\n"
+      "BM_string_memcpy/208/2/2/iterations:1\n"
+      "BM_string_memcpy/208/2/4/iterations:1\n"
+      "BM_string_memcpy/208/2/8/iterations:1\n"
+      "BM_string_memcpy/208/2/16/iterations:1\n"
+      "BM_string_memcpy/208/2/32/iterations:1\n"
+      "BM_string_memcpy/208/4/1/iterations:1\n"
+      "BM_string_memcpy/208/4/2/iterations:1\n"
+      "BM_string_memcpy/208/4/4/iterations:1\n"
+      "BM_string_memcpy/208/4/8/iterations:1\n"
+      "BM_string_memcpy/208/4/16/iterations:1\n"
+      "BM_string_memcpy/208/4/32/iterations:1\n"
+      "BM_string_memcpy/208/8/1/iterations:1\n"
+      "BM_string_memcpy/208/8/2/iterations:1\n"
+      "BM_string_memcpy/208/8/4/iterations:1\n"
+      "BM_string_memcpy/208/8/8/iterations:1\n"
+      "BM_string_memcpy/208/8/16/iterations:1\n"
+      "BM_string_memcpy/208/8/32/iterations:1\n"
+      "BM_string_memcpy/208/16/1/iterations:1\n"
+      "BM_string_memcpy/208/16/2/iterations:1\n"
+      "BM_string_memcpy/208/16/4/iterations:1\n"
+      "BM_string_memcpy/208/16/8/iterations:1\n"
+      "BM_string_memcpy/208/16/16/iterations:1\n"
+      "BM_string_memcpy/208/16/32/iterations:1\n"
+      "BM_string_memcpy/208/32/1/iterations:1\n"
+      "BM_string_memcpy/208/32/2/iterations:1\n"
+      "BM_string_memcpy/208/32/4/iterations:1\n"
+      "BM_string_memcpy/208/32/8/iterations:1\n"
+      "BM_string_memcpy/208/32/16/iterations:1\n"
+      "BM_string_memcpy/208/32/32/iterations:1\n"
+      "BM_string_memcpy/224/0/0/iterations:1\n"
+      "BM_string_memcpy/224/1/1/iterations:1\n"
+      "BM_string_memcpy/224/1/2/iterations:1\n"
+      "BM_string_memcpy/224/1/4/iterations:1\n"
+      "BM_string_memcpy/224/1/8/iterations:1\n"
+      "BM_string_memcpy/224/1/16/iterations:1\n"
+      "BM_string_memcpy/224/1/32/iterations:1\n"
+      "BM_string_memcpy/224/2/1/iterations:1\n"
+      "BM_string_memcpy/224/2/2/iterations:1\n"
+      "BM_string_memcpy/224/2/4/iterations:1\n"
+      "BM_string_memcpy/224/2/8/iterations:1\n"
+      "BM_string_memcpy/224/2/16/iterations:1\n"
+      "BM_string_memcpy/224/2/32/iterations:1\n"
+      "BM_string_memcpy/224/4/1/iterations:1\n"
+      "BM_string_memcpy/224/4/2/iterations:1\n"
+      "BM_string_memcpy/224/4/4/iterations:1\n"
+      "BM_string_memcpy/224/4/8/iterations:1\n"
+      "BM_string_memcpy/224/4/16/iterations:1\n"
+      "BM_string_memcpy/224/4/32/iterations:1\n"
+      "BM_string_memcpy/224/8/1/iterations:1\n"
+      "BM_string_memcpy/224/8/2/iterations:1\n"
+      "BM_string_memcpy/224/8/4/iterations:1\n"
+      "BM_string_memcpy/224/8/8/iterations:1\n"
+      "BM_string_memcpy/224/8/16/iterations:1\n"
+      "BM_string_memcpy/224/8/32/iterations:1\n"
+      "BM_string_memcpy/224/16/1/iterations:1\n"
+      "BM_string_memcpy/224/16/2/iterations:1\n"
+      "BM_string_memcpy/224/16/4/iterations:1\n"
+      "BM_string_memcpy/224/16/8/iterations:1\n"
+      "BM_string_memcpy/224/16/16/iterations:1\n"
+      "BM_string_memcpy/224/16/32/iterations:1\n"
+      "BM_string_memcpy/224/32/1/iterations:1\n"
+      "BM_string_memcpy/224/32/2/iterations:1\n"
+      "BM_string_memcpy/224/32/4/iterations:1\n"
+      "BM_string_memcpy/224/32/8/iterations:1\n"
+      "BM_string_memcpy/224/32/16/iterations:1\n"
+      "BM_string_memcpy/224/32/32/iterations:1\n"
+      "BM_string_memcpy/240/0/0/iterations:1\n"
+      "BM_string_memcpy/240/1/1/iterations:1\n"
+      "BM_string_memcpy/240/1/2/iterations:1\n"
+      "BM_string_memcpy/240/1/4/iterations:1\n"
+      "BM_string_memcpy/240/1/8/iterations:1\n"
+      "BM_string_memcpy/240/1/16/iterations:1\n"
+      "BM_string_memcpy/240/1/32/iterations:1\n"
+      "BM_string_memcpy/240/2/1/iterations:1\n"
+      "BM_string_memcpy/240/2/2/iterations:1\n"
+      "BM_string_memcpy/240/2/4/iterations:1\n"
+      "BM_string_memcpy/240/2/8/iterations:1\n"
+      "BM_string_memcpy/240/2/16/iterations:1\n"
+      "BM_string_memcpy/240/2/32/iterations:1\n"
+      "BM_string_memcpy/240/4/1/iterations:1\n"
+      "BM_string_memcpy/240/4/2/iterations:1\n"
+      "BM_string_memcpy/240/4/4/iterations:1\n"
+      "BM_string_memcpy/240/4/8/iterations:1\n"
+      "BM_string_memcpy/240/4/16/iterations:1\n"
+      "BM_string_memcpy/240/4/32/iterations:1\n"
+      "BM_string_memcpy/240/8/1/iterations:1\n"
+      "BM_string_memcpy/240/8/2/iterations:1\n"
+      "BM_string_memcpy/240/8/4/iterations:1\n"
+      "BM_string_memcpy/240/8/8/iterations:1\n"
+      "BM_string_memcpy/240/8/16/iterations:1\n"
+      "BM_string_memcpy/240/8/32/iterations:1\n"
+      "BM_string_memcpy/240/16/1/iterations:1\n"
+      "BM_string_memcpy/240/16/2/iterations:1\n"
+      "BM_string_memcpy/240/16/4/iterations:1\n"
+      "BM_string_memcpy/240/16/8/iterations:1\n"
+      "BM_string_memcpy/240/16/16/iterations:1\n"
+      "BM_string_memcpy/240/16/32/iterations:1\n"
+      "BM_string_memcpy/240/32/1/iterations:1\n"
+      "BM_string_memcpy/240/32/2/iterations:1\n"
+      "BM_string_memcpy/240/32/4/iterations:1\n"
+      "BM_string_memcpy/240/32/8/iterations:1\n"
+      "BM_string_memcpy/240/32/16/iterations:1\n"
+      "BM_string_memcpy/240/32/32/iterations:1\n"
+      "BM_string_memcpy/256/0/0/iterations:1\n"
+      "BM_string_memcpy/256/1/1/iterations:1\n"
+      "BM_string_memcpy/256/1/2/iterations:1\n"
+      "BM_string_memcpy/256/1/4/iterations:1\n"
+      "BM_string_memcpy/256/1/8/iterations:1\n"
+      "BM_string_memcpy/256/1/16/iterations:1\n"
+      "BM_string_memcpy/256/1/32/iterations:1\n"
+      "BM_string_memcpy/256/2/1/iterations:1\n"
+      "BM_string_memcpy/256/2/2/iterations:1\n"
+      "BM_string_memcpy/256/2/4/iterations:1\n"
+      "BM_string_memcpy/256/2/8/iterations:1\n"
+      "BM_string_memcpy/256/2/16/iterations:1\n"
+      "BM_string_memcpy/256/2/32/iterations:1\n"
+      "BM_string_memcpy/256/4/1/iterations:1\n"
+      "BM_string_memcpy/256/4/2/iterations:1\n"
+      "BM_string_memcpy/256/4/4/iterations:1\n"
+      "BM_string_memcpy/256/4/8/iterations:1\n"
+      "BM_string_memcpy/256/4/16/iterations:1\n"
+      "BM_string_memcpy/256/4/32/iterations:1\n"
+      "BM_string_memcpy/256/8/1/iterations:1\n"
+      "BM_string_memcpy/256/8/2/iterations:1\n"
+      "BM_string_memcpy/256/8/4/iterations:1\n"
+      "BM_string_memcpy/256/8/8/iterations:1\n"
+      "BM_string_memcpy/256/8/16/iterations:1\n"
+      "BM_string_memcpy/256/8/32/iterations:1\n"
+      "BM_string_memcpy/256/16/1/iterations:1\n"
+      "BM_string_memcpy/256/16/2/iterations:1\n"
+      "BM_string_memcpy/256/16/4/iterations:1\n"
+      "BM_string_memcpy/256/16/8/iterations:1\n"
+      "BM_string_memcpy/256/16/16/iterations:1\n"
+      "BM_string_memcpy/256/16/32/iterations:1\n"
+      "BM_string_memcpy/256/32/1/iterations:1\n"
+      "BM_string_memcpy/256/32/2/iterations:1\n"
+      "BM_string_memcpy/256/32/4/iterations:1\n"
+      "BM_string_memcpy/256/32/8/iterations:1\n"
+      "BM_string_memcpy/256/32/16/iterations:1\n"
+      "BM_string_memcpy/256/32/32/iterations:1\n"
+      "BM_string_memcpy/512/0/0/iterations:1\n"
+      "BM_string_memcpy/512/1/1/iterations:1\n"
+      "BM_string_memcpy/512/1/2/iterations:1\n"
+      "BM_string_memcpy/512/1/4/iterations:1\n"
+      "BM_string_memcpy/512/1/8/iterations:1\n"
+      "BM_string_memcpy/512/1/16/iterations:1\n"
+      "BM_string_memcpy/512/1/32/iterations:1\n"
+      "BM_string_memcpy/512/2/1/iterations:1\n"
+      "BM_string_memcpy/512/2/2/iterations:1\n"
+      "BM_string_memcpy/512/2/4/iterations:1\n"
+      "BM_string_memcpy/512/2/8/iterations:1\n"
+      "BM_string_memcpy/512/2/16/iterations:1\n"
+      "BM_string_memcpy/512/2/32/iterations:1\n"
+      "BM_string_memcpy/512/4/1/iterations:1\n"
+      "BM_string_memcpy/512/4/2/iterations:1\n"
+      "BM_string_memcpy/512/4/4/iterations:1\n"
+      "BM_string_memcpy/512/4/8/iterations:1\n"
+      "BM_string_memcpy/512/4/16/iterations:1\n"
+      "BM_string_memcpy/512/4/32/iterations:1\n"
+      "BM_string_memcpy/512/8/1/iterations:1\n"
+      "BM_string_memcpy/512/8/2/iterations:1\n"
+      "BM_string_memcpy/512/8/4/iterations:1\n"
+      "BM_string_memcpy/512/8/8/iterations:1\n"
+      "BM_string_memcpy/512/8/16/iterations:1\n"
+      "BM_string_memcpy/512/8/32/iterations:1\n"
+      "BM_string_memcpy/512/16/1/iterations:1\n"
+      "BM_string_memcpy/512/16/2/iterations:1\n"
+      "BM_string_memcpy/512/16/4/iterations:1\n"
+      "BM_string_memcpy/512/16/8/iterations:1\n"
+      "BM_string_memcpy/512/16/16/iterations:1\n"
+      "BM_string_memcpy/512/16/32/iterations:1\n"
+      "BM_string_memcpy/512/32/1/iterations:1\n"
+      "BM_string_memcpy/512/32/2/iterations:1\n"
+      "BM_string_memcpy/512/32/4/iterations:1\n"
+      "BM_string_memcpy/512/32/8/iterations:1\n"
+      "BM_string_memcpy/512/32/16/iterations:1\n"
+      "BM_string_memcpy/512/32/32/iterations:1\n"
+      "BM_string_memcpy/1024/0/0/iterations:1\n"
+      "BM_string_memcpy/1024/1/1/iterations:1\n"
+      "BM_string_memcpy/1024/1/2/iterations:1\n"
+      "BM_string_memcpy/1024/1/4/iterations:1\n"
+      "BM_string_memcpy/1024/1/8/iterations:1\n"
+      "BM_string_memcpy/1024/1/16/iterations:1\n"
+      "BM_string_memcpy/1024/1/32/iterations:1\n"
+      "BM_string_memcpy/1024/2/1/iterations:1\n"
+      "BM_string_memcpy/1024/2/2/iterations:1\n"
+      "BM_string_memcpy/1024/2/4/iterations:1\n"
+      "BM_string_memcpy/1024/2/8/iterations:1\n"
+      "BM_string_memcpy/1024/2/16/iterations:1\n"
+      "BM_string_memcpy/1024/2/32/iterations:1\n"
+      "BM_string_memcpy/1024/4/1/iterations:1\n"
+      "BM_string_memcpy/1024/4/2/iterations:1\n"
+      "BM_string_memcpy/1024/4/4/iterations:1\n"
+      "BM_string_memcpy/1024/4/8/iterations:1\n"
+      "BM_string_memcpy/1024/4/16/iterations:1\n"
+      "BM_string_memcpy/1024/4/32/iterations:1\n"
+      "BM_string_memcpy/1024/8/1/iterations:1\n"
+      "BM_string_memcpy/1024/8/2/iterations:1\n"
+      "BM_string_memcpy/1024/8/4/iterations:1\n"
+      "BM_string_memcpy/1024/8/8/iterations:1\n"
+      "BM_string_memcpy/1024/8/16/iterations:1\n"
+      "BM_string_memcpy/1024/8/32/iterations:1\n"
+      "BM_string_memcpy/1024/16/1/iterations:1\n"
+      "BM_string_memcpy/1024/16/2/iterations:1\n"
+      "BM_string_memcpy/1024/16/4/iterations:1\n"
+      "BM_string_memcpy/1024/16/8/iterations:1\n"
+      "BM_string_memcpy/1024/16/16/iterations:1\n"
+      "BM_string_memcpy/1024/16/32/iterations:1\n"
+      "BM_string_memcpy/1024/32/1/iterations:1\n"
+      "BM_string_memcpy/1024/32/2/iterations:1\n"
+      "BM_string_memcpy/1024/32/4/iterations:1\n"
+      "BM_string_memcpy/1024/32/8/iterations:1\n"
+      "BM_string_memcpy/1024/32/16/iterations:1\n"
+      "BM_string_memcpy/1024/32/32/iterations:1\n"
+      "BM_string_memcpy/8192/0/0/iterations:1\n"
+      "BM_string_memcpy/8192/1/1/iterations:1\n"
+      "BM_string_memcpy/8192/1/2/iterations:1\n"
+      "BM_string_memcpy/8192/1/4/iterations:1\n"
+      "BM_string_memcpy/8192/1/8/iterations:1\n"
+      "BM_string_memcpy/8192/1/16/iterations:1\n"
+      "BM_string_memcpy/8192/1/32/iterations:1\n"
+      "BM_string_memcpy/8192/2/1/iterations:1\n"
+      "BM_string_memcpy/8192/2/2/iterations:1\n"
+      "BM_string_memcpy/8192/2/4/iterations:1\n"
+      "BM_string_memcpy/8192/2/8/iterations:1\n"
+      "BM_string_memcpy/8192/2/16/iterations:1\n"
+      "BM_string_memcpy/8192/2/32/iterations:1\n"
+      "BM_string_memcpy/8192/4/1/iterations:1\n"
+      "BM_string_memcpy/8192/4/2/iterations:1\n"
+      "BM_string_memcpy/8192/4/4/iterations:1\n"
+      "BM_string_memcpy/8192/4/8/iterations:1\n"
+      "BM_string_memcpy/8192/4/16/iterations:1\n"
+      "BM_string_memcpy/8192/4/32/iterations:1\n"
+      "BM_string_memcpy/8192/8/1/iterations:1\n"
+      "BM_string_memcpy/8192/8/2/iterations:1\n"
+      "BM_string_memcpy/8192/8/4/iterations:1\n"
+      "BM_string_memcpy/8192/8/8/iterations:1\n"
+      "BM_string_memcpy/8192/8/16/iterations:1\n"
+      "BM_string_memcpy/8192/8/32/iterations:1\n"
+      "BM_string_memcpy/8192/16/1/iterations:1\n"
+      "BM_string_memcpy/8192/16/2/iterations:1\n"
+      "BM_string_memcpy/8192/16/4/iterations:1\n"
+      "BM_string_memcpy/8192/16/8/iterations:1\n"
+      "BM_string_memcpy/8192/16/16/iterations:1\n"
+      "BM_string_memcpy/8192/16/32/iterations:1\n"
+      "BM_string_memcpy/8192/32/1/iterations:1\n"
+      "BM_string_memcpy/8192/32/2/iterations:1\n"
+      "BM_string_memcpy/8192/32/4/iterations:1\n"
+      "BM_string_memcpy/8192/32/8/iterations:1\n"
+      "BM_string_memcpy/8192/32/16/iterations:1\n"
+      "BM_string_memcpy/8192/32/32/iterations:1\n"
+      "BM_string_memcpy/16384/0/0/iterations:1\n"
+      "BM_string_memcpy/16384/1/1/iterations:1\n"
+      "BM_string_memcpy/16384/1/2/iterations:1\n"
+      "BM_string_memcpy/16384/1/4/iterations:1\n"
+      "BM_string_memcpy/16384/1/8/iterations:1\n"
+      "BM_string_memcpy/16384/1/16/iterations:1\n"
+      "BM_string_memcpy/16384/1/32/iterations:1\n"
+      "BM_string_memcpy/16384/2/1/iterations:1\n"
+      "BM_string_memcpy/16384/2/2/iterations:1\n"
+      "BM_string_memcpy/16384/2/4/iterations:1\n"
+      "BM_string_memcpy/16384/2/8/iterations:1\n"
+      "BM_string_memcpy/16384/2/16/iterations:1\n"
+      "BM_string_memcpy/16384/2/32/iterations:1\n"
+      "BM_string_memcpy/16384/4/1/iterations:1\n"
+      "BM_string_memcpy/16384/4/2/iterations:1\n"
+      "BM_string_memcpy/16384/4/4/iterations:1\n"
+      "BM_string_memcpy/16384/4/8/iterations:1\n"
+      "BM_string_memcpy/16384/4/16/iterations:1\n"
+      "BM_string_memcpy/16384/4/32/iterations:1\n"
+      "BM_string_memcpy/16384/8/1/iterations:1\n"
+      "BM_string_memcpy/16384/8/2/iterations:1\n"
+      "BM_string_memcpy/16384/8/4/iterations:1\n"
+      "BM_string_memcpy/16384/8/8/iterations:1\n"
+      "BM_string_memcpy/16384/8/16/iterations:1\n"
+      "BM_string_memcpy/16384/8/32/iterations:1\n"
+      "BM_string_memcpy/16384/16/1/iterations:1\n"
+      "BM_string_memcpy/16384/16/2/iterations:1\n"
+      "BM_string_memcpy/16384/16/4/iterations:1\n"
+      "BM_string_memcpy/16384/16/8/iterations:1\n"
+      "BM_string_memcpy/16384/16/16/iterations:1\n"
+      "BM_string_memcpy/16384/16/32/iterations:1\n"
+      "BM_string_memcpy/16384/32/1/iterations:1\n"
+      "BM_string_memcpy/16384/32/2/iterations:1\n"
+      "BM_string_memcpy/16384/32/4/iterations:1\n"
+      "BM_string_memcpy/16384/32/8/iterations:1\n"
+      "BM_string_memcpy/16384/32/16/iterations:1\n"
+      "BM_string_memcpy/16384/32/32/iterations:1\n"
+      "BM_string_memcpy/32768/0/0/iterations:1\n"
+      "BM_string_memcpy/32768/1/1/iterations:1\n"
+      "BM_string_memcpy/32768/1/2/iterations:1\n"
+      "BM_string_memcpy/32768/1/4/iterations:1\n"
+      "BM_string_memcpy/32768/1/8/iterations:1\n"
+      "BM_string_memcpy/32768/1/16/iterations:1\n"
+      "BM_string_memcpy/32768/1/32/iterations:1\n"
+      "BM_string_memcpy/32768/2/1/iterations:1\n"
+      "BM_string_memcpy/32768/2/2/iterations:1\n"
+      "BM_string_memcpy/32768/2/4/iterations:1\n"
+      "BM_string_memcpy/32768/2/8/iterations:1\n"
+      "BM_string_memcpy/32768/2/16/iterations:1\n"
+      "BM_string_memcpy/32768/2/32/iterations:1\n"
+      "BM_string_memcpy/32768/4/1/iterations:1\n"
+      "BM_string_memcpy/32768/4/2/iterations:1\n"
+      "BM_string_memcpy/32768/4/4/iterations:1\n"
+      "BM_string_memcpy/32768/4/8/iterations:1\n"
+      "BM_string_memcpy/32768/4/16/iterations:1\n"
+      "BM_string_memcpy/32768/4/32/iterations:1\n"
+      "BM_string_memcpy/32768/8/1/iterations:1\n"
+      "BM_string_memcpy/32768/8/2/iterations:1\n"
+      "BM_string_memcpy/32768/8/4/iterations:1\n"
+      "BM_string_memcpy/32768/8/8/iterations:1\n"
+      "BM_string_memcpy/32768/8/16/iterations:1\n"
+      "BM_string_memcpy/32768/8/32/iterations:1\n"
+      "BM_string_memcpy/32768/16/1/iterations:1\n"
+      "BM_string_memcpy/32768/16/2/iterations:1\n"
+      "BM_string_memcpy/32768/16/4/iterations:1\n"
+      "BM_string_memcpy/32768/16/8/iterations:1\n"
+      "BM_string_memcpy/32768/16/16/iterations:1\n"
+      "BM_string_memcpy/32768/16/32/iterations:1\n"
+      "BM_string_memcpy/32768/32/1/iterations:1\n"
+      "BM_string_memcpy/32768/32/2/iterations:1\n"
+      "BM_string_memcpy/32768/32/4/iterations:1\n"
+      "BM_string_memcpy/32768/32/8/iterations:1\n"
+      "BM_string_memcpy/32768/32/16/iterations:1\n"
+      "BM_string_memcpy/32768/32/32/iterations:1\n"
+      "BM_string_memcpy/65536/0/0/iterations:1\n"
+      "BM_string_memcpy/65536/1/1/iterations:1\n"
+      "BM_string_memcpy/65536/1/2/iterations:1\n"
+      "BM_string_memcpy/65536/1/4/iterations:1\n"
+      "BM_string_memcpy/65536/1/8/iterations:1\n"
+      "BM_string_memcpy/65536/1/16/iterations:1\n"
+      "BM_string_memcpy/65536/1/32/iterations:1\n"
+      "BM_string_memcpy/65536/2/1/iterations:1\n"
+      "BM_string_memcpy/65536/2/2/iterations:1\n"
+      "BM_string_memcpy/65536/2/4/iterations:1\n"
+      "BM_string_memcpy/65536/2/8/iterations:1\n"
+      "BM_string_memcpy/65536/2/16/iterations:1\n"
+      "BM_string_memcpy/65536/2/32/iterations:1\n"
+      "BM_string_memcpy/65536/4/1/iterations:1\n"
+      "BM_string_memcpy/65536/4/2/iterations:1\n"
+      "BM_string_memcpy/65536/4/4/iterations:1\n"
+      "BM_string_memcpy/65536/4/8/iterations:1\n"
+      "BM_string_memcpy/65536/4/16/iterations:1\n"
+      "BM_string_memcpy/65536/4/32/iterations:1\n"
+      "BM_string_memcpy/65536/8/1/iterations:1\n"
+      "BM_string_memcpy/65536/8/2/iterations:1\n"
+      "BM_string_memcpy/65536/8/4/iterations:1\n"
+      "BM_string_memcpy/65536/8/8/iterations:1\n"
+      "BM_string_memcpy/65536/8/16/iterations:1\n"
+      "BM_string_memcpy/65536/8/32/iterations:1\n"
+      "BM_string_memcpy/65536/16/1/iterations:1\n"
+      "BM_string_memcpy/65536/16/2/iterations:1\n"
+      "BM_string_memcpy/65536/16/4/iterations:1\n"
+      "BM_string_memcpy/65536/16/8/iterations:1\n"
+      "BM_string_memcpy/65536/16/16/iterations:1\n"
+      "BM_string_memcpy/65536/16/32/iterations:1\n"
+      "BM_string_memcpy/65536/32/1/iterations:1\n"
+      "BM_string_memcpy/65536/32/2/iterations:1\n"
+      "BM_string_memcpy/65536/32/4/iterations:1\n"
+      "BM_string_memcpy/65536/32/8/iterations:1\n"
+      "BM_string_memcpy/65536/32/16/iterations:1\n"
+      "BM_string_memcpy/65536/32/32/iterations:1\n"
+      "BM_string_memcpy/131072/0/0/iterations:1\n"
+      "BM_string_memcpy/131072/1/1/iterations:1\n"
+      "BM_string_memcpy/131072/1/2/iterations:1\n"
+      "BM_string_memcpy/131072/1/4/iterations:1\n"
+      "BM_string_memcpy/131072/1/8/iterations:1\n"
+      "BM_string_memcpy/131072/1/16/iterations:1\n"
+      "BM_string_memcpy/131072/1/32/iterations:1\n"
+      "BM_string_memcpy/131072/2/1/iterations:1\n"
+      "BM_string_memcpy/131072/2/2/iterations:1\n"
+      "BM_string_memcpy/131072/2/4/iterations:1\n"
+      "BM_string_memcpy/131072/2/8/iterations:1\n"
+      "BM_string_memcpy/131072/2/16/iterations:1\n"
+      "BM_string_memcpy/131072/2/32/iterations:1\n"
+      "BM_string_memcpy/131072/4/1/iterations:1\n"
+      "BM_string_memcpy/131072/4/2/iterations:1\n"
+      "BM_string_memcpy/131072/4/4/iterations:1\n"
+      "BM_string_memcpy/131072/4/8/iterations:1\n"
+      "BM_string_memcpy/131072/4/16/iterations:1\n"
+      "BM_string_memcpy/131072/4/32/iterations:1\n"
+      "BM_string_memcpy/131072/8/1/iterations:1\n"
+      "BM_string_memcpy/131072/8/2/iterations:1\n"
+      "BM_string_memcpy/131072/8/4/iterations:1\n"
+      "BM_string_memcpy/131072/8/8/iterations:1\n"
+      "BM_string_memcpy/131072/8/16/iterations:1\n"
+      "BM_string_memcpy/131072/8/32/iterations:1\n"
+      "BM_string_memcpy/131072/16/1/iterations:1\n"
+      "BM_string_memcpy/131072/16/2/iterations:1\n"
+      "BM_string_memcpy/131072/16/4/iterations:1\n"
+      "BM_string_memcpy/131072/16/8/iterations:1\n"
+      "BM_string_memcpy/131072/16/16/iterations:1\n"
+      "BM_string_memcpy/131072/16/32/iterations:1\n"
+      "BM_string_memcpy/131072/32/1/iterations:1\n"
+      "BM_string_memcpy/131072/32/2/iterations:1\n"
+      "BM_string_memcpy/131072/32/4/iterations:1\n"
+      "BM_string_memcpy/131072/32/8/iterations:1\n"
+      "BM_string_memcpy/131072/32/16/iterations:1\n"
+      "BM_string_memcpy/131072/32/32/iterations:1\n"
+      "BM_string_memcpy/262144/0/0/iterations:1\n"
+      "BM_string_memcpy/262144/1/1/iterations:1\n"
+      "BM_string_memcpy/262144/1/2/iterations:1\n"
+      "BM_string_memcpy/262144/1/4/iterations:1\n"
+      "BM_string_memcpy/262144/1/8/iterations:1\n"
+      "BM_string_memcpy/262144/1/16/iterations:1\n"
+      "BM_string_memcpy/262144/1/32/iterations:1\n"
+      "BM_string_memcpy/262144/2/1/iterations:1\n"
+      "BM_string_memcpy/262144/2/2/iterations:1\n"
+      "BM_string_memcpy/262144/2/4/iterations:1\n"
+      "BM_string_memcpy/262144/2/8/iterations:1\n"
+      "BM_string_memcpy/262144/2/16/iterations:1\n"
+      "BM_string_memcpy/262144/2/32/iterations:1\n"
+      "BM_string_memcpy/262144/4/1/iterations:1\n"
+      "BM_string_memcpy/262144/4/2/iterations:1\n"
+      "BM_string_memcpy/262144/4/4/iterations:1\n"
+      "BM_string_memcpy/262144/4/8/iterations:1\n"
+      "BM_string_memcpy/262144/4/16/iterations:1\n"
+      "BM_string_memcpy/262144/4/32/iterations:1\n"
+      "BM_string_memcpy/262144/8/1/iterations:1\n"
+      "BM_string_memcpy/262144/8/2/iterations:1\n"
+      "BM_string_memcpy/262144/8/4/iterations:1\n"
+      "BM_string_memcpy/262144/8/8/iterations:1\n"
+      "BM_string_memcpy/262144/8/16/iterations:1\n"
+      "BM_string_memcpy/262144/8/32/iterations:1\n"
+      "BM_string_memcpy/262144/16/1/iterations:1\n"
+      "BM_string_memcpy/262144/16/2/iterations:1\n"
+      "BM_string_memcpy/262144/16/4/iterations:1\n"
+      "BM_string_memcpy/262144/16/8/iterations:1\n"
+      "BM_string_memcpy/262144/16/16/iterations:1\n"
+      "BM_string_memcpy/262144/16/32/iterations:1\n"
+      "BM_string_memcpy/262144/32/1/iterations:1\n"
+      "BM_string_memcpy/262144/32/2/iterations:1\n"
+      "BM_string_memcpy/262144/32/4/iterations:1\n"
+      "BM_string_memcpy/262144/32/8/iterations:1\n"
+      "BM_string_memcpy/262144/32/16/iterations:1\n"
+      "BM_string_memcpy/262144/32/32/iterations:1\n"
+      "BM_string_memcpy/524288/0/0/iterations:1\n"
+      "BM_string_memcpy/524288/1/1/iterations:1\n"
+      "BM_string_memcpy/524288/1/2/iterations:1\n"
+      "BM_string_memcpy/524288/1/4/iterations:1\n"
+      "BM_string_memcpy/524288/1/8/iterations:1\n"
+      "BM_string_memcpy/524288/1/16/iterations:1\n"
+      "BM_string_memcpy/524288/1/32/iterations:1\n"
+      "BM_string_memcpy/524288/2/1/iterations:1\n"
+      "BM_string_memcpy/524288/2/2/iterations:1\n"
+      "BM_string_memcpy/524288/2/4/iterations:1\n"
+      "BM_string_memcpy/524288/2/8/iterations:1\n"
+      "BM_string_memcpy/524288/2/16/iterations:1\n"
+      "BM_string_memcpy/524288/2/32/iterations:1\n"
+      "BM_string_memcpy/524288/4/1/iterations:1\n"
+      "BM_string_memcpy/524288/4/2/iterations:1\n"
+      "BM_string_memcpy/524288/4/4/iterations:1\n"
+      "BM_string_memcpy/524288/4/8/iterations:1\n"
+      "BM_string_memcpy/524288/4/16/iterations:1\n"
+      "BM_string_memcpy/524288/4/32/iterations:1\n"
+      "BM_string_memcpy/524288/8/1/iterations:1\n"
+      "BM_string_memcpy/524288/8/2/iterations:1\n"
+      "BM_string_memcpy/524288/8/4/iterations:1\n"
+      "BM_string_memcpy/524288/8/8/iterations:1\n"
+      "BM_string_memcpy/524288/8/16/iterations:1\n"
+      "BM_string_memcpy/524288/8/32/iterations:1\n"
+      "BM_string_memcpy/524288/16/1/iterations:1\n"
+      "BM_string_memcpy/524288/16/2/iterations:1\n"
+      "BM_string_memcpy/524288/16/4/iterations:1\n"
+      "BM_string_memcpy/524288/16/8/iterations:1\n"
+      "BM_string_memcpy/524288/16/16/iterations:1\n"
+      "BM_string_memcpy/524288/16/32/iterations:1\n"
+      "BM_string_memcpy/524288/32/1/iterations:1\n"
+      "BM_string_memcpy/524288/32/2/iterations:1\n"
+      "BM_string_memcpy/524288/32/4/iterations:1\n"
+      "BM_string_memcpy/524288/32/8/iterations:1\n"
+      "BM_string_memcpy/524288/32/16/iterations:1\n"
+      "BM_string_memcpy/524288/32/32/iterations:1\n"
+      "BM_string_memcpy/1048576/0/0/iterations:1\n"
+      "BM_string_memcpy/1048576/1/1/iterations:1\n"
+      "BM_string_memcpy/1048576/1/2/iterations:1\n"
+      "BM_string_memcpy/1048576/1/4/iterations:1\n"
+      "BM_string_memcpy/1048576/1/8/iterations:1\n"
+      "BM_string_memcpy/1048576/1/16/iterations:1\n"
+      "BM_string_memcpy/1048576/1/32/iterations:1\n"
+      "BM_string_memcpy/1048576/2/1/iterations:1\n"
+      "BM_string_memcpy/1048576/2/2/iterations:1\n"
+      "BM_string_memcpy/1048576/2/4/iterations:1\n"
+      "BM_string_memcpy/1048576/2/8/iterations:1\n"
+      "BM_string_memcpy/1048576/2/16/iterations:1\n"
+      "BM_string_memcpy/1048576/2/32/iterations:1\n"
+      "BM_string_memcpy/1048576/4/1/iterations:1\n"
+      "BM_string_memcpy/1048576/4/2/iterations:1\n"
+      "BM_string_memcpy/1048576/4/4/iterations:1\n"
+      "BM_string_memcpy/1048576/4/8/iterations:1\n"
+      "BM_string_memcpy/1048576/4/16/iterations:1\n"
+      "BM_string_memcpy/1048576/4/32/iterations:1\n"
+      "BM_string_memcpy/1048576/8/1/iterations:1\n"
+      "BM_string_memcpy/1048576/8/2/iterations:1\n"
+      "BM_string_memcpy/1048576/8/4/iterations:1\n"
+      "BM_string_memcpy/1048576/8/8/iterations:1\n"
+      "BM_string_memcpy/1048576/8/16/iterations:1\n"
+      "BM_string_memcpy/1048576/8/32/iterations:1\n"
+      "BM_string_memcpy/1048576/16/1/iterations:1\n"
+      "BM_string_memcpy/1048576/16/2/iterations:1\n"
+      "BM_string_memcpy/1048576/16/4/iterations:1\n"
+      "BM_string_memcpy/1048576/16/8/iterations:1\n"
+      "BM_string_memcpy/1048576/16/16/iterations:1\n"
+      "BM_string_memcpy/1048576/16/32/iterations:1\n"
+      "BM_string_memcpy/1048576/32/1/iterations:1\n"
+      "BM_string_memcpy/1048576/32/2/iterations:1\n"
+      "BM_string_memcpy/1048576/32/4/iterations:1\n"
+      "BM_string_memcpy/1048576/32/8/iterations:1\n"
+      "BM_string_memcpy/1048576/32/16/iterations:1\n"
+      "BM_string_memcpy/1048576/32/32/iterations:1\n"
+      "BM_string_memcpy/2097152/0/0/iterations:1\n"
+      "BM_string_memcpy/2097152/1/1/iterations:1\n"
+      "BM_string_memcpy/2097152/1/2/iterations:1\n"
+      "BM_string_memcpy/2097152/1/4/iterations:1\n"
+      "BM_string_memcpy/2097152/1/8/iterations:1\n"
+      "BM_string_memcpy/2097152/1/16/iterations:1\n"
+      "BM_string_memcpy/2097152/1/32/iterations:1\n"
+      "BM_string_memcpy/2097152/2/1/iterations:1\n"
+      "BM_string_memcpy/2097152/2/2/iterations:1\n"
+      "BM_string_memcpy/2097152/2/4/iterations:1\n"
+      "BM_string_memcpy/2097152/2/8/iterations:1\n"
+      "BM_string_memcpy/2097152/2/16/iterations:1\n"
+      "BM_string_memcpy/2097152/2/32/iterations:1\n"
+      "BM_string_memcpy/2097152/4/1/iterations:1\n"
+      "BM_string_memcpy/2097152/4/2/iterations:1\n"
+      "BM_string_memcpy/2097152/4/4/iterations:1\n"
+      "BM_string_memcpy/2097152/4/8/iterations:1\n"
+      "BM_string_memcpy/2097152/4/16/iterations:1\n"
+      "BM_string_memcpy/2097152/4/32/iterations:1\n"
+      "BM_string_memcpy/2097152/8/1/iterations:1\n"
+      "BM_string_memcpy/2097152/8/2/iterations:1\n"
+      "BM_string_memcpy/2097152/8/4/iterations:1\n"
+      "BM_string_memcpy/2097152/8/8/iterations:1\n"
+      "BM_string_memcpy/2097152/8/16/iterations:1\n"
+      "BM_string_memcpy/2097152/8/32/iterations:1\n"
+      "BM_string_memcpy/2097152/16/1/iterations:1\n"
+      "BM_string_memcpy/2097152/16/2/iterations:1\n"
+      "BM_string_memcpy/2097152/16/4/iterations:1\n"
+      "BM_string_memcpy/2097152/16/8/iterations:1\n"
+      "BM_string_memcpy/2097152/16/16/iterations:1\n"
+      "BM_string_memcpy/2097152/16/32/iterations:1\n"
+      "BM_string_memcpy/2097152/32/1/iterations:1\n"
+      "BM_string_memcpy/2097152/32/2/iterations:1\n"
+      "BM_string_memcpy/2097152/32/4/iterations:1\n"
+      "BM_string_memcpy/2097152/32/8/iterations:1\n"
+      "BM_string_memcpy/2097152/32/16/iterations:1\n"
+      "BM_string_memcpy/2097152/32/32/iterations:1\n";
 
   Verify(expected, 0,
          std::vector<const char*>{GetBionicXmlArg("test_alignment_twobuf.xml").c_str()});
diff --git a/docs/defines.md b/docs/defines.md
index 4775cd2..65cc873 100644
--- a/docs/defines.md
+++ b/docs/defines.md
@@ -54,13 +54,19 @@
 work around issues with some of them, use these macros to detect the versinon of
 the NDK you're being built with. Usually only `__NDK_MAJOR__` will be necessary.
 
-## `__arm__`, `__aarch64__`, `__i386__`, `__x86_64__`
+## `__arm__`/`__aarch64__`, `__i386__`/`__x86_64__`, `__riscv`
 
-If your code is specific to a particular processor architecture, use these
-macros to conditionally compile. Note that the ABI usually called `arm64` uses
-the macro `__aarch64__` and the ABI usually called `x86` uses `__i386__`.
+If your code is specific to a particular processor architecture, use
+these macros to conditionally compile. Note that the ABI usually called
+`arm64` uses the macro `__aarch64__` and the ABI usually called `x86` uses
+`__i386__`. Android only supports riscv64, so `__riscv` is a sufficient
+check for Android-only code. If you need to write code portable to other
+operating systems that do support riscv32, you'll also need to check
+whether `__riscv_xlen` is 32 or 64.
 
-## `__LP32__` and `__LP64__`
+## `__ILP32__` and `__LP64__`
 
-If your code depends on "bitness" -- whether `long` and pointers are 32- or
-64-bit -- use these macros to conditionally compile.
+If your code depends on "bitness" -- whether `long` and pointers are 32-
+or 64-bit -- use these macros to conditionally compile. Note the extra
+"I" in the 32-bit macro (since `int`, `long`, and pointers are all 32-bit
+on such systems, with `long long` being needed for a 64-bit type).
diff --git a/docs/status.md b/docs/status.md
index c2ed944..fc68b80 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -55,6 +55,15 @@
 
 Current libc symbols: https://android.googlesource.com/platform/bionic/+/master/libc/libc.map.txt
 
+New libc functions in V (API level 35):
+  * `timespec_getres` (C23 addition).
+  * `localtime_rz`, `mktime_z`, `tzalloc`, and `tzfree` (NetBSD
+    extensions implemented in tzcode, and the "least non-standard"
+    functions for avoiding $TZ if you need to use multiple timezones in
+    multi-threaded C).
+  * `mbsrtowcs_l` and `wcsrtombs_l` aliases for `mbsrtowcs` and `wcsrtombs`.
+  * New system call wrapper: `__riscv_flush_icache` (`<sys/cachectl.h>`).
+
 New libc functions in U (API level 34):
   * `close_range` and `copy_file_range` (Linux-specific GNU extensions).
   * `memset_explicit` in <string.h> (C23 addition).
diff --git a/libc/Android.bp b/libc/Android.bp
index f5f5f7c..dc3c73f 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -252,10 +252,11 @@
     srcs: [
         "tzcode/**/*.c",
         "tzcode/bionic.cpp",
-        // tzcode doesn't include strptime or wcsftime, so we use the OpenBSD
-        // code (with some local changes in the strptime case).
+        // tzcode doesn't include strptime, so we use a fork of the
+        // OpenBSD code which needs this global data.
         "upstream-openbsd/lib/libc/locale/_def_time.c",
-        "upstream-openbsd/lib/libc/time/wcsftime.c",
+        // tzcode doesn't include wcsftime, so we use the FreeBSD code.
+        "upstream-freebsd/lib/libc/locale/wcsftime.c",
     ],
 
     cflags: [
@@ -268,7 +269,7 @@
         "-DTHREAD_SAFE=1",
         // The name of the tm_gmtoff field in our struct tm.
         "-DTM_GMTOFF=tm_gmtoff",
-        // TZDEFAULT is not applicable to Android as there is no one file per time zone mapping
+        // Android uses a system property instead of /etc/localtime, so make callers crash.
         "-DTZDEFAULT=NULL",
         // Where we store our tzdata.
         "-DTZDIR=\"/system/usr/share/zoneinfo\"",
@@ -284,7 +285,10 @@
         "-Dlint",
     ],
 
-    local_include_dirs: ["tzcode/"],
+    local_include_dirs: [
+        "tzcode/",
+        "upstream-freebsd/android/include",
+    ],
     name: "libc_tzcode",
 }
 
@@ -932,6 +936,21 @@
                 "arch-riscv64/bionic/setjmp.S",
                 "arch-riscv64/bionic/syscall.S",
                 "arch-riscv64/bionic/vfork.S",
+
+                "arch-riscv64/string/memchr_vext.S",
+                "arch-riscv64/string/memcmp_vext.S",
+                "arch-riscv64/string/memcpy_vext.S",
+                "arch-riscv64/string/memmove_vext.S",
+                "arch-riscv64/string/memset_vext.S",
+                "arch-riscv64/string/strcat_vext.S",
+                "arch-riscv64/string/strchr_vext.S",
+                "arch-riscv64/string/strcmp_vext.S",
+                "arch-riscv64/string/strcpy_vext.S",
+                "arch-riscv64/string/strlen_vext.S",
+                "arch-riscv64/string/strncat_vext.S",
+                "arch-riscv64/string/strncmp_vext.S",
+                "arch-riscv64/string/strncpy_vext.S",
+                "arch-riscv64/string/strnlen_vext.S",
             ],
         },
 
@@ -1205,8 +1224,8 @@
         "bionic/termios.cpp",
         "bionic/thread_private.cpp",
         "bionic/threads.cpp",
+        "bionic/time.cpp",
         "bionic/time_l.cpp",
-        "bionic/timespec_get.cpp",
         "bionic/tmpfile.cpp",
         "bionic/umount.cpp",
         "bionic/unlink.cpp",
@@ -1541,6 +1560,9 @@
         arm64: {
             srcs: ["arch-arm64/static_function_dispatch.S"],
         },
+        riscv64: {
+            srcs: ["arch-riscv64/static_function_dispatch.S"]
+        },
     },
 }
 
@@ -1569,6 +1591,9 @@
         arm64: {
             srcs: ["arch-arm64/dynamic_function_dispatch.cpp"],
         },
+        riscv64: {
+            srcs: ["arch-riscv64/dynamic_function_dispatch.cpp"]
+        },
     },
 }
 
diff --git a/libc/NOTICE b/libc/NOTICE
index 4d3a108..daea7bc 100644
--- a/libc/NOTICE
+++ b/libc/NOTICE
@@ -63,38 +63,6 @@
 
 -------------------------------------------------------------------
 
-Based on the UCB version with the ID appearing below.
-This is ANSIish only when "multibyte character == plain character".
-
-Copyright (c) 1989, 1993
-   The Regents of the University of California.  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.
-3. Neither the name of the University nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
-
--------------------------------------------------------------------
-
 Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
 All rights reserved.
 
@@ -3242,6 +3210,37 @@
 Copyright (c) 2002 Tim J. Robbins
 All rights reserved.
 
+Copyright (c) 2011 The FreeBSD Foundation
+
+Portions of this software were developed by David Chisnall
+under sponsorship from the FreeBSD Foundation.
+
+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.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Tim J. Robbins
+All rights reserved.
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
@@ -4540,6 +4539,34 @@
 
 -------------------------------------------------------------------
 
+Copyright (c) 2023 SiFive, Inc.
+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.
+3. The name of the company may not be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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.
+
+-------------------------------------------------------------------
+
 Copyright (c)1999 Citrus Project,
 All rights reserved.
 
diff --git a/libc/SECCOMP_ALLOWLIST_COMMON.TXT b/libc/SECCOMP_ALLOWLIST_COMMON.TXT
index efbf28b..4a8d501 100644
--- a/libc/SECCOMP_ALLOWLIST_COMMON.TXT
+++ b/libc/SECCOMP_ALLOWLIST_COMMON.TXT
@@ -53,6 +53,7 @@
 int execveat(int, const char*, char* const*, char* const*, int)  all
 # Since Linux 4.3, not in glibc. Probed for and conditionally used by ART.
 int membarrier(int, int) all
+int userfaultfd(int) all
 # Since Linux 5.1, not in glibc. Not used by bionic, and not likely ever
 # to be (because the last thing anyone needs is a new 32-bit ABI in the
 # 2020s!) but http://b/138781460 showed cuttlefish needed at least the
@@ -73,5 +74,5 @@
 int rt_sigtimedwait_time64(const sigset64_t*, siginfo_t*, const timespec64*, size_t) lp32
 int futex_time64(int*, int, int, const timespec64*, int*, int) lp32
 int sched_rr_get_interval_time64(pid_t, timespec64*) lp32
-# Since Linux 5.4, not in glibc. Probed for and conditionally used by ART.
-int userfaultfd(int) all
+# Since Linux 6.4, not in glibc (https://www.openwall.com/lists/libc-coord/2023/07/13/1).
+int riscv_hwprobe(riscv_hwprobe*, size_t, size_t, unsigned long*, unsigned) riscv64
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 08017f1..5f49c8c 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -356,7 +356,7 @@
 int     cacheflush:__ARM_NR_cacheflush(long start, long end, long flags)  arm
 
 # riscv64-specific
-int _flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64
+int __riscv_flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64
 
 # x86-specific
 int     __set_thread_area:set_thread_area(void*) x86
diff --git a/libc/arch-arm64/bionic/vfork.S b/libc/arch-arm64/bionic/vfork.S
index 9eb82d8..9b19232 100644
--- a/libc/arch-arm64/bionic/vfork.S
+++ b/libc/arch-arm64/bionic/vfork.S
@@ -28,6 +28,7 @@
 
 #include <platform/bionic/tls_defines.h>
 #include <private/bionic_asm.h>
+#include <private/bionic_asm_offsets.h>
 #include <asm/signal.h>
 #include <linux/sched.h>
 
@@ -42,10 +43,29 @@
     ldr     w10, [x9, #20]
     str     w0, [x9, #20]
 
-    // Clear vfork_child_stack_bottom_.
-    str     xzr, [x9, #776]
+    mov     x0, #SIGCHLD
 
-    mov     x0, #(CLONE_VM | CLONE_VFORK | SIGCHLD)
+    // If either HWASan or stack MTE is enabled, set up the clone() flags to
+    // make vfork() act like fork(). We don't call the atfork handlers, so we
+    // may deadlock if the child allocates, but we have seen badly written
+    // atfork handlers themselves cause deadlocks [1]. ndk_translation already
+    // implements vfork() as fork() without calling handlers, so we have some
+    // evidence that it isn't necessary to call them.
+    //
+    // POSIX.1 defines vfork() to have the same effect as fork() except that
+    // most behavior, including heap allocation, becomes undefined in the child,
+    // so we aren't violating POSIX by doing this.
+    //
+    // [1] https://cs.android.com/android/platform/superproject/+/master:system/extras/simpleperf/app_api/cpp/simpleperf.cpp;drc=788fa4183441f4977ddbd5a055e42a7fe7691d21;l=308
+#if !__has_feature(hwaddress_sanitizer)
+    // if (!__libc_globals->memtag_stack) x0 |= CLONE_VM | CLONE_VFORK;
+    adrp    x1, __libc_globals + OFFSETOF_libc_globals_memtag_stack
+    ldrb    w1, [x1, :lo12:__libc_globals + OFFSETOF_libc_globals_memtag_stack]
+    cbnz    w1, 1f
+    orr     x0, x0, #CLONE_VM
+    orr     x0, x0, #CLONE_VFORK
+1:
+#endif
     mov     x1, xzr
     mov     x2, xzr
     mov     x3, xzr
@@ -62,25 +82,6 @@
     cneg    x0, x0, hi
     b.hi    __set_errno_internal
 
-    // Clean up stack shadow in the parent process.
-    // https://github.com/google/sanitizers/issues/925
-    paciasp
-    .cfi_negate_ra_state
-    stp x0, x30, [sp, #-16]!
-    .cfi_adjust_cfa_offset 16
-    .cfi_rel_offset x0, 0
-    .cfi_rel_offset x30, 8
-
-    add x0, sp, #16
-    bl memtag_handle_vfork
-
-    ldp x0, x30, [sp], #16
-    .cfi_adjust_cfa_offset -16
-    .cfi_restore x0
-    .cfi_restore x30
-    autiasp
-    .cfi_negate_ra_state
-
 .L_exit:
     ret
 END(vfork)
diff --git a/libc/arch-arm64/dynamic_function_dispatch.cpp b/libc/arch-arm64/dynamic_function_dispatch.cpp
index cd55311..b9f657b 100644
--- a/libc/arch-arm64/dynamic_function_dispatch.cpp
+++ b/libc/arch-arm64/dynamic_function_dispatch.cpp
@@ -41,7 +41,7 @@
     }
 }
 
-typedef void* memcmp_func(void*, const void*, size_t);
+typedef int memcmp_func(const void*, const void*, size_t);
 DEFINE_IFUNC_FOR(memcmp) {
     // TODO: enable the SVE version.
     RETURN_FUNC(memcmp_func, __memcmp_aarch64);
@@ -65,7 +65,7 @@
     }
 }
 
-typedef int stpcpy_func(char*, const char*);
+typedef char* stpcpy_func(char*, const char*, size_t);
 DEFINE_IFUNC_FOR(stpcpy) {
     // TODO: enable the SVE version.
     RETURN_FUNC(stpcpy_func, __stpcpy_aarch64);
@@ -95,7 +95,7 @@
     RETURN_FUNC(strcmp_func, __strcmp_aarch64);
 }
 
-typedef int strcpy_func(char*, const char*);
+typedef char* strcpy_func(char*, const char*);
 DEFINE_IFUNC_FOR(strcpy) {
     // TODO: enable the SVE version.
     RETURN_FUNC(strcpy_func, __strcpy_aarch64);
@@ -110,13 +110,13 @@
     }
 }
 
-typedef int strncmp_func(const char*, const char*, int);
+typedef int strncmp_func(const char*, const char*, size_t);
 DEFINE_IFUNC_FOR(strncmp) {
     // TODO: enable the SVE version.
     RETURN_FUNC(strncmp_func, __strncmp_aarch64);
 }
 
-typedef size_t strnlen_func(const char*);
+typedef size_t strnlen_func(const char*, size_t);
 DEFINE_IFUNC_FOR(strnlen) {
     // TODO: enable the SVE version.
     RETURN_FUNC(strnlen_func, __strnlen_aarch64);
diff --git a/libc/arch-riscv64/dynamic_function_dispatch.cpp b/libc/arch-riscv64/dynamic_function_dispatch.cpp
new file mode 100644
index 0000000..0925c5f
--- /dev/null
+++ b/libc/arch-riscv64/dynamic_function_dispatch.cpp
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#include <private/bionic_ifuncs.h>
+#include <stddef.h>
+#include <sys/auxv.h>
+
+#if defined(__riscv_v)
+extern "C" {
+
+typedef void* memchr_func(const void*, int, size_t);
+DEFINE_IFUNC_FOR(memchr) {
+  RETURN_FUNC(memchr_func, memchr_vext);
+}
+
+typedef int memcmp_func(const void*, const void*, size_t);
+DEFINE_IFUNC_FOR(memcmp) {
+  RETURN_FUNC(memcmp_func, memcmp_vext);
+}
+
+typedef void* memcpy_func(void*, const void*, size_t);
+DEFINE_IFUNC_FOR(memcpy) {
+  RETURN_FUNC(memcpy_func, memcpy_vext);
+}
+
+typedef void* memmove_func(void*, const void*, size_t);
+DEFINE_IFUNC_FOR(memmove) {
+  RETURN_FUNC(memmove_func, memmove_vext);
+}
+
+typedef void* memset_func(void*, int, size_t);
+DEFINE_IFUNC_FOR(memset) {
+  RETURN_FUNC(memset_func, memset_vext);
+}
+
+typedef char* strcat_func(char*, const char*);
+DEFINE_IFUNC_FOR(strcat) {
+  RETURN_FUNC(strcat_func, strcat_vext);
+}
+
+typedef char* strchr_func(const char*, int);
+DEFINE_IFUNC_FOR(strchr) {
+  RETURN_FUNC(strchr_func, strchr_vext);
+}
+
+typedef int strcmp_func(const char*, const char*);
+DEFINE_IFUNC_FOR(strcmp) {
+  RETURN_FUNC(strcmp_func, strcmp_vext);
+}
+
+typedef char* strcpy_func(char*, const char*);
+DEFINE_IFUNC_FOR(strcpy) {
+  RETURN_FUNC(strcpy_func, strcpy_vext);
+}
+
+typedef size_t strlen_func(const char*);
+DEFINE_IFUNC_FOR(strlen) {
+  RETURN_FUNC(strlen_func, strlen_vext);
+}
+
+typedef char* strncat_func(char*, const char*, size_t);
+DEFINE_IFUNC_FOR(strncat) {
+  RETURN_FUNC(strncat_func, strncat_vext);
+}
+
+typedef int strncmp_func(const char*, const char*, size_t);
+DEFINE_IFUNC_FOR(strncmp) {
+  RETURN_FUNC(strncmp_func, strncmp_vext);
+}
+
+typedef char* strncpy_func(char*, const char*, size_t);
+DEFINE_IFUNC_FOR(strncpy) {
+  RETURN_FUNC(strncpy_func, strncpy_vext);
+}
+
+typedef size_t strnlen_func(const char*, size_t);
+DEFINE_IFUNC_FOR(strnlen) {
+  RETURN_FUNC(strnlen_func, strnlen_vext);
+}
+
+}  // extern "C"
+#endif
diff --git a/libc/bionic/timespec_get.cpp b/libc/arch-riscv64/static_function_dispatch.S
similarity index 62%
copy from libc/bionic/timespec_get.cpp
copy to libc/arch-riscv64/static_function_dispatch.S
index 7fc2182..3bf0275 100644
--- a/libc/bionic/timespec_get.cpp
+++ b/libc/arch-riscv64/static_function_dispatch.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,8 +26,30 @@
  * SUCH DAMAGE.
  */
 
-#include <time.h>
+#include <private/bionic_asm.h>
 
-int timespec_get(timespec* ts, int base) {
-  return (base == TIME_UTC && clock_gettime(CLOCK_REALTIME, ts) != -1) ? base : 0;
-}
+#define FUNCTION_DELEGATE(name, impl) \
+ENTRY(name); \
+    j impl; \
+END(name)
+
+#if defined(__riscv_v)
+
+FUNCTION_DELEGATE(memchr, memchr_vext)
+FUNCTION_DELEGATE(memcmp, memcmp_vext)
+FUNCTION_DELEGATE(memcpy, memcpy_vext)
+FUNCTION_DELEGATE(memmove, memmove_vext)
+FUNCTION_DELEGATE(memset, memset_vext)
+FUNCTION_DELEGATE(strcat, strcat_vext)
+FUNCTION_DELEGATE(strchr, strchr_vext)
+FUNCTION_DELEGATE(strcmp, strcmp_vext)
+FUNCTION_DELEGATE(strcpy, strcpy_vext)
+FUNCTION_DELEGATE(strlen, strlen_vext)
+FUNCTION_DELEGATE(strncat, strncat_vext)
+FUNCTION_DELEGATE(strncmp, strncmp_vext)
+FUNCTION_DELEGATE(strncpy, strncpy_vext)
+FUNCTION_DELEGATE(strnlen, strnlen_vext)
+
+#endif
+
+NOTE_GNU_PROPERTY()
diff --git a/libc/arch-riscv64/string/memchr_vext.S b/libc/arch-riscv64/string/memchr_vext.S
new file mode 100644
index 0000000..3761265
--- /dev/null
+++ b/libc/arch-riscv64/string/memchr_vext.S
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define iResult a0
+
+#define pSrc a0
+#define iValue a1
+#define iNum a2
+
+#define iVL a3
+#define iTemp a4
+
+#define ELEM_LMUL_SETTING m8
+#define vData v0
+#define vMask v8
+
+ENTRY(memchr_vext)
+
+L(loop):
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vData, (pSrc)
+    vmseq.vx vMask, vData, iValue
+    vfirst.m iTemp, vMask
+
+    # skip the loop if we find the matched value.
+    bgez iTemp, L(found)
+
+    csrr iVL, vl
+    sub iNum, iNum, iVL
+    add pSrc, pSrc, iVL
+
+    bnez iNum, L(loop)
+
+    li iResult, 0
+    ret
+
+L(found):
+    add iResult, pSrc, iTemp
+    ret
+
+END(memchr_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/memcmp_vext.S b/libc/arch-riscv64/string/memcmp_vext.S
new file mode 100644
index 0000000..d8e7a06
--- /dev/null
+++ b/libc/arch-riscv64/string/memcmp_vext.S
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define iResult a0
+
+#define pSrc1 a0
+#define pSrc2 a1
+#define iNum a2
+
+#define iVL a3
+#define iTemp a4
+#define iTemp1 a5
+#define iTemp2 a6
+
+#define ELEM_LMUL_SETTING m8
+#define vData1 v0
+#define vData2 v8
+#define vMask v16
+
+ENTRY(memcmp_vext)
+
+L(loop):
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8.v vData1, (pSrc1)
+    vle8.v vData2, (pSrc2)
+
+    vmsne.vv vMask, vData1, vData2
+    sub iNum, iNum, iVL
+    vfirst.m iTemp, vMask
+
+    /* skip the loop if we find the different
+       value between pSrc1 and pSrc2.  */
+    bgez iTemp, L(found)
+
+    add pSrc1, pSrc1, iVL
+    add pSrc2, pSrc2, iVL
+
+    bnez iNum, L(loop)
+
+    li iResult, 0
+    ret
+
+L(found):
+    add pSrc1, pSrc1, iTemp
+    add pSrc2, pSrc2, iTemp
+    lbu iTemp1, 0(pSrc1)
+    lbu iTemp2, 0(pSrc2)
+    sub iResult, iTemp1, iTemp2
+    ret
+
+END(memcmp_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/memcpy_vext.S b/libc/arch-riscv64/string/memcpy_vext.S
new file mode 100644
index 0000000..100f538
--- /dev/null
+++ b/libc/arch-riscv64/string/memcpy_vext.S
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define iNum a2
+
+#define iVL a3
+#define pDstPtr a4
+
+#define ELEM_LMUL_SETTING m8
+#define vData v0
+
+ENTRY(memcpy_vext)
+
+    mv pDstPtr, pDst
+
+L(loop):
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8.v vData, (pSrc)
+    sub iNum, iNum, iVL
+    add pSrc, pSrc, iVL
+    vse8.v vData, (pDstPtr)
+    add pDstPtr, pDstPtr, iVL
+
+    bnez iNum, L(loop)
+
+    ret
+
+END(memcpy_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/memmove_vext.S b/libc/arch-riscv64/string/memmove_vext.S
new file mode 100644
index 0000000..722ffd1
--- /dev/null
+++ b/libc/arch-riscv64/string/memmove_vext.S
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define iNum a2
+
+#define iVL a3
+#define pDstPtr a4
+#define pSrcBackwardPtr a5
+#define pDstBackwardPtr a6
+
+#define ELEM_LMUL_SETTING m8
+#define vData v0
+
+ENTRY(memmove_vext)
+
+    mv pDstPtr, pDst
+
+    bgeu pSrc, pDst, L(forward_copy_loop)
+    add pSrcBackwardPtr, pSrc, iNum
+    add pDstBackwardPtr, pDst, iNum
+    bltu pDst, pSrcBackwardPtr, L(backward_copy_loop)
+
+L(forward_copy_loop):
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8.v vData, (pSrc)
+    sub iNum, iNum, iVL
+    add pSrc, pSrc, iVL
+    vse8.v vData, (pDstPtr)
+    add pDstPtr, pDstPtr, iVL
+
+    bnez iNum, L(forward_copy_loop)
+    ret
+
+L(backward_copy_loop):
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+
+    sub pSrcBackwardPtr, pSrcBackwardPtr, iVL
+    vle8.v vData, (pSrcBackwardPtr)
+    sub iNum, iNum, iVL
+    sub pDstBackwardPtr, pDstBackwardPtr, iVL
+    vse8.v vData, (pDstBackwardPtr)
+    bnez iNum, L(backward_copy_loop)
+    ret
+
+END(memmove_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/memset_vext.S b/libc/arch-riscv64/string/memset_vext.S
new file mode 100644
index 0000000..ef8387d
--- /dev/null
+++ b/libc/arch-riscv64/string/memset_vext.S
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define iValue a1
+#define iNum a2
+
+#define iVL a3
+#define iTemp a4
+#define pDstPtr a5
+
+#define ELEM_LMUL_SETTING m8
+#define vData v0
+
+ENTRY(memset_vext)
+
+    mv pDstPtr, pDst
+
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+    vmv.v.x vData, iValue
+
+L(loop):
+    vse8.v vData, (pDstPtr)
+    sub iNum, iNum, iVL
+    add pDstPtr, pDstPtr, iVL
+    vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
+    bnez iNum, L(loop)
+
+    ret
+
+END(memset_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strcat_vext.S b/libc/arch-riscv64/string/strcat_vext.S
new file mode 100644
index 0000000..790c07a
--- /dev/null
+++ b/libc/arch-riscv64/string/strcat_vext.S
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define pDstPtr a2
+
+#define iVL a3
+#define iCurrentVL a4
+#define iActiveElemPos a5
+
+#define ELEM_LMUL_SETTING m1
+#define vMask1 v0
+#define vMask2 v1
+#define vStr1 v8
+#define vStr2 v16
+
+ENTRY(strcat_vext)
+
+    mv pDstPtr, pDst
+
+    // the strlen of dst
+L(strlen_loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vStr1, (pDstPtr)
+    // find the '\0'
+    vmseq.vx vMask1, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask1
+    add pDstPtr, pDstPtr, iCurrentVL
+    bltz iActiveElemPos, L(strlen_loop)
+
+    sub pDstPtr, pDstPtr, iCurrentVL
+    add pDstPtr, pDstPtr, iActiveElemPos
+
+    // copy pSrc to pDstPtr
+L(strcpy_loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vStr1, (pSrc)
+    vmseq.vx vMask2, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask2
+    vmsif.m vMask1, vMask2
+    add pSrc, pSrc, iCurrentVL
+    vse8.v vStr1, (pDstPtr), vMask1.t
+    add pDstPtr, pDstPtr, iCurrentVL
+    bltz iActiveElemPos, L(strcpy_loop)
+
+    ret
+
+END(strcat_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strchr_vext.S b/libc/arch-riscv64/string/strchr_vext.S
new file mode 100644
index 0000000..89828ea
--- /dev/null
+++ b/libc/arch-riscv64/string/strchr_vext.S
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pStr a0
+#define iCh a1
+#define iEndOffset a2
+#define iChOffset a3
+#define iTemp1 a4
+#define iTemp2 a5
+#define iCurrentVL a6
+#define iVL t0
+
+#define ELEM_LMUL_SETTING m1
+#define vStr v0
+#define vMaskEnd v8
+#define vMaskCh v9
+
+ENTRY(strchr_vext)
+
+L(strchr_loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+    vle8ff.v vStr, (pStr)
+    vmseq.vi vMaskEnd, vStr, 0
+    vmseq.vx vMaskCh, vStr, iCh
+    vfirst.m iEndOffset, vMaskEnd /* first occurrence of \0 */
+    vfirst.m iChOffset, vMaskCh /* first occurrence of ch */
+    sltz iTemp1, iChOffset
+    sltu iTemp2, iEndOffset, iChOffset
+    or iTemp1, iTemp1, iTemp2
+    beqz iTemp1, L(found_ch) /* Found ch, not preceded by \0? */
+    csrr iCurrentVL, vl
+    add pStr, pStr, iCurrentVL
+    bltz iEndOffset, L(strchr_loop) /* Didn't find \0? */
+    li pStr, 0
+    ret
+L(found_ch):
+    add pStr, pStr, iChOffset
+    ret
+
+END(strchr_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strcmp_vext.S b/libc/arch-riscv64/string/strcmp_vext.S
new file mode 100644
index 0000000..d6ad96e
--- /dev/null
+++ b/libc/arch-riscv64/string/strcmp_vext.S
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define iResult a0
+
+#define pStr1 a0
+#define pStr2 a1
+
+#define iVL a2
+#define iTemp1 a3
+#define iTemp2 a4
+#define iLMUL1 a5
+#define iLMUL2 a6
+#define iLMUL4 a7
+
+#define iLMUL t0
+
+#define vStr1 v0
+#define vStr2 v8
+#define vMask1 v16
+#define vMask2 v17
+
+ENTRY(strcmp_vext)
+
+    # increase the lmul using the following sequences:
+    # 1/2, 1/2, 1, 2, 4, 4, 4, ...
+
+    # lmul=1/2
+    vsetvli iVL, zero, e8, mf2, ta, ma
+
+    vle8ff.v vStr1, (pStr1)
+     # check if vStr1[i] == 0
+    vmseq.vx vMask1, vStr1, zero
+
+    vle8ff.v vStr2, (pStr2)
+    # check if vStr1[i] != vStr2[i]
+    vmsne.vv vMask2, vStr1, vStr2
+
+    # find the index x for vStr1[x]==0
+    vfirst.m iTemp1, vMask1
+    # find the index x for vStr1[x]!=vStr2[x]
+    vfirst.m iTemp2, vMask2
+
+    bgez iTemp1, L(check1)
+    bgez iTemp2, L(check2)
+
+    # get the current vl updated by vle8ff.
+    csrr iVL, vl
+    add pStr1, pStr1, iVL
+    add pStr2, pStr2, iVL
+
+    vsetvli iVL, zero, e8, mf2, ta, ma
+    addi iLMUL1, zero, 1
+    addi iLMUL, zero, 1
+    j L(loop)
+L(m1):
+    vsetvli iVL, zero, e8, m1, ta, ma
+    addi iLMUL2, zero, 2
+    addi iLMUL, zero, 2
+    j L(loop)
+L(m2):
+    vsetvli iVL, zero, e8, m2, ta, ma
+    addi iLMUL4, zero, 4
+    addi iLMUL, zero, 4
+    j L(loop)
+L(m4):
+    vsetvli iVL, zero, e8, m4, ta, ma
+
+L(loop):
+    vle8ff.v vStr1, (pStr1)
+    vmseq.vx vMask1, vStr1, zero
+
+    vle8ff.v vStr2, (pStr2)
+    vmsne.vv vMask2, vStr1, vStr2
+
+    vfirst.m iTemp1, vMask1
+    vfirst.m iTemp2, vMask2
+
+    bgez iTemp1, L(check1)
+    bgez iTemp2, L(check2)
+
+    csrr iVL, vl
+    add pStr1, pStr1, iVL
+    add pStr2, pStr2, iVL
+
+    beq iLMUL, iLMUL1, L(m1)
+    beq iLMUL, iLMUL2, L(m2)
+    beq iLMUL, iLMUL4, L(m4)
+    j L(loop)
+
+    // iTemp1>=0
+L(check1):
+    bltz iTemp2, 1f
+    blt iTemp2, iTemp1, L(check2)
+1:
+    // iTemp2<0
+    // iTemp2>=0 && iTemp1<iTemp2
+    add pStr1, pStr1, iTemp1
+    add pStr2, pStr2, iTemp1
+    lbu iTemp1, 0(pStr1)
+    lbu iTemp2, 0(pStr2)
+    sub iResult, iTemp1, iTemp2
+    ret
+
+    // iTemp1<0
+    // iTemp2>=0
+L(check2):
+    add pStr1, pStr1, iTemp2
+    add pStr2, pStr2, iTemp2
+    lbu iTemp1, 0(pStr1)
+    lbu iTemp2, 0(pStr2)
+    sub iResult, iTemp1, iTemp2
+    ret
+
+END(strcmp_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strcpy_vext.S b/libc/arch-riscv64/string/strcpy_vext.S
new file mode 100644
index 0000000..9c11f7d
--- /dev/null
+++ b/libc/arch-riscv64/string/strcpy_vext.S
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define pDstPtr a2
+
+#define iVL a3
+#define iCurrentVL a4
+#define iActiveElemPos a5
+
+#define ELEM_LMUL_SETTING m1
+#define vMask1 v0
+#define vMask2 v1
+#define vStr1 v8
+#define vStr2 v16
+
+ENTRY(strcpy_vext)
+
+    mv pDstPtr, pDst
+
+    // copy pSrc to pDstPtr
+L(strcpy_loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+    vle8ff.v vStr1, (pSrc)
+    vmseq.vx vMask2, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask2
+    vmsif.m vMask1, vMask2
+    add pSrc, pSrc, iCurrentVL
+    vse8.v vStr1, (pDstPtr), vMask1.t
+    add pDstPtr, pDstPtr, iCurrentVL
+    bltz iActiveElemPos, L(strcpy_loop)
+
+    ret
+
+END(strcpy_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strlen_vext.S b/libc/arch-riscv64/string/strlen_vext.S
new file mode 100644
index 0000000..393af58
--- /dev/null
+++ b/libc/arch-riscv64/string/strlen_vext.S
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define iResult a0
+#define pStr a0
+#define pCopyStr a1
+#define iVL a2
+#define iCurrentVL a2
+#define iEndOffset a3
+
+#define ELEM_LMUL_SETTING m2
+#define vStr v0
+#define vMaskEnd v2
+
+ENTRY(strlen_vext)
+
+    mv pCopyStr, pStr
+L(loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+    vle8ff.v vStr, (pCopyStr)
+    csrr iCurrentVL, vl
+    vmseq.vi vMaskEnd, vStr, 0
+    vfirst.m iEndOffset, vMaskEnd
+    add pCopyStr, pCopyStr, iCurrentVL
+    bltz iEndOffset, L(loop)
+
+    add pStr, pStr, iCurrentVL
+    add pCopyStr, pCopyStr, iEndOffset
+    sub iResult, pCopyStr, iResult
+
+    ret
+
+END(strlen)
+
+#endif
diff --git a/libc/arch-riscv64/string/strncat_vext.S b/libc/arch-riscv64/string/strncat_vext.S
new file mode 100644
index 0000000..e9da434
--- /dev/null
+++ b/libc/arch-riscv64/string/strncat_vext.S
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define iLength a2
+#define pDstPtr a3
+
+#define iVL a4
+#define iCurrentVL a5
+#define iActiveElemPos a6
+
+#define ELEM_LMUL_SETTING m1
+#define vMask1 v0
+#define vMask2 v1
+#define vStr1 v8
+#define vStr2 v16
+
+ENTRY(strncat_vext)
+
+    mv pDstPtr, pDst
+
+    // the strlen of dst
+L(strlen_loop):
+    vsetvli iVL, zero, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vStr1, (pDstPtr)
+    // find the '\0'
+    vmseq.vx vMask1, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask1
+    add pDstPtr, pDstPtr, iCurrentVL
+    bltz iActiveElemPos, L(strlen_loop)
+
+    sub pDstPtr, pDstPtr, iCurrentVL
+    add pDstPtr, pDstPtr, iActiveElemPos
+
+    // copy pSrc to pDstPtr
+L(strcpy_loop):
+    vsetvli iVL, iLength, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vStr1, (pSrc)
+    vmseq.vx vMask2, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask2
+    vmsif.m vMask1, vMask2
+    add pSrc, pSrc, iCurrentVL
+    sub iLength, iLength, iCurrentVL
+    vse8.v vStr1, (pDstPtr), vMask1.t
+    add pDstPtr, pDstPtr, iCurrentVL
+    beqz iLength, L(fill_zero)
+    bltz iActiveElemPos, L(strcpy_loop)
+
+    ret
+
+L(fill_zero):
+    bgez iActiveElemPos, L(fill_zero_end)
+    sb zero, (pDstPtr)
+
+L(fill_zero_end):
+    ret
+
+END(strncat_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strncmp_vext.S b/libc/arch-riscv64/string/strncmp_vext.S
new file mode 100644
index 0000000..88f0f3e
--- /dev/null
+++ b/libc/arch-riscv64/string/strncmp_vext.S
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define iResult a0
+
+#define pStr1 a0
+#define pStr2 a1
+#define iLength a2
+
+#define iVL a3
+#define iTemp1 a4
+#define iTemp2 a5
+
+#define ELEM_LMUL_SETTING m1
+#define vStr1 v0
+#define vStr2 v4
+#define vMask1 v8
+#define vMask2 v9
+
+ENTRY(strncmp_vext)
+
+    beqz iLength, L(zero_length)
+
+L(loop):
+    vsetvli iVL, iLength, e8, ELEM_LMUL_SETTING, ta, ma
+
+    vle8ff.v vStr1, (pStr1)
+     # vStr1[i] == 0
+    vmseq.vx vMask1, vStr1, zero
+
+    vle8ff.v vStr2, (pStr2)
+    # vStr1[i] != vStr2[i]
+    vmsne.vv vMask2, vStr1, vStr2
+
+    csrr iVL, vl
+
+    # r = mask1 | mask2
+    # We could use vfirst.m to get the first zero char or the
+    # first different char between str1 and str2.
+    vmor.mm vMask1, vMask1, vMask2
+
+    sub iLength, iLength, iVL
+
+    vfirst.m iTemp1, vMask1
+
+    bgez iTemp1, L(end_loop)
+
+    add pStr1, pStr1, iVL
+    add pStr2, pStr2, iVL
+    bnez iLength, L(loop)
+L(end_loop):
+
+    add pStr1, pStr1, iTemp1
+    add pStr2, pStr2, iTemp1
+    lbu iTemp1, 0(pStr1)
+    lbu iTemp2, 0(pStr2)
+
+    sub iResult, iTemp1, iTemp2
+    ret
+
+L(zero_length):
+    li iResult, 0
+    ret
+
+END(strncmp_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strncpy_vext.S b/libc/arch-riscv64/string/strncpy_vext.S
new file mode 100644
index 0000000..1aedaf9
--- /dev/null
+++ b/libc/arch-riscv64/string/strncpy_vext.S
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pDst a0
+#define pSrc a1
+#define iLength a2
+#define pDstPtr a3
+
+#define iVL a4
+#define iCurrentVL a5
+#define iActiveElemPos a6
+
+#define ELEM_LMUL_SETTING m1
+#define vMask1 v0
+#define vMask2 v1
+#define ZERO_FILL_ELEM_LMUL_SETTING m8
+#define vStr1 v8
+#define vStr2 v16
+
+ENTRY(strncpy_vext)
+
+    mv pDstPtr, pDst
+
+    // copy pSrc to pDstPtr
+L(strcpy_loop):
+    vsetvli iVL, iLength, e8, ELEM_LMUL_SETTING, ta, ma
+    vle8ff.v vStr1, (pSrc)
+    vmseq.vx vMask2, vStr1, zero
+    csrr iCurrentVL, vl
+    vfirst.m iActiveElemPos, vMask2
+    vmsif.m vMask1, vMask2
+    add pSrc, pSrc, iCurrentVL
+    sub iLength, iLength, iCurrentVL
+    vse8.v vStr1, (pDstPtr), vMask1.t
+    add pDstPtr, pDstPtr, iCurrentVL
+    bgez iActiveElemPos, L(fill_zero)
+    bnez iLength, L(strcpy_loop)
+    ret
+
+    # fill the tail zero.
+L(fill_zero):
+    sub iVL, iCurrentVL, iActiveElemPos
+    add iLength, iLength, iVL
+    bnez iLength, 1f
+    ret
+1:
+    sub pDstPtr, pDstPtr, iVL
+    vsetvli zero, iLength, e8, ZERO_FILL_ELEM_LMUL_SETTING, ta, ma
+    vmv.v.x vStr2, zero
+
+L(fill_zero_loop):
+    vsetvli iVL, iLength, e8, ZERO_FILL_ELEM_LMUL_SETTING, ta, ma
+    vse8.v vStr2, (pDstPtr)
+    sub iLength, iLength, iVL
+    add pDstPtr, pDstPtr, iVL
+    bnez iLength, L(fill_zero_loop)
+
+    ret
+
+END(strncpy_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/strnlen_vext.S b/libc/arch-riscv64/string/strnlen_vext.S
new file mode 100644
index 0000000..f546689
--- /dev/null
+++ b/libc/arch-riscv64/string/strnlen_vext.S
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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(__riscv_v)
+
+#include "sys/asm.h"
+
+#define pStr a0
+#define pCopyStr a2
+#define iRetValue a0
+#define iMaxlen a1
+#define iCurrentVL a3
+#define iEndOffset a4
+
+#define ELEM_LMUL_SETTING m1
+#define vStr v0
+#define vMaskEnd v8
+
+ENTRY(strnlen_vext)
+
+    mv pCopyStr, pStr
+    mv iRetValue, iMaxlen
+L(strnlen_loop):
+    beqz iMaxlen, L(end_strnlen_loop)
+    vsetvli zero, iMaxlen, e8, ELEM_LMUL_SETTING, ta, ma
+    vle8ff.v vStr, (pCopyStr)
+    vmseq.vi vMaskEnd, vStr, 0
+    vfirst.m iEndOffset, vMaskEnd /* first occurrence of \0 */
+    csrr iCurrentVL, vl
+    add pCopyStr, pCopyStr, iCurrentVL
+    sub iMaxlen, iMaxlen, iCurrentVL
+    bltz iEndOffset, L(strnlen_loop)
+    add iMaxlen, iMaxlen, iCurrentVL
+    sub iRetValue, iRetValue, iMaxlen
+    add iRetValue, iRetValue, iEndOffset
+L(end_strnlen_loop):
+    ret
+
+END(strnlen_vext)
+
+#endif
diff --git a/libc/arch-riscv64/string/sys/asm.h b/libc/arch-riscv64/string/sys/asm.h
new file mode 100644
index 0000000..cc76dc5
--- /dev/null
+++ b/libc/arch-riscv64/string/sys/asm.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+/*
+ * Copyright (c) 2023 SiFive, Inc.
+ * 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.
+ * 3. The name of the company may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SIFIVE INC ``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 SIFIVE INC 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.
+ */
+
+#ifndef _SYS_ASM_H
+#define _SYS_ASM_H
+
+#undef LEAF
+#define LEAF(symbol)       \
+  .globl symbol;           \
+  .align 2;                \
+  .type symbol, @function; \
+  symbol:                  \
+  .cfi_startproc;
+
+#undef END
+#define END(function) \
+  .cfi_endproc;       \
+  .size function, .- function
+
+#define ENTRY(name) LEAF(name)
+
+#define L(label) .L##label
+
+#endif /* _SYS_ASM_H */
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 95f46e9..1b539f2 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -150,7 +150,7 @@
   // stack.)
   ThreadMapping mapping = __allocate_thread_mapping(0, PTHREAD_GUARD_SIZE);
   if (mapping.mmap_base == nullptr) {
-    async_safe_fatal("failed to mmap main thread static TLS: %s", strerror(errno));
+    async_safe_fatal("failed to mmap main thread static TLS: %m");
   }
 
   const StaticTlsLayout& layout = __libc_shared_globals()->static_tls_layout;
diff --git a/libc/bionic/android_profiling_dynamic.cpp b/libc/bionic/android_profiling_dynamic.cpp
index 8c9127e..849d04b 100644
--- a/libc/bionic/android_profiling_dynamic.cpp
+++ b/libc/bionic/android_profiling_dynamic.cpp
@@ -126,15 +126,14 @@
 static void HandleTracedPerfSignal() {
   ScopedFd sock_fd{ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0 /*protocol*/) };
   if (sock_fd.get() == -1) {
-    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to create socket: %s", strerror(errno));
+    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to create socket: %m");
     return;
   }
 
   sockaddr_un saddr{ AF_UNIX, "/dev/socket/traced_perf" };
   size_t addrlen = sizeof(sockaddr_un);
   if (connect(sock_fd.get(), reinterpret_cast<const struct sockaddr*>(&saddr), addrlen) == -1) {
-    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to connect to traced_perf socket: %s",
-                          strerror(errno));
+    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to connect to traced_perf socket: %m");
     return;
   }
 
@@ -153,13 +152,11 @@
   }
 
   if (maps_fd.get() == -1) {
-    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to open /proc/self/maps: %s",
-                          strerror(errno));
+    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to open /proc/self/maps: %m");
     return;
   }
   if (mem_fd.get() == -1) {
-    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to open /proc/self/mem: %s",
-                          strerror(errno));
+    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to open /proc/self/mem: %m");
     return;
   }
 
@@ -183,7 +180,7 @@
   memcpy(CMSG_DATA(cmsg), send_fds, num_fds * sizeof(int));
 
   if (sendmsg(sock_fd.get(), &msg_hdr, 0) == -1) {
-    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to sendmsg: %s", strerror(errno));
+    async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to sendmsg: %m");
   }
 }
 
diff --git a/libc/bionic/atexit.cpp b/libc/bionic/atexit.cpp
index 5dbf322..29f9c7b 100644
--- a/libc/bionic/atexit.cpp
+++ b/libc/bionic/atexit.cpp
@@ -73,8 +73,8 @@
   // restart concurrent __cxa_finalize passes.
   uint64_t total_appends_;
 
-  static size_t page_start_of_index(size_t idx) { return PAGE_START(idx * sizeof(AtexitEntry)); }
-  static size_t page_end_of_index(size_t idx) { return PAGE_END(idx * sizeof(AtexitEntry)); }
+  static size_t page_start_of_index(size_t idx) { return page_start(idx * sizeof(AtexitEntry)); }
+  static size_t page_end_of_index(size_t idx) { return page_end(idx * sizeof(AtexitEntry)); }
 
   // Recompact the array if it will save at least one page of memory at the end.
   bool needs_recompaction() const {
@@ -158,7 +158,7 @@
 
   const int prot = PROT_READ | (writable ? PROT_WRITE : 0);
   if (mprotect(reinterpret_cast<char*>(array_) + start_byte, byte_len, prot) != 0) {
-    async_safe_fatal("mprotect failed on atexit array: %s", strerror(errno));
+    async_safe_fatal("mprotect failed on atexit array: %m");
   }
 }
 
@@ -167,7 +167,7 @@
 // than one.
 bool AtexitArray::next_capacity(size_t capacity, size_t* result) {
   if (capacity == 0) {
-    *result = PAGE_END(sizeof(AtexitEntry)) / sizeof(AtexitEntry);
+    *result = page_end(sizeof(AtexitEntry)) / sizeof(AtexitEntry);
     return true;
   }
   size_t num_bytes;
@@ -198,8 +198,8 @@
   }
   if (new_pages == MAP_FAILED) {
     async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                          "__cxa_atexit: mmap/mremap failed to allocate %zu bytes: %s",
-                          new_capacity_bytes, strerror(errno));
+                          "__cxa_atexit: mmap/mremap failed to allocate %zu bytes: %m",
+                          new_capacity_bytes);
   } else {
     result = true;
     prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, new_pages, new_capacity_bytes, "atexit handlers");
diff --git a/libc/bionic/bionic_allocator.cpp b/libc/bionic/bionic_allocator.cpp
index 98183d4..80e8b08 100644
--- a/libc/bionic/bionic_allocator.cpp
+++ b/libc/bionic/bionic_allocator.cpp
@@ -95,12 +95,10 @@
   return result;
 }
 
-BionicSmallObjectAllocator::BionicSmallObjectAllocator(uint32_t type,
-                                                       size_t block_size)
+BionicSmallObjectAllocator::BionicSmallObjectAllocator(uint32_t type, size_t block_size)
     : type_(type),
       block_size_(block_size),
-      blocks_per_page_((PAGE_SIZE - sizeof(small_object_page_info)) /
-                       block_size),
+      blocks_per_page_((page_size() - sizeof(small_object_page_info)) / block_size),
       free_pages_cnt_(0),
       page_list_(nullptr) {}
 
@@ -157,14 +155,13 @@
   if (page_list_ == page) {
     page_list_ = page->next_page;
   }
-  munmap(page, PAGE_SIZE);
+  munmap(page, page_size());
   free_pages_cnt_--;
 }
 
 void BionicSmallObjectAllocator::free(void* ptr) {
   small_object_page_info* const page =
-      reinterpret_cast<small_object_page_info*>(
-          PAGE_START(reinterpret_cast<uintptr_t>(ptr)));
+      reinterpret_cast<small_object_page_info*>(page_start(reinterpret_cast<uintptr_t>(ptr)));
 
   if (reinterpret_cast<uintptr_t>(ptr) % block_size_ != 0) {
     async_safe_fatal("invalid pointer: %p (block_size=%zd)", ptr, block_size_);
@@ -192,14 +189,13 @@
 }
 
 void BionicSmallObjectAllocator::alloc_page() {
-  void* const map_ptr = mmap(nullptr, PAGE_SIZE, PROT_READ | PROT_WRITE,
-                             MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+  void* const map_ptr =
+      mmap(nullptr, page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (map_ptr == MAP_FAILED) {
-    async_safe_fatal("mmap failed: %s", strerror(errno));
+    async_safe_fatal("mmap failed: %m");
   }
 
-  prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, PAGE_SIZE,
-        "bionic_alloc_small_objects");
+  prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, page_size(), "bionic_alloc_small_objects");
 
   small_object_page_info* const page =
       reinterpret_cast<small_object_page_info*>(map_ptr);
@@ -269,15 +265,15 @@
   size_t header_size = __BIONIC_ALIGN(kPageInfoSize, align);
   size_t allocated_size;
   if (__builtin_add_overflow(header_size, size, &allocated_size) ||
-      PAGE_END(allocated_size) < allocated_size) {
+      page_end(allocated_size) < allocated_size) {
     async_safe_fatal("overflow trying to alloc %zu bytes", size);
   }
-  allocated_size = PAGE_END(allocated_size);
+  allocated_size = page_end(allocated_size);
   void* map_ptr = mmap(nullptr, allocated_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
                        -1, 0);
 
   if (map_ptr == MAP_FAILED) {
-    async_safe_fatal("mmap failed: %s", strerror(errno));
+    async_safe_fatal("mmap failed: %m");
   }
 
   prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, allocated_size, "bionic_alloc_lob");
@@ -317,7 +313,7 @@
 void* BionicAllocator::memalign(size_t align, size_t size) {
   // The Bionic allocator only supports alignment up to one page, which is good
   // enough for ELF TLS.
-  align = MIN(align, PAGE_SIZE);
+  align = MIN(align, page_size());
   align = MAX(align, 16);
   if (!powerof2(align)) {
     align = BIONIC_ROUND_UP_POWER_OF_2(align);
@@ -327,7 +323,7 @@
 }
 
 inline page_info* BionicAllocator::get_page_info_unchecked(void* ptr) {
-  uintptr_t header_page = PAGE_START(reinterpret_cast<size_t>(ptr) - kPageInfoSize);
+  uintptr_t header_page = page_start(reinterpret_cast<size_t>(ptr) - kPageInfoSize);
   return reinterpret_cast<page_info*>(header_page);
 }
 
diff --git a/libc/bionic/bionic_elf_tls.cpp b/libc/bionic/bionic_elf_tls.cpp
index 79893e3..077f310 100644
--- a/libc/bionic/bionic_elf_tls.cpp
+++ b/libc/bionic/bionic_elf_tls.cpp
@@ -34,10 +34,11 @@
 #include <sys/param.h>
 #include <unistd.h>
 
+#include "platform/bionic/macros.h"
+#include "platform/bionic/page.h"
 #include "private/ScopedRWLock.h"
 #include "private/ScopedSignalBlocker.h"
 #include "private/bionic_globals.h"
-#include "platform/bionic/macros.h"
 #include "private/bionic_tls.h"
 #include "pthread_internal.h"
 
@@ -81,7 +82,7 @@
     return false;
   }
   // Bionic only respects TLS alignment up to one page.
-  *alignment = MIN(*alignment, PAGE_SIZE);
+  *alignment = MIN(*alignment, page_size());
   return true;
 }
 
diff --git a/libc/bionic/exec.cpp b/libc/bionic/exec.cpp
index 40612e7..863aa97 100644
--- a/libc/bionic/exec.cpp
+++ b/libc/bionic/exec.cpp
@@ -186,6 +186,5 @@
 
 __attribute__((no_sanitize("memtag"))) int execve(const char* pathname, char* const* argv,
                                                   char* const* envp) {
-  __get_thread()->vfork_child_stack_bottom = __builtin_frame_address(0);
   return __execve(pathname, argv, envp);
 }
diff --git a/libc/bionic/exit.cpp b/libc/bionic/exit.cpp
index 52fd193..04baac2 100644
--- a/libc/bionic/exit.cpp
+++ b/libc/bionic/exit.cpp
@@ -37,7 +37,6 @@
 extern "C" __noreturn void __exit_group(int status);
 
 __attribute__((no_sanitize("memtag"))) void _exit(int status) {
-  __get_thread()->vfork_child_stack_bottom = __builtin_frame_address(0);
   __exit_group(status);
 }
 
diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp
index 6433b59..84d2c94 100644
--- a/libc/bionic/fdsan.cpp
+++ b/libc/bionic/fdsan.cpp
@@ -40,6 +40,7 @@
 #include <unistd.h>
 
 #include <async_safe/log.h>
+#include <platform/bionic/page.h>
 #include <platform/bionic/reserved_signals.h>
 #include <sys/system_properties.h>
 
@@ -80,13 +81,13 @@
 
     size_t required_count = max - inline_fds;
     size_t required_size = sizeof(FdTableOverflow) + required_count * sizeof(FdEntry);
-    size_t aligned_size = __BIONIC_ALIGN(required_size, PAGE_SIZE);
+    size_t aligned_size = __BIONIC_ALIGN(required_size, page_size());
     size_t aligned_count = (aligned_size - sizeof(FdTableOverflow)) / sizeof(FdEntry);
 
     void* allocation =
         mmap(nullptr, aligned_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
     if (allocation == MAP_FAILED) {
-      async_safe_fatal("fdsan: mmap failed: %s", strerror(errno));
+      async_safe_fatal("fdsan: mmap failed: %m");
     }
 
     FdTableOverflow* new_overflow = reinterpret_cast<FdTableOverflow*>(allocation);
diff --git a/libc/bionic/getpagesize.cpp b/libc/bionic/getpagesize.cpp
index 3a59900..da97633 100644
--- a/libc/bionic/getpagesize.cpp
+++ b/libc/bionic/getpagesize.cpp
@@ -27,9 +27,10 @@
  */
 
 #include <unistd.h>
+#include "platform/bionic/page.h"
 
 // Portable code should use sysconf(_SC_PAGE_SIZE) directly instead.
 int getpagesize() {
   // We dont use sysconf(3) here because that drags in stdio, which makes static binaries fat.
-  return PAGE_SIZE;
+  return page_size();
 }
diff --git a/libc/bionic/heap_tagging.cpp b/libc/bionic/heap_tagging.cpp
index 78d21b0..230899a 100644
--- a/libc/bionic/heap_tagging.cpp
+++ b/libc/bionic/heap_tagging.cpp
@@ -208,33 +208,10 @@
   }
 #endif  // __aarch64__
 
+  // We can use __has_feature here rather than __hwasan_handle_longjmp as a
+  // weak symbol because this is part of libc which is always sanitized for a
+  // hwasan enabled process.
 #if __has_feature(hwaddress_sanitizer)
   __hwasan_handle_longjmp(sp_dst);
 #endif  // __has_feature(hwaddress_sanitizer)
 }
-
-extern "C" __LIBC_HIDDEN__ __attribute__((no_sanitize("memtag"), no_sanitize("hwaddress"))) void
-memtag_handle_vfork(void* sp __unused) {
-#ifdef __aarch64__
-  if (__libc_globals->memtag_stack) {
-    void* child_sp = __get_thread()->vfork_child_stack_bottom;
-    __get_thread()->vfork_child_stack_bottom = nullptr;
-    if (child_sp) {
-      size_t distance = reinterpret_cast<uintptr_t>(sp) - reinterpret_cast<uintptr_t>(child_sp);
-      if (distance > kUntagLimit) {
-        async_safe_fatal(
-            "memtag_handle_vfork: stack adjustment too large! %p -> %p, distance %zx > %zx\n",
-            child_sp, sp, distance, kUntagLimit);
-      } else {
-        untag_memory(child_sp, sp);
-      }
-    } else {
-      async_safe_fatal("memtag_handle_vfork: child SP unknown\n");
-    }
-  }
-#endif  // __aarch64__
-
-#if __has_feature(hwaddress_sanitizer)
-  __hwasan_handle_vfork(sp);
-#endif  // __has_feature(hwaddress_sanitizer)
-}
diff --git a/libc/bionic/ifaddrs.cpp b/libc/bionic/ifaddrs.cpp
index 0c80f4e..cb36cc6 100644
--- a/libc/bionic/ifaddrs.cpp
+++ b/libc/bionic/ifaddrs.cpp
@@ -281,8 +281,7 @@
   ScopedFd s(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
   if (s.get() == -1) {
     async_safe_format_log(ANDROID_LOG_ERROR, "libc",
-                          "socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC) failed in ifaddrs: %s",
-                          strerror(errno));
+                          "socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC) failed in ifaddrs: %m");
     return;
   }
 
@@ -294,8 +293,8 @@
       addr->ifa.ifa_flags = ifr.ifr_flags;
     } else {
       async_safe_format_log(ANDROID_LOG_ERROR, "libc",
-                            "ioctl(SIOCGIFFLAGS) for \"%s\" failed in ifaddrs: %s",
-                            addr->ifa.ifa_name, strerror(errno));
+                            "ioctl(SIOCGIFFLAGS) for \"%s\" failed in ifaddrs: %m",
+                            addr->ifa.ifa_name);
     }
   }
 }
diff --git a/libc/bionic/jemalloc_wrapper.cpp b/libc/bionic/jemalloc_wrapper.cpp
index ce3f314..a2bb1db 100644
--- a/libc/bionic/jemalloc_wrapper.cpp
+++ b/libc/bionic/jemalloc_wrapper.cpp
@@ -19,10 +19,20 @@
 #include <sys/param.h>
 #include <unistd.h>
 
+#include <async_safe/log.h>
 #include <private/MallocXmlElem.h>
 
 #include "jemalloc.h"
 
+__BEGIN_DECLS
+
+size_t je_mallinfo_narenas();
+size_t je_mallinfo_nbins();
+struct mallinfo je_mallinfo_arena_info(size_t);
+struct mallinfo je_mallinfo_bin_info(size_t, size_t);
+
+__END_DECLS
+
 void* je_pvalloc(size_t bytes) {
   size_t pagesize = getpagesize();
   size_t size = __BIONIC_ALIGN(bytes, pagesize);
@@ -121,19 +131,36 @@
       return 0;
     }
     return 1;
+  } else if (param == M_LOG_STATS) {
+    for (size_t i = 0; i < je_mallinfo_narenas(); i++) {
+      struct mallinfo mi = je_mallinfo_arena_info(i);
+      if (mi.hblkhd != 0) {
+        async_safe_format_log(ANDROID_LOG_INFO, "jemalloc",
+                              "Arena %zu: large bytes %zu huge bytes %zu bin bytes %zu", i,
+                              mi.ordblks, mi.uordblks, mi.fsmblks);
+
+        for (size_t j = 0; j < je_mallinfo_nbins(); j++) {
+          struct mallinfo mi = je_mallinfo_bin_info(i, j);
+          if (mi.ordblks != 0) {
+            size_t total_allocs = 1;
+            if (mi.uordblks > mi.fordblks) {
+              total_allocs = mi.uordblks - mi.fordblks;
+            }
+            size_t bin_size = mi.ordblks / total_allocs;
+            async_safe_format_log(
+                ANDROID_LOG_INFO, "jemalloc",
+                "  Bin %zu (%zu bytes): allocated bytes %zu nmalloc %zu ndalloc %zu", j, bin_size,
+                mi.ordblks, mi.uordblks, mi.fordblks);
+          }
+        }
+      }
+    }
+    return 1;
   }
+
   return 0;
 }
 
-__BEGIN_DECLS
-
-size_t je_mallinfo_narenas();
-size_t je_mallinfo_nbins();
-struct mallinfo je_mallinfo_arena_info(size_t);
-struct mallinfo je_mallinfo_bin_info(size_t, size_t);
-
-__END_DECLS
-
 int je_malloc_info(int options, FILE* fp) {
   if (options != 0) {
     errno = EINVAL;
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 59b2ddb..7ef79b6 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -186,7 +186,7 @@
 #endif
 }
 
-__noreturn static void __early_abort(int line) {
+__noreturn static void __early_abort(size_t line) {
   // We can't write to stdout or stderr because we're aborting before we've checked that
   // it's safe for us to use those file descriptors. We probably can't strace either, so
   // we rely on the fact that if we dereference a low address, either debuggerd or the
@@ -340,11 +340,11 @@
 #if !defined(__LP64__)
   int old_value = personality(0xffffffff);
   if (old_value == -1) {
-    async_safe_fatal("error getting old personality value: %s", strerror(errno));
+    async_safe_fatal("error getting old personality value: %m");
   }
 
   if (personality((static_cast<unsigned int>(old_value) & ~PER_MASK) | PER_LINUX32) == -1) {
-    async_safe_fatal("error setting PER_LINUX32 personality: %s", strerror(errno));
+    async_safe_fatal("error setting PER_LINUX32 personality: %m");
   }
 #endif
 }
diff --git a/libc/bionic/libc_init_static.cpp b/libc/bionic/libc_init_static.cpp
index d64d402..d7a2856 100644
--- a/libc/bionic/libc_init_static.cpp
+++ b/libc/bionic/libc_init_static.cpp
@@ -129,8 +129,8 @@
       continue;
     }
 
-    ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr);
-    ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz);
+    ElfW(Addr) seg_page_start = page_start(phdr->p_vaddr);
+    ElfW(Addr) seg_page_end = page_end(phdr->p_vaddr + phdr->p_memsz);
 
     // Check return value here? What do we do if we fail?
     mprotect(reinterpret_cast<void*>(seg_page_start), seg_page_end - seg_page_start, PROT_READ);
@@ -354,11 +354,10 @@
       __libc_shared_globals()->initial_memtag_stack = memtag_stack;
 
       if (memtag_stack) {
-        void* page_start =
-            reinterpret_cast<void*>(PAGE_START(reinterpret_cast<uintptr_t>(stack_top)));
-        if (mprotect(page_start, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_MTE | PROT_GROWSDOWN)) {
-          async_safe_fatal("error: failed to set PROT_MTE on main thread stack: %s\n",
-                           strerror(errno));
+        void* pg_start =
+            reinterpret_cast<void*>(page_start(reinterpret_cast<uintptr_t>(stack_top)));
+        if (mprotect(pg_start, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_MTE | PROT_GROWSDOWN)) {
+          async_safe_fatal("error: failed to set PROT_MTE on main thread stack: %m");
         }
       }
 
diff --git a/libc/bionic/mmap.cpp b/libc/bionic/mmap.cpp
index ed6b9c6..f05dcb8 100644
--- a/libc/bionic/mmap.cpp
+++ b/libc/bionic/mmap.cpp
@@ -32,6 +32,7 @@
 #include <unistd.h>
 
 #include "platform/bionic/macros.h"
+#include "platform/bionic/page.h"
 #include "private/ErrnoRestorer.h"
 
 // mmap2(2) is like mmap(2), but the offset is in 4096-byte blocks, not bytes.
@@ -46,7 +47,7 @@
   }
 
   // Prevent allocations large enough for `end - start` to overflow.
-  size_t rounded = __BIONIC_ALIGN(size, PAGE_SIZE);
+  size_t rounded = __BIONIC_ALIGN(size, page_size());
   if (rounded < size || rounded > PTRDIFF_MAX) {
     errno = ENOMEM;
     return MAP_FAILED;
diff --git a/libc/bionic/mremap.cpp b/libc/bionic/mremap.cpp
index d7c9353..88ec829 100644
--- a/libc/bionic/mremap.cpp
+++ b/libc/bionic/mremap.cpp
@@ -33,12 +33,13 @@
 #include <unistd.h>
 
 #include "platform/bionic/macros.h"
+#include "platform/bionic/page.h"
 
 extern "C" void* __mremap(void*, size_t, size_t, int, void*);
 
 void* mremap(void* old_address, size_t old_size, size_t new_size, int flags, ...) {
   // prevent allocations large enough for `end - start` to overflow
-  size_t rounded = __BIONIC_ALIGN(new_size, PAGE_SIZE);
+  size_t rounded = __BIONIC_ALIGN(new_size, page_size());
   if (rounded < new_size || rounded > PTRDIFF_MAX) {
     errno = ENOMEM;
     return MAP_FAILED;
diff --git a/libc/bionic/pthread_attr.cpp b/libc/bionic/pthread_attr.cpp
index 89aa289..de4cc9e 100644
--- a/libc/bionic/pthread_attr.cpp
+++ b/libc/bionic/pthread_attr.cpp
@@ -36,8 +36,9 @@
 
 #include <async_safe/log.h>
 
-#include "private/bionic_defs.h"
+#include "platform/bionic/page.h"
 #include "private/ErrnoRestorer.h"
+#include "private/bionic_defs.h"
 #include "pthread_internal.h"
 
 __BIONIC_WEAK_FOR_NATIVE_BRIDGE
@@ -143,10 +144,10 @@
 
 __BIONIC_WEAK_FOR_NATIVE_BRIDGE
 int pthread_attr_setstack(pthread_attr_t* attr, void* stack_base, size_t stack_size) {
-  if ((stack_size & (PAGE_SIZE - 1) || stack_size < PTHREAD_STACK_MIN)) {
+  if ((stack_size & (page_size() - 1) || stack_size < PTHREAD_STACK_MIN)) {
     return EINVAL;
   }
-  if (reinterpret_cast<uintptr_t>(stack_base) & (PAGE_SIZE - 1)) {
+  if (reinterpret_cast<uintptr_t>(stack_base) & (page_size() - 1)) {
     return EINVAL;
   }
   attr->stack_base = stack_base;
@@ -157,12 +158,12 @@
 static uintptr_t __get_main_stack_startstack() {
   FILE* fp = fopen("/proc/self/stat", "re");
   if (fp == nullptr) {
-    async_safe_fatal("couldn't open /proc/self/stat: %s", strerror(errno));
+    async_safe_fatal("couldn't open /proc/self/stat: %m");
   }
 
   char line[BUFSIZ];
   if (fgets(line, sizeof(line), fp) == nullptr) {
-    async_safe_fatal("couldn't read /proc/self/stat: %s", strerror(errno));
+    async_safe_fatal("couldn't read /proc/self/stat: %m");
   }
 
   fclose(fp);
@@ -204,7 +205,7 @@
   // Hunt for the region that contains that address.
   FILE* fp = fopen("/proc/self/maps", "re");
   if (fp == nullptr) {
-    async_safe_fatal("couldn't open /proc/self/maps: %s", strerror(errno));
+    async_safe_fatal("couldn't open /proc/self/maps: %m");
   }
   char line[BUFSIZ];
   while (fgets(line, sizeof(line), fp) != nullptr) {
@@ -218,7 +219,7 @@
       }
     }
   }
-  async_safe_fatal("Stack not found in /proc/self/maps");
+  async_safe_fatal("stack not found in /proc/self/maps");
 }
 
 __BIONIC_WEAK_FOR_NATIVE_BRIDGE
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 7bf9b40..194db18 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -42,6 +42,7 @@
 
 #include "platform/bionic/macros.h"
 #include "platform/bionic/mte.h"
+#include "platform/bionic/page.h"
 #include "private/ErrnoRestorer.h"
 #include "private/ScopedRWLock.h"
 #include "private/bionic_constants.h"
@@ -71,20 +72,19 @@
 // Allocate a temporary bionic_tls that the dynamic linker's main thread can
 // use while it's loading the initial set of ELF modules.
 bionic_tls* __allocate_temp_bionic_tls() {
-  size_t allocation_size = __BIONIC_ALIGN(sizeof(bionic_tls), PAGE_SIZE);
+  size_t allocation_size = __BIONIC_ALIGN(sizeof(bionic_tls), page_size());
   void* allocation = mmap(nullptr, allocation_size,
                           PROT_READ | PROT_WRITE,
                           MAP_PRIVATE | MAP_ANONYMOUS,
                           -1, 0);
   if (allocation == MAP_FAILED) {
-    // Avoid strerror because it might need bionic_tls.
-    async_safe_fatal("failed to allocate bionic_tls: error %d", errno);
+    async_safe_fatal("failed to allocate bionic_tls: %m");
   }
   return static_cast<bionic_tls*>(allocation);
 }
 
 void __free_temp_bionic_tls(bionic_tls* tls) {
-  munmap(tls, __BIONIC_ALIGN(sizeof(bionic_tls), PAGE_SIZE));
+  munmap(tls, __BIONIC_ALIGN(sizeof(bionic_tls), page_size()));
 }
 
 static void __init_alternate_signal_stack(pthread_internal_t* thread) {
@@ -136,11 +136,13 @@
   // Make the stack read-write, and store its address in the register we're using as the shadow
   // stack pointer. This is deliberately the only place where the address is stored.
   char* scs = scs_aligned_guard_region + scs_offset;
-  mprotect(scs, SCS_SIZE, PROT_READ | PROT_WRITE);
+  if (mprotect(scs, SCS_SIZE, PROT_READ | PROT_WRITE) == -1) {
+    async_safe_fatal("shadow stack read-write mprotect(%p, %d) failed: %m", scs, SCS_SIZE);
+  }
 #if defined(__aarch64__)
   __asm__ __volatile__("mov x18, %0" ::"r"(scs));
 #elif defined(__riscv)
-  __asm__ __volatile__("mv gp, %0" ::"r"(scs));
+  __asm__ __volatile__("mv x3, %0" ::"r"(scs));
 #endif
 #endif
 }
@@ -170,12 +172,11 @@
     if (need_set) {
       if (policy == -1) {
         async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                              "pthread_create sched_getscheduler failed: %s", strerror(errno));
+                              "pthread_create sched_getscheduler failed: %m");
         return errno;
       }
       if (sched_getparam(0, &param) == -1) {
-        async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                              "pthread_create sched_getparam failed: %s", strerror(errno));
+        async_safe_format_log(ANDROID_LOG_WARN, "libc", "pthread_create sched_getparam failed: %m");
         return errno;
       }
     }
@@ -191,8 +192,8 @@
   if (need_set) {
     if (sched_setscheduler(thread->tid, policy, &param) == -1) {
       async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                            "pthread_create sched_setscheduler(%d, {%d}) call failed: %s", policy,
-                            param.sched_priority, strerror(errno));
+                            "pthread_create sched_setscheduler(%d, {%d}) call failed: %m", policy,
+                            param.sched_priority);
 #if defined(__LP64__)
       // For backwards compatibility reasons, we only report failures on 64-bit devices.
       return errno;
@@ -203,12 +204,11 @@
   return 0;
 }
 
-
 // Allocate a thread's primary mapping. This mapping includes static TLS and
 // optionally a stack. Static TLS includes ELF TLS segments and the bionic_tls
 // struct.
 //
-// The stack_guard_size must be a multiple of the PAGE_SIZE.
+// The stack_guard_size must be a multiple of the page_size().
 ThreadMapping __allocate_thread_mapping(size_t stack_size, size_t stack_guard_size) {
   const StaticTlsLayout& layout = __libc_shared_globals()->static_tls_layout;
 
@@ -220,7 +220,7 @@
 
   // Align the result to a page size.
   const size_t unaligned_size = mmap_size;
-  mmap_size = __BIONIC_ALIGN(mmap_size, PAGE_SIZE);
+  mmap_size = __BIONIC_ALIGN(mmap_size, page_size());
   if (mmap_size < unaligned_size) return {};
 
   // Create a new private anonymous map. Make the entire mapping PROT_NONE, then carve out a
@@ -228,10 +228,9 @@
   const int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE;
   char* const space = static_cast<char*>(mmap(nullptr, mmap_size, PROT_NONE, flags, -1, 0));
   if (space == MAP_FAILED) {
-    async_safe_format_log(ANDROID_LOG_WARN,
-                          "libc",
-                          "pthread_create failed: couldn't allocate %zu-bytes mapped space: %s",
-                          mmap_size, strerror(errno));
+    async_safe_format_log(ANDROID_LOG_WARN, "libc",
+                          "pthread_create failed: couldn't allocate %zu-bytes mapped space: %m",
+                          mmap_size);
     return {};
   }
   const size_t writable_size = mmap_size - stack_guard_size - PTHREAD_GUARD_SIZE;
@@ -246,8 +245,8 @@
   if (mprotect(space + stack_guard_size, writable_size, prot) != 0) {
     async_safe_format_log(
         ANDROID_LOG_WARN, "libc",
-        "pthread_create failed: couldn't mprotect %s %zu-byte thread mapping region: %s", prot_str,
-        writable_size, strerror(errno));
+        "pthread_create failed: couldn't mprotect %s %zu-byte thread mapping region: %m", prot_str,
+        writable_size);
     munmap(space, mmap_size);
     return {};
   }
@@ -271,9 +270,9 @@
   if (attr->stack_base == nullptr) {
     // The caller didn't provide a stack, so allocate one.
 
-    // Make sure the guard size is a multiple of PAGE_SIZE.
+    // Make sure the guard size is a multiple of page_size().
     const size_t unaligned_guard_size = attr->guard_size;
-    attr->guard_size = __BIONIC_ALIGN(attr->guard_size, PAGE_SIZE);
+    attr->guard_size = __BIONIC_ALIGN(attr->guard_size, page_size());
     if (attr->guard_size < unaligned_guard_size) return EAGAIN;
 
     mapping = __allocate_thread_mapping(attr->stack_size, attr->guard_size);
@@ -458,8 +457,7 @@
     if (thread->mmap_size != 0) {
       munmap(thread->mmap_base, thread->mmap_size);
     }
-    async_safe_format_log(ANDROID_LOG_WARN, "libc", "pthread_create failed: clone failed: %s",
-                          strerror(clone_errno));
+    async_safe_format_log(ANDROID_LOG_WARN, "libc", "pthread_create failed: clone failed: %m");
     return clone_errno;
   }
 
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index a3a4ccd..7efbf6d 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -137,7 +137,7 @@
   //    clobber x18 on arm64, therefore each process must declare early during
   //    process startup whether it might load legacy code.
   //    TODO: riscv64 has no legacy code, so we can actually go this route
-  //    there, but hopefully we'll actually get the Zsslpcfi extension instead.
+  //    there, but hopefully we'll actually get the Zisslpcfi extension instead.
   // 2) Mark the guard region as such using prctl(PR_SET_VMA_ANON_NAME) and
   //    discover its address by reading /proc/self/maps. One issue with this is
   //    that reading /proc/self/maps can race with allocations, so we may need
@@ -176,13 +176,6 @@
   bionic_tls* bionic_tls;
 
   int errno_value;
-
-  // The last observed value of SP in a vfork child process.
-  // The part of the stack between this address and the value of SP when the vfork parent process
-  // regains control may have stale MTE tags and needs cleanup. This field is only meaningful while
-  // the parent is waiting for the vfork child to return control by calling either exec*() or
-  // exit().
-  void* vfork_child_stack_bottom;
 };
 
 struct ThreadMapping {
diff --git a/libc/bionic/strtold.cpp b/libc/bionic/strtold.cpp
index 6b673e6..c55dd61 100644
--- a/libc/bionic/strtold.cpp
+++ b/libc/bionic/strtold.cpp
@@ -26,8 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#define __BIONIC_LP32_USE_LONG_DOUBLE
-
 #include <float.h>
 #include <stdlib.h>
 
diff --git a/libc/bionic/sysconf.cpp b/libc/bionic/sysconf.cpp
index 1c06c9e..3906e2e 100644
--- a/libc/bionic/sysconf.cpp
+++ b/libc/bionic/sysconf.cpp
@@ -38,6 +38,7 @@
 #include <time.h>
 #include <unistd.h>
 
+#include "platform/bionic/page.h"
 #include "private/bionic_tls.h"
 
 static long __sysconf_rlimit(int resource) {
diff --git a/libc/bionic/sysinfo.cpp b/libc/bionic/sysinfo.cpp
index 1e4a0e8..79fd55e 100644
--- a/libc/bionic/sysinfo.cpp
+++ b/libc/bionic/sysinfo.cpp
@@ -33,8 +33,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "private/get_cpu_count_from_string.h"
+#include "platform/bionic/page.h"
 #include "private/ScopedReaddir.h"
+#include "private/get_cpu_count_from_string.h"
 
 int __get_cpu_count(const char* sys_file) {
   int cpu_count = 1;
@@ -64,11 +65,11 @@
 long get_phys_pages() {
   struct sysinfo si;
   sysinfo(&si);
-  return (static_cast<int64_t>(si.totalram) * si.mem_unit) / PAGE_SIZE;
+  return (static_cast<int64_t>(si.totalram) * si.mem_unit) / page_size();
 }
 
 long get_avphys_pages() {
   struct sysinfo si;
   sysinfo(&si);
-  return ((static_cast<int64_t>(si.freeram) + si.bufferram) * si.mem_unit) / PAGE_SIZE;
+  return ((static_cast<int64_t>(si.freeram) + si.bufferram) * si.mem_unit) / page_size();
 }
diff --git a/libc/bionic/syslog.cpp b/libc/bionic/syslog.cpp
index 6b17d26..a459c6b 100644
--- a/libc/bionic/syslog.cpp
+++ b/libc/bionic/syslog.cpp
@@ -18,18 +18,22 @@
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
+#include <unistd.h>
 
 #include <async_safe/log.h>
 
 static const char* syslog_log_tag = nullptr;
 static int syslog_priority_mask = 0xff;
+static int syslog_options = 0;
 
 void closelog() {
   syslog_log_tag = nullptr;
+  syslog_options = 0;
 }
 
-void openlog(const char* log_tag, int /*options*/, int /*facility*/) {
+void openlog(const char* log_tag, int options, int /*facility*/) {
   syslog_log_tag = log_tag;
+  syslog_options = options;
 }
 
 int setlogmask(int new_mask) {
@@ -73,10 +77,16 @@
     android_log_priority = ANDROID_LOG_DEBUG;
   }
 
-  // We can't let async_safe_format_log do the formatting because it doesn't support
-  // all the printf functionality.
+  // We can't let async_safe_format_log do the formatting because it doesn't
+  // support all the printf functionality.
   char log_line[1024];
-  vsnprintf(log_line, sizeof(log_line), fmt, args);
+  int n = vsnprintf(log_line, sizeof(log_line), fmt, args);
+  if (n < 0) return;
 
   async_safe_format_log(android_log_priority, log_tag, "%s", log_line);
+  if ((syslog_options & LOG_PERROR) != 0) {
+    bool have_newline =
+        (n > 0 && n < static_cast<int>(sizeof(log_line)) && log_line[n - 1] == '\n');
+    dprintf(STDERR_FILENO, "%s: %s%s", log_tag, log_line, have_newline ? "" : "\n");
+  }
 }
diff --git a/libc/bionic/system_property_set.cpp b/libc/bionic/system_property_set.cpp
index 212aafc..f7999db 100644
--- a/libc/bionic/system_property_set.cpp
+++ b/libc/bionic/system_property_set.cpp
@@ -272,10 +272,9 @@
     PropertyServiceConnection connection;
     if (!connection.IsValid()) {
       errno = connection.GetLastError();
-      async_safe_format_log(
-          ANDROID_LOG_WARN, "libc",
-          "Unable to set property \"%s\" to \"%s\": connection failed; errno=%d (%s)", key, value,
-          errno, strerror(errno));
+      async_safe_format_log(ANDROID_LOG_WARN, "libc",
+                            "Unable to set property \"%s\" to \"%s\": connection failed: %m", key,
+                            value);
       return -1;
     }
 
@@ -283,8 +282,8 @@
     if (!writer.WriteUint32(PROP_MSG_SETPROP2).WriteString(key).WriteString(value).Send()) {
       errno = connection.GetLastError();
       async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                            "Unable to set property \"%s\" to \"%s\": write failed; errno=%d (%s)",
-                            key, value, errno, strerror(errno));
+                            "Unable to set property \"%s\" to \"%s\": write failed: %m", key,
+                            value);
       return -1;
     }
 
@@ -292,8 +291,7 @@
     if (!connection.RecvInt32(&result)) {
       errno = connection.GetLastError();
       async_safe_format_log(ANDROID_LOG_WARN, "libc",
-                            "Unable to set property \"%s\" to \"%s\": recv failed; errno=%d (%s)",
-                            key, value, errno, strerror(errno));
+                            "Unable to set property \"%s\" to \"%s\": recv failed: %m", key, value);
       return -1;
     }
 
diff --git a/libc/bionic/timespec_get.cpp b/libc/bionic/time.cpp
similarity index 89%
rename from libc/bionic/timespec_get.cpp
rename to libc/bionic/time.cpp
index 7fc2182..800395e 100644
--- a/libc/bionic/timespec_get.cpp
+++ b/libc/bionic/time.cpp
@@ -29,5 +29,9 @@
 #include <time.h>
 
 int timespec_get(timespec* ts, int base) {
-  return (base == TIME_UTC && clock_gettime(CLOCK_REALTIME, ts) != -1) ? base : 0;
+  return (clock_gettime(base - 1, ts) != -1) ? base : 0;
+}
+
+int timespec_getres(timespec* ts, int base) {
+  return (clock_getres(base - 1, ts) != -1) ? base : 0;
 }
diff --git a/libc/bionic/wchar.cpp b/libc/bionic/wchar.cpp
index bd9a45e..bb97b3e 100644
--- a/libc/bionic/wchar.cpp
+++ b/libc/bionic/wchar.cpp
@@ -135,6 +135,7 @@
 size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps) {
   return mbsnrtowcs(dst, src, SIZE_MAX, len, ps);
 }
+__strong_alias(mbsrtowcs_l, mbsrtowcs);
 
 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps) {
   static mbstate_t __private_state;
@@ -210,3 +211,4 @@
 size_t wcsrtombs(char* dst, const wchar_t** src, size_t len, mbstate_t* ps) {
   return wcsnrtombs(dst, src, SIZE_MAX, len, ps);
 }
+__strong_alias(wcsrtombs_l, wcsrtombs);
diff --git a/libc/bionic/wchar_l.cpp b/libc/bionic/wchar_l.cpp
index a86961f..1e7a231 100644
--- a/libc/bionic/wchar_l.cpp
+++ b/libc/bionic/wchar_l.cpp
@@ -41,14 +41,6 @@
   return wcscoll(ws1, ws2);
 }
 
-size_t wcsftime_l(wchar_t* buf, size_t n, const wchar_t* fmt, const struct tm* tm, locale_t) {
-  return wcsftime(buf, n, fmt, tm);
-}
-
-size_t wcsxfrm_l(wchar_t* dst, const wchar_t* src, size_t n, locale_t) {
-  return wcsxfrm(dst, src, n);
-}
-
 double wcstod_l(const wchar_t* s, wchar_t** end_ptr, locale_t) {
   return wcstod(s, end_ptr);
 }
@@ -76,3 +68,7 @@
 long double wcstold_l(const wchar_t* s, wchar_t** end_ptr, locale_t) {
   return wcstold(s, end_ptr);
 }
+
+size_t wcsxfrm_l(wchar_t* dst, const wchar_t* src, size_t n, locale_t) {
+  return wcsxfrm(dst, src, n);
+}
diff --git a/libc/bionic/wcstod.cpp b/libc/bionic/wcstod.cpp
index 75a59f5..c82d788 100644
--- a/libc/bionic/wcstod.cpp
+++ b/libc/bionic/wcstod.cpp
@@ -26,8 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#define __BIONIC_LP32_USE_LONG_DOUBLE
-
 #include <wchar.h>
 
 #include <stdlib.h>
diff --git a/libc/include/android/dlext.h b/libc/include/android/dlext.h
index f216aab..a5061c7 100644
--- a/libc/include/android/dlext.h
+++ b/libc/include/android/dlext.h
@@ -177,11 +177,8 @@
  * Opens the given library. The `__filename` and `__flags` arguments are
  * the same as for [dlopen(3)](http://man7.org/linux/man-pages/man3/dlopen.3.html),
  * with the Android-specific flags supplied via the `flags` member of `__info`.
- *
- * Available since API level 21.
  */
-void* _Nullable android_dlopen_ext(const char* _Nullable __filename, int __flags, const android_dlextinfo* _Nullable __info)
-  __INTRODUCED_IN(21);
+void* _Nullable android_dlopen_ext(const char* _Nullable __filename, int __flags, const android_dlextinfo* _Nullable __info);
 
 __END_DECLS
 
diff --git a/libc/include/android/set_abort_message.h b/libc/include/android/set_abort_message.h
index 2be01a9..35867ac 100644
--- a/libc/include/android/set_abort_message.h
+++ b/libc/include/android/set_abort_message.h
@@ -43,9 +43,7 @@
  * This is meant for use by libraries that deliberately abort so that they can
  * provide an explanation. It is used within bionic to implement assert() and
  * all FORTIFY/fdsan aborts.
- *
- * Available since API level 21.
  */
-void android_set_abort_message(const char* _Nullable __msg) __INTRODUCED_IN(21);
+void android_set_abort_message(const char* _Nullable __msg);
 
 __END_DECLS
diff --git a/libc/include/android/versioning.h b/libc/include/android/versioning.h
index efe4354..08fe45d 100644
--- a/libc/include/android/versioning.h
+++ b/libc/include/android/versioning.h
@@ -26,9 +26,6 @@
 #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
 #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
 #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
-#define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
-#define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
-#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in_x86=" #api_level))) __VERSIONER_NO_GUARD
 
 #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
 #define __VERSIONER_FORTIFY_INLINE __attribute__((annotate("versioner_fortify_inline")))
@@ -52,11 +49,9 @@
 #if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
 #define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,__what)))
 #define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN(api_level)
-#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
 #else
 #define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
 #define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level)
-#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level)
 #endif
 
 #define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
@@ -69,12 +64,6 @@
 //
 // void foo() __INTRODUCED_IN_32(30) __INTRODUCED_IN_64(31);
 //
-// This also takes the advantage of the fact that we never use bitness-specific macro with
-// arch-specific macro. In other words,
-//
-// void foo() __INTRODUCED_IN_ARM(30) __INTRODUCED_IN_64(31);
-//
-// hasn't been supported and won't be.
 #if !defined(__LP64__)
 #define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_64(api_level)
@@ -83,17 +72,6 @@
 #define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #endif
 
-#if defined(__arm__) || defined(__aarch64__)
-#define __INTRODUCED_IN_ARM(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
-#define __INTRODUCED_IN_X86(api_level)
-#elif defined(__i386__) || defined(__x86_64__)
-#define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
-#else
-#define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level)
-#endif
-
 #define __VERSIONER_NO_GUARD
 #define __VERSIONER_FORTIFY_INLINE
 
diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h
index db054c9..f00f2c1 100644
--- a/libc/include/arpa/inet.h
+++ b/libc/include/arpa/inet.h
@@ -36,17 +36,17 @@
 
 __BEGIN_DECLS
 
-in_addr_t inet_addr(const char* __s);
-int inet_aton(const char* __s, struct in_addr* __addr);
-in_addr_t inet_lnaof(struct in_addr __addr) __INTRODUCED_IN(21);
-struct in_addr inet_makeaddr(in_addr_t __net, in_addr_t __host) __INTRODUCED_IN(21);
-in_addr_t inet_netof(struct in_addr __addr) __INTRODUCED_IN(21);
-in_addr_t inet_network(const char* __s) __INTRODUCED_IN(21);
-char* inet_ntoa(struct in_addr __addr);
-const char* inet_ntop(int __af, const void* __src, char* __dst, socklen_t __size);
-unsigned int inet_nsap_addr(const char* __ascii, unsigned char* __binary, int __n);
-char* inet_nsap_ntoa(int __binary_length, const unsigned char* __binary, char* __ascii);
-int inet_pton(int __af, const char* __src, void* __dst);
+in_addr_t inet_addr(const char* _Nonnull __s);
+int inet_aton(const char* _Nonnull __s, struct in_addr* _Nullable __addr);
+in_addr_t inet_lnaof(struct in_addr __addr);
+struct in_addr inet_makeaddr(in_addr_t __net, in_addr_t __host);
+in_addr_t inet_netof(struct in_addr __addr);
+in_addr_t inet_network(const char* _Nonnull __s);
+char* _Nonnull inet_ntoa(struct in_addr __addr);
+const char* _Nullable inet_ntop(int __af, const void* _Nonnull __src, char* _Nonnull __dst, socklen_t __size);
+unsigned int inet_nsap_addr(const char* _Nonnull __ascii, unsigned char* _Nonnull __binary, int __n);
+char* _Nonnull inet_nsap_ntoa(int __binary_length, const unsigned char* _Nonnull __binary, char* _Nullable __ascii);
+int inet_pton(int __af, const char* _Nonnull __src, void* _Nonnull __dst);
 
 __END_DECLS
 
diff --git a/libc/include/arpa/nameser.h b/libc/include/arpa/nameser.h
index 89ece1c..97109ee 100644
--- a/libc/include/arpa/nameser.h
+++ b/libc/include/arpa/nameser.h
@@ -113,6 +113,8 @@
 typedef const u_char *ns_nname_ct;
 typedef u_char *ns_nname_t;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 struct ns_namemap { ns_nname_ct base; int len; };
 typedef struct ns_namemap *ns_namemap_t;
 typedef const struct ns_namemap *ns_namemap_ct;
@@ -269,6 +271,8 @@
 };
 typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
 
+#pragma clang diagnostic pop
+
 #define NS_TSIG_FUDGE 300
 #define NS_TSIG_TCP_COUNT 100
 #define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
@@ -519,102 +523,53 @@
 
 #if !defined(__LP64__)
 /* Annoyingly, LP32 shipped with __ names. */
-#define	ns_msg_getflag		__ns_msg_getflag
-#define ns_get16		__ns_get16
-#define ns_get32		__ns_get32
-#define ns_put16		__ns_put16
-#define ns_put32		__ns_put32
-#define ns_initparse		__ns_initparse
-#define ns_skiprr		__ns_skiprr
-#define ns_parserr		__ns_parserr
-#define ns_parserr2		__ns_parserr2
-#define	ns_sprintrr		__ns_sprintrr
-#define	ns_sprintrrf		__ns_sprintrrf
-#define	ns_format_ttl		__ns_format_ttl
-#define	ns_parse_ttl		__ns_parse_ttl
-#define ns_datetosecs		__ns_datetosecs
-#define	ns_name_ntol		__ns_name_ntol
-#define	ns_name_ntop		__ns_name_ntop
-#define	ns_name_pton		__ns_name_pton
-#define	ns_name_pton2		__ns_name_pton2
-#define	ns_name_unpack		__ns_name_unpack
-#define	ns_name_unpack2		__ns_name_unpack2
-#define	ns_name_pack		__ns_name_pack
-#define	ns_name_compress	__ns_name_compress
-#define	ns_name_uncompress	__ns_name_uncompress
-#define	ns_name_skip		__ns_name_skip
-#define	ns_name_rollback	__ns_name_rollback
-#define	ns_name_length		__ns_name_length
-#define	ns_name_eq		__ns_name_eq
-#define	ns_name_owned		__ns_name_owned
-#define	ns_name_map		__ns_name_map
-#define	ns_name_labels		__ns_name_labels
-#define	ns_sign			__ns_sign
-#define	ns_sign2		__ns_sign2
-#define	ns_sign_tcp		__ns_sign_tcp
-#define	ns_sign_tcp2		__ns_sign_tcp2
-#define	ns_sign_tcp_init	__ns_sign_tcp_init
-#define ns_find_tsig		__ns_find_tsig
-#define	ns_verify		__ns_verify
-#define	ns_verify_tcp		__ns_verify_tcp
-#define	ns_verify_tcp_init	__ns_verify_tcp_init
-#define	ns_samedomain		__ns_samedomain
-#define	ns_subdomain		__ns_subdomain
-#define	ns_makecanon		__ns_makecanon
-#define	ns_samename		__ns_samename
+#define ns_format_ttl __ns_format_ttl
+#define ns_get16 __ns_get16
+#define ns_get32 __ns_get32
+#define ns_initparse __ns_initparse
+#define ns_makecanon __ns_makecanon
+#define ns_msg_getflag __ns_msg_getflag
+#define ns_name_compress __ns_name_compress
+#define ns_name_ntol __ns_name_ntol
+#define ns_name_ntop __ns_name_ntop
+#define ns_name_pack __ns_name_pack
+#define ns_name_pton __ns_name_pton
+#define ns_name_rollback __ns_name_rollback
+#define ns_name_skip __ns_name_skip
+#define ns_name_uncompress __ns_name_uncompress
+#define ns_name_unpack __ns_name_unpack
+#define ns_parserr __ns_parserr
+#define ns_put16 __ns_put16
+#define ns_put32 __ns_put32
+#define ns_samename __ns_samename
+#define ns_skiprr __ns_skiprr
+#define ns_sprintrr __ns_sprintrr
+#define ns_sprintrrf __ns_sprintrrf
+#endif
 
-int ns_msg_getflag(ns_msg __handle, int __flag);
-uint16_t ns_get16(const u_char* __src);
-uint32_t ns_get32(const u_char* __src);
-void ns_put16(uint16_t __src, u_char* __dst);
-void ns_put32(uint32_t __src, u_char* __dst);
-int ns_initparse(const u_char* __msg, int __msg_size, ns_msg* __handle);
-int ns_skiprr(const u_char* __ptr, const u_char* __eom, ns_sect __section, int __count);
-int ns_parserr(ns_msg* __handle, ns_sect __section, int __rr_number, ns_rr* __rr);
-int ns_sprintrr(const ns_msg* __handle, const ns_rr* __rr, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size);
-int ns_sprintrrf(const u_char* __msg, size_t __msg_size, const char* __name, ns_class __class, ns_type __type, u_long __ttl, const u_char* __rdata, size_t __rdata_size, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size);
-int ns_format_ttl(u_long __ttl, char* __dst, size_t __dst_size);
-int ns_name_ntol(const u_char* __src, u_char* __dst, size_t __dst_size);
-int ns_name_ntop(const u_char* __src, char* __dst, size_t __dst_size);
-int ns_name_pton(const char* __src, u_char* __dst, size_t __dst_size);
-int ns_name_unpack(const u_char* __msg, const u_char* __eom, const u_char* __src, u_char* __dst, size_t __dst_size);
-int ns_name_pack(const u_char* __src, u_char* __dst, int __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr);
-int ns_name_uncompress(const u_char* __msg, const u_char* __eom, const u_char* __src, char* __dst, size_t __dst_size);
-int ns_name_compress(const char* __src, u_char* __dst, size_t __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr);
-int ns_name_skip(const u_char** __ptr_ptr, const u_char* __eom);
-void ns_name_rollback(const u_char* __src, const u_char** __dn_ptrs, const u_char** __last_dn_ptr);
+int ns_msg_getflag(ns_msg __handle, int __flag) __INTRODUCED_IN(22);
+uint16_t ns_get16(const u_char* _Nonnull __src) __INTRODUCED_IN(22);
+uint32_t ns_get32(const u_char* _Nonnull __src) __INTRODUCED_IN(22);
+void ns_put16(uint16_t __src, u_char* _Nonnull __dst) __INTRODUCED_IN(22);
+void ns_put32(uint32_t __src, u_char* _Nonnull __dst) __INTRODUCED_IN(22);
+int ns_initparse(const u_char* _Nonnull __msg, int __msg_size, ns_msg* _Nonnull __handle) __INTRODUCED_IN(22);
+int ns_skiprr(const u_char* _Nonnull __ptr, const u_char* _Nonnull __eom, ns_sect __section, int __count) __INTRODUCED_IN(22);
+int ns_parserr(ns_msg* _Nonnull __handle, ns_sect __section, int __rr_number, ns_rr* _Nonnull __rr) __INTRODUCED_IN(22);
+int ns_sprintrr(const ns_msg* _Nonnull  __handle, const ns_rr* _Nonnull __rr, const char* _Nullable __name_ctx, const char* _Nullable __origin, char* _Nonnull __buf, size_t __buf_size) __INTRODUCED_IN(22);
+int ns_sprintrrf(const u_char* _Nonnull __msg, size_t __msg_size, const char* _Nonnull __name, ns_class __class, ns_type __type, u_long __ttl, const u_char* _Nonnull __rdata, size_t __rdata_size, const char* _Nullable __name_ctx, const char* _Nullable __origin, char* _Nonnull __buf, size_t __buf_size) __INTRODUCED_IN(22);
+int ns_format_ttl(u_long __ttl, char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_ntol(const u_char* _Nonnull __src, u_char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_ntop(const u_char* _Nonnull __src, char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_pton(const char* _Nonnull __src, u_char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_unpack(const u_char* _Nonnull __msg, const u_char* _Nonnull __eom, const u_char* _Nonnull __src, u_char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_pack(const u_char* _Nonnull __src, u_char* _Nonnull __dst, int __dst_size, const u_char* _Nullable * _Nullable __dn_ptrs, const u_char* _Nullable * _Nullable __last_dn_ptr) __INTRODUCED_IN(22);
+int ns_name_uncompress(const u_char* _Nonnull __msg, const u_char* _Nonnull __eom, const u_char* _Nonnull __src, char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_name_compress(const char* _Nonnull __src, u_char* _Nonnull __dst, size_t __dst_size, const u_char* _Nullable * _Nullable __dn_ptrs, const u_char* _Nullable * _Nullable __last_dn_ptr) __INTRODUCED_IN(22);
+int ns_name_skip(const u_char* _Nullable * _Nonnull __ptr_ptr, const u_char* _Nonnull __eom) __INTRODUCED_IN(22);
+void ns_name_rollback(const u_char* _Nonnull __src, const u_char* _Nullable * _Nonnull __dn_ptrs, const u_char* _Nullable * _Nonnull __last_dn_ptr) __INTRODUCED_IN(22);
 
-int ns_makecanon(const char* __src, char* __dst, size_t __dst_size);
-int ns_samename(const char* __lhs, const char* __rhs);
-
-#else
-/* The names of these symbols were accidentally prefixed with __ in L. */
-/* The duplication here is intentional to avoid declaring different symbols with the same
- * declaration. */
-int ns_msg_getflag(ns_msg __handle, int __flag) __INTRODUCED_IN_64(22);
-uint16_t ns_get16(const u_char* __src) __INTRODUCED_IN_64(22);
-uint32_t ns_get32(const u_char* __src) __INTRODUCED_IN_64(22);
-void ns_put16(uint16_t __src, u_char* __dst) __INTRODUCED_IN_64(22);
-void ns_put32(uint32_t __src, u_char* __dst) __INTRODUCED_IN_64(22);
-int ns_initparse(const u_char* __msg, int __msg_size, ns_msg* __handle) __INTRODUCED_IN_64(22);
-int ns_skiprr(const u_char* __ptr, const u_char* __eom, ns_sect __section, int __count) __INTRODUCED_IN_64(22);
-int ns_parserr(ns_msg* __handle, ns_sect __section, int __rr_number, ns_rr* __rr) __INTRODUCED_IN_64(22);
-int ns_sprintrr(const ns_msg* __handle, const ns_rr* __rr, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size) __INTRODUCED_IN_64(22);
-int ns_sprintrrf(const u_char* __msg, size_t __msg_size, const char* __name, ns_class __class, ns_type __type, u_long __ttl, const u_char* __rdata, size_t __rdata_size, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size) __INTRODUCED_IN_64(22);
-int ns_format_ttl(u_long __ttl, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_ntol(const u_char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_ntop(const u_char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_pton(const char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_unpack(const u_char* __msg, const u_char* __eom, const u_char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_pack(const u_char* __src, u_char* __dst, int __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(22);
-int ns_name_uncompress(const u_char* __msg, const u_char* __eom, const u_char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_name_compress(const char* __src, u_char* __dst, size_t __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(22);
-int ns_name_skip(const u_char** __ptr_ptr, const u_char* __eom) __INTRODUCED_IN_64(22);
-void ns_name_rollback(const u_char* __src, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(22);
-
-int ns_makecanon(const char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(22);
-int ns_samename(const char* __lhs, const char* __rhs) __INTRODUCED_IN_64(22);
-#endif /* !defined(__LP64__) */
+int ns_makecanon(const char* _Nonnull __src, char* _Nonnull __dst, size_t __dst_size) __INTRODUCED_IN(22);
+int ns_samename(const char* _Nonnull __lhs, const char* _Nonnull __rhs) __INTRODUCED_IN(22);
 
 __END_DECLS
 
diff --git a/libc/include/assert.h b/libc/include/assert.h
index 8db970b..750d12e 100644
--- a/libc/include/assert.h
+++ b/libc/include/assert.h
@@ -64,7 +64,8 @@
 # endif
 #endif
 
-#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L
+/* `static_assert` is a keyword in C++11 and C23; C11 had `_Static_assert` instead. */
+#if !defined(__cplusplus) && (__STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L)
 # undef static_assert
 # define static_assert _Static_assert
 #endif
diff --git a/libc/include/bits/ctype_inlines.h b/libc/include/bits/ctype_inlines.h
index 744eb91..089a642 100644
--- a/libc/include/bits/ctype_inlines.h
+++ b/libc/include/bits/ctype_inlines.h
@@ -61,7 +61,7 @@
 __BEGIN_DECLS
 
 /** Internal implementation detail. Do not use. */
-extern const char* _ctype_;
+extern const char* _Nonnull _ctype_;
 
 /** Returns true if `ch` is in `[A-Za-z0-9]`. */
 __BIONIC_CTYPE_INLINE int isalnum(int __ch) {
@@ -175,33 +175,33 @@
 
 #if __ANDROID_API__ >= 21
 /** Like isalnum but with an ignored `locale_t`. */
-int isalnum_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isalnum_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isalpha but with an ignored `locale_t`. */
-int isalpha_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isalpha_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isblank but with an ignored `locale_t`. */
-int isblank_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isblank_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like iscntrl but with an ignored `locale_t`. */
-int iscntrl_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int iscntrl_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isdigit but with an ignored `locale_t`. */
-int isdigit_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isdigit_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isgraph but with an ignored `locale_t`. */
-int isgraph_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isgraph_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like islower but with an ignored `locale_t`. */
-int islower_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int islower_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isprint but with an ignored `locale_t`. */
-int isprint_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isprint_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like ispunct but with an ignored `locale_t`. */
-int ispunct_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int ispunct_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isspace but with an ignored `locale_t`. */
-int isspace_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isspace_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isupper but with an ignored `locale_t`. */
-int isupper_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isupper_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like isxdigit but with an ignored `locale_t`. */
-int isxdigit_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isxdigit_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like tolower but with an ignored `locale_t`. */
-int tolower_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int tolower_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 /** Like toupper but with an ignored `locale_t`. */
-int toupper_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int toupper_l(int __ch, locale_t _Nonnull __l) __INTRODUCED_IN(21);
 #else
 // Implemented as static inlines in libc++ before 21.
 #endif
diff --git a/libc/include/bits/fortify/fcntl.h b/libc/include/bits/fortify/fcntl.h
index 1f6ebad..05c62eb 100644
--- a/libc/include/bits/fortify/fcntl.h
+++ b/libc/include/bits/fortify/fcntl.h
@@ -30,13 +30,13 @@
 #error "Never include this file directly; instead, include <fcntl.h>"
 #endif
 
-int __open_2(const char*, int) __INTRODUCED_IN(17);
-int __openat_2(int, const char*, int) __INTRODUCED_IN(17);
+int __open_2(const char* _Nonnull, int);
+int __openat_2(int, const char* _Nonnull, int);
 /*
  * These are the easiest way to call the real open even in clang FORTIFY.
  */
-int __open_real(const char*, int, ...) __RENAME(open);
-int __openat_real(int, const char*, int, ...) __RENAME(openat);
+int __open_real(const char* _Nonnull, int, ...) __RENAME(open);
+int __openat_real(int, const char* _Nonnull, int, ...) __RENAME(openat);
 
 #if defined(__BIONIC_FORTIFY)
 #define __open_too_many_args_error "too many arguments"
@@ -46,7 +46,7 @@
 #define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
-int open(const char* pathname, int flags, mode_t modes, ...) __overloadable
+int open(const char* _Nonnull pathname, int flags, mode_t modes, ...) __overloadable
         __errorattr(__open_too_many_args_error);
 
 /*
@@ -56,7 +56,7 @@
  * open(const char *, int, ...).
  */
 __BIONIC_FORTIFY_INLINE
-int open(const char* const __pass_object_size pathname, int flags)
+int open(const char* _Nonnull const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'open' " __open_too_few_args_error) {
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
@@ -67,7 +67,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-int open(const char* const __pass_object_size pathname, int flags, mode_t modes)
+int open(const char* _Nonnull const __pass_object_size pathname, int flags, mode_t modes)
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'open' " __open_useless_modes_warning) {
@@ -75,12 +75,12 @@
 }
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
-int openat(int dirfd, const char* pathname, int flags, mode_t modes, ...)
+int openat(int dirfd, const char* _Nonnull pathname, int flags, mode_t modes, ...)
         __overloadable
         __errorattr(__open_too_many_args_error);
 
 __BIONIC_FORTIFY_INLINE
-int openat(int dirfd, const char* const __pass_object_size pathname, int flags)
+int openat(int dirfd, const char* _Nonnull const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'openat' " __open_too_few_args_error) {
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
@@ -91,7 +91,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-int openat(int dirfd, const char* const __pass_object_size pathname, int flags, mode_t modes)
+int openat(int dirfd, const char* _Nonnull const __pass_object_size pathname, int flags, mode_t modes)
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'openat' " __open_useless_modes_warning) {
@@ -101,18 +101,18 @@
 /* Note that open == open64, so we reuse those bits in the open64 variants below.  */
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
-int open64(const char* pathname, int flags, mode_t modes, ...) __overloadable
+int open64(const char* _Nonnull pathname, int flags, mode_t modes, ...) __overloadable
         __errorattr(__open_too_many_args_error);
 
 __BIONIC_FORTIFY_INLINE
-int open64(const char* const __pass_object_size pathname, int flags)
+int open64(const char* _Nonnull const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'open64' " __open_too_few_args_error) {
     return open(pathname, flags);
 }
 
 __BIONIC_FORTIFY_INLINE
-int open64(const char* const __pass_object_size pathname, int flags, mode_t modes)
+int open64(const char* _Nonnull const __pass_object_size pathname, int flags, mode_t modes)
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'open64' " __open_useless_modes_warning) {
@@ -120,19 +120,19 @@
 }
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
-int openat64(int dirfd, const char* pathname, int flags, mode_t modes, ...)
+int openat64(int dirfd, const char* _Nonnull pathname, int flags, mode_t modes, ...)
         __overloadable
         __errorattr(__open_too_many_args_error);
 
 __BIONIC_FORTIFY_INLINE
-int openat64(int dirfd, const char* const __pass_object_size pathname, int flags)
+int openat64(int dirfd, const char* _Nonnull const __pass_object_size pathname, int flags)
         __overloadable
         __clang_error_if(__open_modes_useful(flags), "'openat64' " __open_too_few_args_error) {
     return openat(dirfd, pathname, flags);
 }
 
 __BIONIC_FORTIFY_INLINE
-int openat64(int dirfd, const char* const __pass_object_size pathname, int flags, mode_t modes)
+int openat64(int dirfd, const char* _Nonnull const __pass_object_size pathname, int flags, mode_t modes)
         __overloadable
         __clang_warning_if(!__open_modes_useful(flags) && modes,
                            "'openat64' " __open_useless_modes_warning) {
diff --git a/libc/include/bits/fortify/poll.h b/libc/include/bits/fortify/poll.h
index 0b5cd4b..f2e27d7 100644
--- a/libc/include/bits/fortify/poll.h
+++ b/libc/include/bits/fortify/poll.h
@@ -30,9 +30,9 @@
 #error "Never include this file directly; instead, include <poll.h>"
 #endif
 
-int __poll_chk(struct pollfd*, nfds_t, int, size_t) __INTRODUCED_IN(23);
-int __ppoll_chk(struct pollfd*, nfds_t, const struct timespec*, const sigset_t*, size_t) __INTRODUCED_IN(23);
-int __ppoll64_chk(struct pollfd*, nfds_t, const struct timespec*, const sigset64_t*, size_t) __INTRODUCED_IN(28);
+int __poll_chk(struct pollfd* _Nullable, nfds_t, int, size_t) __INTRODUCED_IN(23);
+int __ppoll_chk(struct pollfd* _Nullable, nfds_t, const struct timespec* _Nullable, const sigset_t* _Nullable, size_t) __INTRODUCED_IN(23);
+int __ppoll64_chk(struct pollfd* _Nullable, nfds_t, const struct timespec* _Nullable, const sigset64_t* _Nullable, size_t) __INTRODUCED_IN(28);
 
 #if defined(__BIONIC_FORTIFY)
 #define __bos_fd_count_trivially_safe(bos_val, fds, fd_count)              \
@@ -40,7 +40,7 @@
                                (fd_count) <= __BIONIC_CAST(static_cast, nfds_t, -1) / sizeof(*fds))
 
 __BIONIC_FORTIFY_INLINE
-int poll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, int timeout)
+int poll(struct pollfd* _Nullable const fds __pass_object_size, nfds_t fd_count, int timeout)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos(fds), sizeof(*fds) * fd_count),
                      "in call to 'poll', fd_count is larger than the given buffer") {
@@ -55,7 +55,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-int ppoll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, const struct timespec* timeout, const sigset_t* mask)
+int ppoll(struct pollfd* _Nullable const fds __pass_object_size, nfds_t fd_count, const struct timespec* _Nullable timeout, const sigset_t* _Nullable mask)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos(fds), sizeof(*fds) * fd_count),
                      "in call to 'ppoll', fd_count is larger than the given buffer") {
@@ -71,7 +71,7 @@
 
 #if __ANDROID_API__ >= 28
 __BIONIC_FORTIFY_INLINE
-int ppoll64(struct pollfd* const fds __pass_object_size, nfds_t fd_count, const struct timespec* timeout, const sigset64_t* mask)
+int ppoll64(struct pollfd* _Nullable const fds __pass_object_size, nfds_t fd_count, const struct timespec* _Nullable timeout, const sigset64_t* _Nullable mask)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos(fds), sizeof(*fds) * fd_count),
                      "in call to 'ppoll64', fd_count is larger than the given buffer") {
diff --git a/libc/include/bits/fortify/socket.h b/libc/include/bits/fortify/socket.h
index 9e7df6d..02f94cc 100644
--- a/libc/include/bits/fortify/socket.h
+++ b/libc/include/bits/fortify/socket.h
@@ -30,15 +30,14 @@
 #error "Never include this file directly; instead, include <sys/socket.h>"
 #endif
 
-extern ssize_t __sendto_chk(int, const void*, size_t, size_t, int, const struct sockaddr*,
+extern ssize_t __sendto_chk(int, const void* _Nonnull, size_t, size_t, int, const struct sockaddr* _Nullable,
         socklen_t) __INTRODUCED_IN(26);
-ssize_t __recvfrom_chk(int, void*, size_t, size_t, int, struct sockaddr*,
-        socklen_t*) __INTRODUCED_IN(21);
+ssize_t __recvfrom_chk(int, void* _Nullable, size_t, size_t, int, struct sockaddr* _Nullable, socklen_t* _Nullable);
 
 #if defined(__BIONIC_FORTIFY)
 
 __BIONIC_FORTIFY_INLINE
-ssize_t recvfrom(int fd, void* const buf __pass_object_size0, size_t len, int flags, struct sockaddr* src_addr, socklen_t* addr_len)
+ssize_t recvfrom(int fd, void* _Nullable const buf __pass_object_size0, size_t len, int flags, struct sockaddr* _Nullable src_addr, socklen_t* _Nullable addr_len)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos0(buf), len),
                      "'recvfrom' called with size bigger than buffer") {
@@ -53,7 +52,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t sendto(int fd, const void* const buf __pass_object_size0, size_t len, int flags, const struct sockaddr* dest_addr, socklen_t addr_len)
+ssize_t sendto(int fd, const void* _Nonnull const buf __pass_object_size0, size_t len, int flags, const struct sockaddr* _Nullable dest_addr, socklen_t addr_len)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos0(buf), len),
                      "'sendto' called with size bigger than buffer") {
@@ -68,7 +67,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t recv(int socket, void* const buf __pass_object_size0, size_t len, int flags)
+ssize_t recv(int socket, void* _Nullable const buf __pass_object_size0, size_t len, int flags)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos0(buf), len),
                      "'recv' called with size bigger than buffer") {
@@ -76,7 +75,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t send(int socket, const void* const buf __pass_object_size0, size_t len, int flags)
+ssize_t send(int socket, const void* _Nonnull const buf __pass_object_size0, size_t len, int flags)
     __overloadable
     __clang_error_if(__bos_unevaluated_lt(__bos0(buf), len),
                      "'send' called with size bigger than buffer") {
diff --git a/libc/include/bits/fortify/stat.h b/libc/include/bits/fortify/stat.h
index 9b4ade2..378072c 100644
--- a/libc/include/bits/fortify/stat.h
+++ b/libc/include/bits/fortify/stat.h
@@ -28,7 +28,7 @@
 
 #pragma once
 
-mode_t __umask_chk(mode_t) __INTRODUCED_IN(18);
+mode_t __umask_chk(mode_t);
 mode_t __umask_real(mode_t mode) __RENAME(umask);
 
 #if defined(__BIONIC_FORTIFY)
diff --git a/libc/include/bits/fortify/stdio.h b/libc/include/bits/fortify/stdio.h
index 95db017..e4607e0 100644
--- a/libc/include/bits/fortify/stdio.h
+++ b/libc/include/bits/fortify/stdio.h
@@ -30,29 +30,29 @@
 #error "Never include this file directly; instead, include <stdio.h>"
 #endif
 
-char* __fgets_chk(char*, int, FILE*, size_t) __INTRODUCED_IN(17);
-size_t __fread_chk(void*, size_t, size_t, FILE*, size_t) __INTRODUCED_IN(24);
-size_t __fwrite_chk(const void*, size_t, size_t, FILE*, size_t) __INTRODUCED_IN(24);
+char* _Nullable __fgets_chk(char* _Nonnull, int, FILE* _Nonnull, size_t);
+size_t __fread_chk(void* _Nonnull, size_t, size_t, FILE* _Nonnull, size_t) __INTRODUCED_IN(24);
+size_t __fwrite_chk(const void* _Nonnull, size_t, size_t, FILE* _Nonnull, size_t) __INTRODUCED_IN(24);
 
 #if defined(__BIONIC_FORTIFY) && !defined(__BIONIC_NO_STDIO_FORTIFY)
 
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE __printflike(3, 0)
-int vsnprintf(char* const __pass_object_size dest, size_t size, const char* format, va_list ap)
+int vsnprintf(char* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size dest, size_t size, const char* _Nonnull format, va_list ap)
         __diagnose_as_builtin(__builtin_vsnprintf, 1, 2, 3, 4)
         __overloadable {
     return __builtin___vsnprintf_chk(dest, size, 0, __bos(dest), format, ap);
 }
 
 __BIONIC_FORTIFY_INLINE __printflike(2, 0)
-int vsprintf(char* const __pass_object_size dest, const char* format, va_list ap) __overloadable {
+int vsprintf(char* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size dest, const char* _Nonnull format, va_list ap) __overloadable {
     return __builtin___vsprintf_chk(dest, 0, __bos(dest), format, ap);
 }
 #endif
 
 __BIONIC_ERROR_FUNCTION_VISIBILITY
-int sprintf(char* dest, const char* format)
+int sprintf(char* __BIONIC_COMPLICATED_NULLNESS dest, const char* _Nonnull format)
     __overloadable
     __enable_if(__bos_unevaluated_lt(__bos(dest), __builtin_strlen(format)),
                 "format string will always overflow destination buffer")
@@ -60,7 +60,7 @@
 
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 __BIONIC_FORTIFY_VARIADIC __printflike(2, 3)
-int sprintf(char* const __pass_object_size dest, const char* format, ...) __overloadable {
+int sprintf(char* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size dest, const char* _Nonnull format, ...) __overloadable {
     va_list va;
     va_start(va, format);
     int result = __builtin___vsprintf_chk(dest, 0, __bos(dest), format, va);
@@ -70,7 +70,7 @@
 
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_VARIADIC __printflike(3, 4)
-int snprintf(char* const __pass_object_size dest, size_t size, const char* format, ...)
+int snprintf(char* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size dest, size_t size, const char* _Nonnull format, ...)
         __diagnose_as_builtin(__builtin_snprintf, 1, 2, 3)
         __overloadable {
     va_list va;
@@ -86,7 +86,7 @@
                                !__unsafe_check_mul_overflow(size, count))
 
 __BIONIC_FORTIFY_INLINE
-size_t fread(void* const __pass_object_size0 buf, size_t size, size_t count, FILE* stream)
+size_t fread(void* const _Nonnull __pass_object_size0 buf, size_t size, size_t count, FILE* _Nonnull stream)
         __overloadable
         __clang_error_if(__unsafe_check_mul_overflow(size, count),
                          "in call to 'fread', size * count overflows")
@@ -103,7 +103,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-size_t fwrite(const void* const __pass_object_size0 buf, size_t size, size_t count, FILE* stream)
+size_t fwrite(const void* const _Nonnull __pass_object_size0 buf, size_t size, size_t count, FILE* _Nonnull stream)
         __overloadable
         __clang_error_if(__unsafe_check_mul_overflow(size, count),
                          "in call to 'fwrite', size * count overflows")
@@ -121,7 +121,7 @@
 #undef __bos_trivially_ge_mul
 
 __BIONIC_FORTIFY_INLINE
-char* fgets(char* const __pass_object_size dest, int size, FILE* stream)
+char* _Nullable fgets(char* const _Nonnull __pass_object_size dest, int size, FILE* _Nonnull stream)
         __overloadable
         __clang_error_if(size < 0, "in call to 'fgets', size should not be negative")
         __clang_error_if(__bos_unevaluated_lt(__bos(dest), size),
diff --git a/libc/include/bits/fortify/stdlib.h b/libc/include/bits/fortify/stdlib.h
index 623be58..b84dae4 100644
--- a/libc/include/bits/fortify/stdlib.h
+++ b/libc/include/bits/fortify/stdlib.h
@@ -35,7 +35,7 @@
 /* PATH_MAX is unavailable without polluting the namespace, but it's always 4096 on Linux */
 #define __PATH_MAX 4096
 
-char* realpath(const char* path, char* resolved)
+char* _Nullable realpath(const char* _Nonnull path, char* _Nullable resolved)
         __clang_error_if(!path, "'realpath': NULL path is never correct; flipped arguments?")
         __clang_error_if(__bos_unevaluated_lt(__bos(resolved), __PATH_MAX),
                          "'realpath' output parameter must be NULL or a pointer to a buffer "
diff --git a/libc/include/bits/fortify/string.h b/libc/include/bits/fortify/string.h
index f668b9f..7df0b05 100644
--- a/libc/include/bits/fortify/string.h
+++ b/libc/include/bits/fortify/string.h
@@ -30,20 +30,20 @@
 #error "Never include this file directly; instead, include <string.h>"
 #endif
 
-void* __memchr_chk(const void*, int, size_t, size_t) __INTRODUCED_IN(23);
-void* __memrchr_chk(const void*, int, size_t, size_t) __INTRODUCED_IN(23);
-char* __stpncpy_chk2(char*, const char*, size_t, size_t, size_t) __INTRODUCED_IN(21);
-char* __strncpy_chk2(char*, const char*, size_t, size_t, size_t) __INTRODUCED_IN(21);
-size_t __strlcpy_chk(char*, const char*, size_t, size_t) __INTRODUCED_IN(17);
-size_t __strlcat_chk(char*, const char*, size_t, size_t) __INTRODUCED_IN(17);
+void* _Nullable __memchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
+void* _Nullable __memrchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
+char* _Nonnull __stpncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t);
+char* _Nonnull __strncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t);
+size_t __strlcpy_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t);
+size_t __strlcat_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t);
 
 #if defined(__BIONIC_FORTIFY)
-extern void* __memrchr_real(const void*, int, size_t) __RENAME(memrchr);
+extern void* _Nullable __memrchr_real(const void* _Nonnull, int, size_t) __RENAME(memrchr);
 
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-void* memcpy(void* const dst __pass_object_size0, const void* src, size_t copy_amount)
+void* _Nonnull memcpy(void* _Nonnull const dst __pass_object_size0, const void* _Nonnull src, size_t copy_amount)
         __diagnose_as_builtin(__builtin_memcpy, 1, 2, 3)
         __overloadable {
     return __builtin___memcpy_chk(dst, src, copy_amount, __bos0(dst));
@@ -51,7 +51,7 @@
 
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-void* memmove(void* const dst __pass_object_size0, const void* src, size_t len)
+void* _Nonnull memmove(void* _Nonnull const dst __pass_object_size0, const void* _Nonnull src, size_t len)
         __diagnose_as_builtin(__builtin_memmove, 1, 2, 3)
         __overloadable {
     return __builtin___memmove_chk(dst, src, len, __bos0(dst));
@@ -61,7 +61,7 @@
 #if defined(__USE_GNU)
 #if __ANDROID_API__ >= 30
 __BIONIC_FORTIFY_INLINE
-void* mempcpy(void* const dst __pass_object_size0, const void* src, size_t copy_amount)
+void* _Nonnull mempcpy(void* _Nonnull const dst __pass_object_size0, const void* _Nonnull src, size_t copy_amount)
         __diagnose_as_builtin(__builtin_mempcpy, 1, 2, 3)
         __overloadable
         __clang_error_if(__bos_unevaluated_lt(__bos0(dst), copy_amount),
@@ -78,7 +78,7 @@
 #endif /* __USE_GNU */
 
 __BIONIC_FORTIFY_INLINE
-char* stpcpy(char* const dst __pass_object_size, const char* src)
+char* _Nonnull stpcpy(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src)
         __overloadable
         __clang_error_if(__bos_unevaluated_le(__bos(dst), __builtin_strlen(src)),
                          "'stpcpy' called with string bigger than buffer") {
@@ -90,7 +90,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-char* strcpy(char* const dst __pass_object_size, const char* src)
+char* _Nonnull strcpy(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src)
         __diagnose_as_builtin(__builtin_strcpy, 1, 2)
         __overloadable
         __clang_error_if(__bos_unevaluated_le(__bos(dst), __builtin_strlen(src)),
@@ -103,7 +103,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-char* strcat(char* const dst __pass_object_size, const char* src)
+char* _Nonnull strcat(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src)
         __overloadable
         __clang_error_if(__bos_unevaluated_le(__bos(dst), __builtin_strlen(src)),
                          "'strcat' called with string bigger than buffer") {
@@ -117,7 +117,7 @@
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-char* strncat(char* const dst __pass_object_size, const char* src, size_t n)
+char* _Nonnull strncat(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src, size_t n)
        __diagnose_as_builtin(__builtin_strncat, 1, 2, 3)
        __overloadable {
     return __builtin___strncat_chk(dst, src, n, __bos(dst));
@@ -126,7 +126,7 @@
 
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-void* memset(void* const s __pass_object_size0, int c, size_t n) __overloadable
+void* _Nonnull memset(void* _Nonnull const s __pass_object_size0, int c, size_t n) __overloadable
         __diagnose_as_builtin(__builtin_memset, 1, 2, 3)
         /* If you're a user who wants this warning to go away: use `(&memset)(foo, bar, baz)`. */
         __clang_warning_if(c && !n, "'memset' will set 0 bytes; maybe the arguments got flipped?") {
@@ -139,7 +139,7 @@
 
 #if __ANDROID_API__ >= 23 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 __BIONIC_FORTIFY_INLINE
-void* memchr(const void* const s __pass_object_size, int c, size_t n) __overloadable {
+void* _Nullable memchr(const void* _Nonnull const s __pass_object_size, int c, size_t n) __overloadable {
     size_t bos = __bos(s);
 
     if (__bos_trivially_ge(bos, n)) {
@@ -150,7 +150,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-void* __memrchr_fortify(const void* const __pass_object_size s, int c, size_t n) __overloadable {
+void* _Nullable __memrchr_fortify(const void* _Nonnull const __pass_object_size s, int c, size_t n) __overloadable {
     size_t bos = __bos(s);
 
     if (__bos_trivially_ge(bos, n)) {
@@ -164,7 +164,7 @@
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-char* stpncpy(char* const dst __pass_object_size, const char* const src __pass_object_size, size_t n)
+char* _Nonnull stpncpy(char* _Nonnull const dst __pass_object_size, const char* _Nonnull const src __pass_object_size, size_t n)
         __diagnose_as_builtin(__builtin_stpncpy, 1, 2, 3)
         __overloadable {
     size_t bos_dst = __bos(dst);
@@ -180,7 +180,7 @@
 
 /* No diag -- clang diagnoses misuses of this on its own.  */
 __BIONIC_FORTIFY_INLINE
-char* strncpy(char* const dst __pass_object_size, const char* const src __pass_object_size, size_t n)
+char* _Nonnull strncpy(char* _Nonnull const dst __pass_object_size, const char* _Nonnull const src __pass_object_size, size_t n)
         __diagnose_as_builtin(__builtin_strncpy, 1, 2, 3)
         __overloadable {
     size_t bos_dst = __bos(dst);
@@ -196,7 +196,7 @@
 #endif
 
 __BIONIC_FORTIFY_INLINE
-size_t strlcpy(char* const dst __pass_object_size, const char* src, size_t size)
+size_t strlcpy(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src, size_t size)
         __overloadable
         __clang_error_if(__bos_unevaluated_lt(__bos(dst), size),
                          "'strlcpy' called with size bigger than buffer") {
@@ -208,7 +208,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-size_t strlcat(char* const dst __pass_object_size, const char* src, size_t size)
+size_t strlcat(char* _Nonnull const dst __pass_object_size, const char* _Nonnull src, size_t size)
         __overloadable
         __clang_error_if(__bos_unevaluated_lt(__bos(dst), size),
                          "'strlcat' called with size bigger than buffer") {
@@ -221,13 +221,13 @@
 
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
 __BIONIC_FORTIFY_INLINE
-size_t strlen(const char* const s __pass_object_size0) __overloadable {
+size_t strlen(const char* _Nonnull const s __pass_object_size0) __overloadable {
     return __strlen_chk(s, __bos0(s));
 }
 #endif
 
 __BIONIC_FORTIFY_INLINE
-char* strchr(const char* const s __pass_object_size, int c) __overloadable {
+char* _Nullable strchr(const char* _Nonnull const s __pass_object_size, int c) __overloadable {
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
     size_t bos = __bos(s);
 
@@ -239,7 +239,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-char* strrchr(const char* const s __pass_object_size, int c) __overloadable {
+char* _Nullable strrchr(const char* _Nonnull const s __pass_object_size, int c) __overloadable {
 #if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
     size_t bos = __bos(s);
 
@@ -254,18 +254,18 @@
 #if defined(__cplusplus)
 extern "C++" {
 __BIONIC_FORTIFY_INLINE
-void* memrchr(void* const __pass_object_size s, int c, size_t n) {
+void* _Nullable memrchr(void* _Nonnull const __pass_object_size s, int c, size_t n) {
     return __memrchr_fortify(s, c, n);
 }
 
 __BIONIC_FORTIFY_INLINE
-const void* memrchr(const void* const __pass_object_size s, int c, size_t n) {
+const void* _Nullable memrchr(const void* _Nonnull const __pass_object_size s, int c, size_t n) {
     return __memrchr_fortify(s, c, n);
 }
 }
 #else
 __BIONIC_FORTIFY_INLINE
-void* memrchr(const void* const __pass_object_size s, int c, size_t n) __overloadable {
+void* _Nullable memrchr(const void* _Nonnull const __pass_object_size s, int c, size_t n) __overloadable {
     return __memrchr_fortify(s, c, n);
 }
 #endif
diff --git a/libc/include/bits/fortify/strings.h b/libc/include/bits/fortify/strings.h
index 5515ef9..a36f02c 100644
--- a/libc/include/bits/fortify/strings.h
+++ b/libc/include/bits/fortify/strings.h
@@ -29,7 +29,7 @@
 #if defined(__BIONIC_FORTIFY)
 
 __BIONIC_FORTIFY_INLINE
-void __bionic_bcopy(const void *src, void* const dst __pass_object_size0, size_t len)
+void __bionic_bcopy(const void * _Nonnull src, void* _Nonnull const dst __pass_object_size0, size_t len)
         __overloadable
         __clang_error_if(__bos_unevaluated_lt(__bos0(dst), len),
                          "'bcopy' called with size bigger than buffer") {
@@ -44,7 +44,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-void __bionic_bzero(void* const b __pass_object_size0, size_t len)
+void __bionic_bzero(void* _Nonnull const b __pass_object_size0, size_t len)
         __overloadable
         __clang_error_if(__bos_unevaluated_lt(__bos0(b), len),
                          "'bzero' called with size bigger than buffer") {
diff --git a/libc/include/bits/fortify/unistd.h b/libc/include/bits/fortify/unistd.h
index 335d0b5..7eda1a6 100644
--- a/libc/include/bits/fortify/unistd.h
+++ b/libc/include/bits/fortify/unistd.h
@@ -29,24 +29,24 @@
 #error "Never include this file directly; instead, include <unistd.h>"
 #endif
 
-char* __getcwd_chk(char*, size_t, size_t) __INTRODUCED_IN(24);
+char* _Nullable __getcwd_chk(char* _Nullable, size_t, size_t) __INTRODUCED_IN(24);
 
-ssize_t __pread_chk(int, void*, size_t, off_t, size_t) __INTRODUCED_IN(23);
-ssize_t __pread_real(int, void*, size_t, off_t) __RENAME(pread);
+ssize_t __pread_chk(int, void* _Nonnull, size_t, off_t, size_t) __INTRODUCED_IN(23);
+ssize_t __pread_real(int, void* _Nonnull, size_t, off_t) __RENAME(pread);
 
-ssize_t __pread64_chk(int, void*, size_t, off64_t, size_t) __INTRODUCED_IN(23);
-ssize_t __pread64_real(int, void*, size_t, off64_t) __RENAME(pread64);
+ssize_t __pread64_chk(int, void* _Nonnull, size_t, off64_t, size_t) __INTRODUCED_IN(23);
+ssize_t __pread64_real(int, void* _Nonnull, size_t, off64_t) __RENAME(pread64);
 
-ssize_t __pwrite_chk(int, const void*, size_t, off_t, size_t) __INTRODUCED_IN(24);
-ssize_t __pwrite_real(int, const void*, size_t, off_t) __RENAME(pwrite);
+ssize_t __pwrite_chk(int, const void* _Nonnull, size_t, off_t, size_t) __INTRODUCED_IN(24);
+ssize_t __pwrite_real(int, const void* _Nonnull, size_t, off_t) __RENAME(pwrite);
 
-ssize_t __pwrite64_chk(int, const void*, size_t, off64_t, size_t) __INTRODUCED_IN(24);
-ssize_t __pwrite64_real(int, const void*, size_t, off64_t) __RENAME(pwrite64);
+ssize_t __pwrite64_chk(int, const void* _Nonnull, size_t, off64_t, size_t) __INTRODUCED_IN(24);
+ssize_t __pwrite64_real(int, const void* _Nonnull, size_t, off64_t) __RENAME(pwrite64);
 
-ssize_t __read_chk(int, void*, size_t, size_t) __INTRODUCED_IN(21);
-ssize_t __write_chk(int, const void*, size_t, size_t) __INTRODUCED_IN(24);
-ssize_t __readlink_chk(const char*, char*, size_t, size_t) __INTRODUCED_IN(23);
-ssize_t __readlinkat_chk(int dirfd, const char*, char*, size_t, size_t) __INTRODUCED_IN(23);
+ssize_t __read_chk(int, void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t);
+ssize_t __write_chk(int, const void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t) __INTRODUCED_IN(24);
+ssize_t __readlink_chk(const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
+ssize_t __readlinkat_chk(int dirfd, const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
 
 #if defined(__BIONIC_FORTIFY)
 
@@ -70,7 +70,7 @@
         __builtin_constant_p(index) && (index) <= SSIZE_MAX))
 
 __BIONIC_FORTIFY_INLINE
-char* getcwd(char* const __pass_object_size buf, size_t size)
+char* _Nullable getcwd(char* const _Nullable __pass_object_size buf, size_t size)
         __overloadable
         __error_if_overflows_objectsize(size, __bos(buf), getcwd) {
 #if __ANDROID_API__ >= 24 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
@@ -85,7 +85,7 @@
 
 #if !defined(__USE_FILE_OFFSET64)
 __BIONIC_FORTIFY_INLINE
-ssize_t pread(int fd, void* const __pass_object_size0 buf, size_t count, off_t offset)
+ssize_t pread(int fd, void* const _Nonnull __pass_object_size0 buf, size_t count, off_t offset)
         __overloadable
         __error_if_overflows_ssizet(count, pread)
         __error_if_overflows_objectsize(count, __bos0(buf), pread) {
@@ -101,7 +101,7 @@
 #endif /* !defined(__USE_FILE_OFFSET64) */
 
 __BIONIC_FORTIFY_INLINE
-ssize_t pread64(int fd, void* const __pass_object_size0 buf, size_t count, off64_t offset)
+ssize_t pread64(int fd, void* const _Nonnull __pass_object_size0 buf, size_t count, off64_t offset)
         __overloadable
         __error_if_overflows_ssizet(count, pread64)
         __error_if_overflows_objectsize(count, __bos0(buf), pread64) {
@@ -117,7 +117,7 @@
 
 #if !defined(__USE_FILE_OFFSET64)
 __BIONIC_FORTIFY_INLINE
-ssize_t pwrite(int fd, const void* const __pass_object_size0 buf, size_t count, off_t offset)
+ssize_t pwrite(int fd, const void* const _Nonnull __pass_object_size0 buf, size_t count, off_t offset)
         __overloadable
         __error_if_overflows_ssizet(count, pwrite)
         __error_if_overflows_objectsize(count, __bos0(buf), pwrite) {
@@ -133,7 +133,7 @@
 #endif /* !defined(__USE_FILE_OFFSET64) */
 
 __BIONIC_FORTIFY_INLINE
-ssize_t pwrite64(int fd, const void* const __pass_object_size0 buf, size_t count, off64_t offset)
+ssize_t pwrite64(int fd, const void* const _Nonnull __pass_object_size0 buf, size_t count, off64_t offset)
         __overloadable
         __error_if_overflows_ssizet(count, pwrite64)
         __error_if_overflows_objectsize(count, __bos0(buf), pwrite64) {
@@ -148,7 +148,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t read(int fd, void* const __pass_object_size0 buf, size_t count)
+ssize_t read(int fd, void* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size0 buf, size_t count)
         __overloadable
         __error_if_overflows_ssizet(count, read)
         __error_if_overflows_objectsize(count, __bos0(buf), read) {
@@ -163,7 +163,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t write(int fd, const void* const __pass_object_size0 buf, size_t count)
+ssize_t write(int fd, const void* const __BIONIC_COMPLICATED_NULLNESS __pass_object_size0 buf, size_t count)
         __overloadable
         __error_if_overflows_ssizet(count, write)
         __error_if_overflows_objectsize(count, __bos0(buf), write) {
@@ -178,7 +178,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t readlink(const char* path, char* const __pass_object_size buf, size_t size)
+ssize_t readlink(const char* _Nonnull path, char* _Nonnull const __pass_object_size buf, size_t size)
         __overloadable
         __error_if_overflows_ssizet(size, readlink)
         __error_if_overflows_objectsize(size, __bos(buf), readlink) {
@@ -193,7 +193,7 @@
 }
 
 __BIONIC_FORTIFY_INLINE
-ssize_t readlinkat(int dirfd, const char* path, char* const __pass_object_size buf, size_t size)
+ssize_t readlinkat(int dirfd, const char* _Nonnull path, char* const _Nonnull __pass_object_size buf, size_t size)
         __overloadable
         __error_if_overflows_ssizet(size, readlinkat)
         __error_if_overflows_objectsize(size, __bos(buf), readlinkat) {
diff --git a/libc/include/bits/get_device_api_level_inlines.h b/libc/include/bits/get_device_api_level_inlines.h
index d14eb2c..dc5871b 100644
--- a/libc/include/bits/get_device_api_level_inlines.h
+++ b/libc/include/bits/get_device_api_level_inlines.h
@@ -35,8 +35,8 @@
 __BEGIN_DECLS
 
 // Avoid circular dependencies since this is exposed from <sys/cdefs.h>.
-int __system_property_get(const char* __name, char* __value);
-int atoi(const char* __s) __attribute_pure__;
+int __system_property_get(const char* _Nonnull __name, char*  _Nonnull __value);
+int atoi(const char* _Nonnull __s) __attribute_pure__;
 
 __BIONIC_GET_DEVICE_API_LEVEL_INLINE int android_get_device_api_level() {
   char value[92] = { 0 };
diff --git a/libc/include/bits/getopt.h b/libc/include/bits/getopt.h
index 0411716..60a89ed 100644
--- a/libc/include/bits/getopt.h
+++ b/libc/include/bits/getopt.h
@@ -38,12 +38,12 @@
  * Returns the next option character on success, returns -1 if all options have been parsed, and
  * returns `'?'` on error.
  */
-int getopt(int __argc, char* const __argv[], const char* __options);
+int getopt(int __argc, char* const _Nonnull __argv[_Nullable], const char* _Nonnull __options);
 
 /**
  * Points to the text of the corresponding value for options that take an argument.
  */
-extern char* optarg;
+extern char* _Nullable optarg;
 
 /**
  * The index of the next element to be processed.
diff --git a/libc/include/bits/glibc-syscalls.h b/libc/include/bits/glibc-syscalls.h
index c144919..3b4b5bf 100644
--- a/libc/include/bits/glibc-syscalls.h
+++ b/libc/include/bits/glibc-syscalls.h
@@ -906,6 +906,12 @@
 #if defined(__NR_restart_syscall)
   #define SYS_restart_syscall __NR_restart_syscall
 #endif
+#if defined(__NR_riscv_flush_icache)
+  #define SYS_riscv_flush_icache __NR_riscv_flush_icache
+#endif
+#if defined(__NR_riscv_hwprobe)
+  #define SYS_riscv_hwprobe __NR_riscv_hwprobe
+#endif
 #if defined(__NR_rmdir)
   #define SYS_rmdir __NR_rmdir
 #endif
diff --git a/libc/include/bits/lockf.h b/libc/include/bits/lockf.h
index 58ab031..ec6e53c 100644
--- a/libc/include/bits/lockf.h
+++ b/libc/include/bits/lockf.h
@@ -60,7 +60,7 @@
 
 /**
  * Like lockf() but allows using a 64-bit length
- * even from a 32-bit process without `__FILE_OFFSET_BITS=64`.
+ * even from a 32-bit process without `_FILE_OFFSET_BITS=64`.
  */
 int lockf64(int __fd, int __cmd, off64_t __length) __INTRODUCED_IN(24);
 
diff --git a/libc/include/bits/stdatomic.h b/libc/include/bits/stdatomic.h
index 2ce6ee6..fe3d68d 100644
--- a/libc/include/bits/stdatomic.h
+++ b/libc/include/bits/stdatomic.h
@@ -269,18 +269,18 @@
 
 #define	ATOMIC_FLAG_INIT		{ ATOMIC_VAR_INIT(false) }
 
-static __inline bool atomic_flag_test_and_set_explicit(volatile atomic_flag *__object, memory_order __order) {
+static __inline bool atomic_flag_test_and_set_explicit(volatile atomic_flag * _Nonnull __object, memory_order __order) {
 	return (atomic_exchange_explicit(&__object->__flag, 1, __order));
 }
 
-static __inline void atomic_flag_clear_explicit(volatile atomic_flag *__object, memory_order __order) {
+static __inline void atomic_flag_clear_explicit(volatile atomic_flag * _Nonnull __object, memory_order __order) {
 	atomic_store_explicit(&__object->__flag, 0, __order);
 }
 
-static __inline bool atomic_flag_test_and_set(volatile atomic_flag *__object) {
+static __inline bool atomic_flag_test_and_set(volatile atomic_flag * _Nonnull __object) {
 	return (atomic_flag_test_and_set_explicit(__object, memory_order_seq_cst));
 }
 
-static __inline void atomic_flag_clear(volatile atomic_flag *__object) {
+static __inline void atomic_flag_clear(volatile atomic_flag * _Nonnull __object) {
 	atomic_flag_clear_explicit(__object, memory_order_seq_cst);
 }
diff --git a/libc/include/bits/strcasecmp.h b/libc/include/bits/strcasecmp.h
index 3994b68..23acbe5 100644
--- a/libc/include/bits/strcasecmp.h
+++ b/libc/include/bits/strcasecmp.h
@@ -46,12 +46,12 @@
  * Returns an integer less than, equal to, or greater than zero if the first string is less than,
  * equal to, or greater than the second string (ignoring case).
  */
-int strcasecmp(const char* __s1, const char* __s2) __attribute_pure__;
+int strcasecmp(const char* _Nonnull __s1, const char* _Nonnull __s2) __attribute_pure__;
 
 /**
  * Like strcasecmp() but taking a `locale_t`.
  */
-int strcasecmp_l(const char* __s1, const char* __s2, locale_t __l) __attribute_pure__ __INTRODUCED_IN(23);
+int strcasecmp_l(const char* _Nonnull __s1, const char* _Nonnull __s2, locale_t _Nonnull __l) __attribute_pure__ __INTRODUCED_IN(23);
 
 /**
  * [strncasecmp(3)](http://man7.org/linux/man-pages/man3/strncasecmp.3.html) compares the first
@@ -61,11 +61,11 @@
  * first string is less than, equal to, or greater than the first `n` bytes of the second
  * string (ignoring case).
  */
-int strncasecmp(const char* __s1, const char* __s2, size_t __n) __attribute_pure__;
+int strncasecmp(const char* _Nonnull __s1, const char* _Nonnull __s2, size_t __n) __attribute_pure__;
 
 /**
  * Like strncasecmp() but taking a `locale_t`.
  */
-int strncasecmp_l(const char* __s1, const char* __s2, size_t __n, locale_t __l) __attribute_pure__ __INTRODUCED_IN(23);
+int strncasecmp_l(const char* _Nonnull __s1, const char* _Nonnull __s2, size_t __n, locale_t _Nonnull __l) __attribute_pure__ __INTRODUCED_IN(23);
 
 __END_DECLS
diff --git a/libc/include/bits/swab.h b/libc/include/bits/swab.h
index 63281b6..9591c2e 100644
--- a/libc/include/bits/swab.h
+++ b/libc/include/bits/swab.h
@@ -38,7 +38,7 @@
 
 __BEGIN_DECLS
 
-__BIONIC_SWAB_INLINE void swab(const void* __void_src, void* __void_dst, ssize_t __byte_count) {
+__BIONIC_SWAB_INLINE void swab(const void* _Nonnull __void_src, void* _Nonnull __void_dst, ssize_t __byte_count) {
   const uint8_t* __src = __BIONIC_CAST(static_cast, const uint8_t*, __void_src);
   uint8_t* __dst = __BIONIC_CAST(static_cast, uint8_t*, __void_dst);
   while (__byte_count > 1) {
diff --git a/libc/include/bits/termios_inlines.h b/libc/include/bits/termios_inlines.h
index 5f7cc42..a884b59 100644
--- a/libc/include/bits/termios_inlines.h
+++ b/libc/include/bits/termios_inlines.h
@@ -45,19 +45,19 @@
 // Supporting separate input and output speeds would require an ABI
 // change for `struct termios`.
 
-static __inline speed_t cfgetspeed(const struct termios* s) {
+static __inline speed_t cfgetspeed(const struct termios* _Nonnull s) {
   return __BIONIC_CAST(static_cast, speed_t, s->c_cflag & CBAUD);
 }
 
-__BIONIC_TERMIOS_INLINE speed_t cfgetispeed(const struct termios* s) {
+__BIONIC_TERMIOS_INLINE speed_t cfgetispeed(const struct termios* _Nonnull s) {
   return cfgetspeed(s);
 }
 
-__BIONIC_TERMIOS_INLINE speed_t cfgetospeed(const struct termios* s) {
+__BIONIC_TERMIOS_INLINE speed_t cfgetospeed(const struct termios* _Nonnull s) {
   return cfgetspeed(s);
 }
 
-__BIONIC_TERMIOS_INLINE void cfmakeraw(struct termios* s) {
+__BIONIC_TERMIOS_INLINE void cfmakeraw(struct termios* _Nonnull s) {
   s->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
   s->c_oflag &= ~OPOST;
   s->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
@@ -67,7 +67,7 @@
   s->c_cc[VTIME] = 0;
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetspeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetspeed(struct termios* _Nonnull s, speed_t speed) {
   // CBAUD is 0x100f, and every matching bit pattern has a Bxxx constant.
   if ((speed & ~CBAUD) != 0) {
     errno = EINVAL;
@@ -77,11 +77,11 @@
   return 0;
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetispeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetispeed(struct termios* _Nonnull s, speed_t speed) {
   return cfsetspeed(s, speed);
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetospeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetospeed(struct termios* _Nonnull s, speed_t speed) {
   return cfsetspeed(s, speed);
 }
 
@@ -99,7 +99,7 @@
   return ioctl(fd, TCFLSH, __BIONIC_CAST(static_cast, unsigned long, queue));
 }
 
-__BIONIC_TERMIOS_INLINE int tcgetattr(int fd, struct termios* s) {
+__BIONIC_TERMIOS_INLINE int tcgetattr(int fd, struct termios* _Nonnull s) {
   return ioctl(fd, TCGETS, s);
 }
 
@@ -112,7 +112,7 @@
   return ioctl(fd, TCSBRKP, __BIONIC_CAST(static_cast, unsigned long, duration));
 }
 
-__BIONIC_TERMIOS_INLINE int tcsetattr(int fd, int optional_actions, const struct termios* s) {
+__BIONIC_TERMIOS_INLINE int tcsetattr(int fd, int optional_actions, const struct termios* _Nonnull s) {
   int cmd;
   switch (optional_actions) {
     case TCSANOW: cmd = TCSETS; break;
diff --git a/libc/include/bits/threads_inlines.h b/libc/include/bits/threads_inlines.h
index 17de4a1..5878e0a 100644
--- a/libc/include/bits/threads_inlines.h
+++ b/libc/include/bits/threads_inlines.h
@@ -48,46 +48,46 @@
   }
 }
 
-__BIONIC_THREADS_INLINE void call_once(once_flag* __flag,
-                                       void (*__function)(void)) {
+__BIONIC_THREADS_INLINE void call_once(once_flag* _Nonnull __flag,
+                                       void (* _Nonnull __function)(void)) {
   pthread_once(__flag, __function);
 }
 
 
 
-__BIONIC_THREADS_INLINE int cnd_broadcast(cnd_t* __cnd) {
+__BIONIC_THREADS_INLINE int cnd_broadcast(cnd_t* _Nonnull __cnd) {
   return __bionic_thrd_error(pthread_cond_broadcast(__cnd));
 }
 
-__BIONIC_THREADS_INLINE void cnd_destroy(cnd_t* __cnd) {
+__BIONIC_THREADS_INLINE void cnd_destroy(cnd_t* _Nonnull __cnd) {
   pthread_cond_destroy(__cnd);
 }
 
-__BIONIC_THREADS_INLINE int cnd_init(cnd_t* __cnd) {
+__BIONIC_THREADS_INLINE int cnd_init(cnd_t* _Nonnull __cnd) {
   return __bionic_thrd_error(pthread_cond_init(__cnd, NULL));
 }
 
-__BIONIC_THREADS_INLINE int cnd_signal(cnd_t* __cnd) {
+__BIONIC_THREADS_INLINE int cnd_signal(cnd_t* _Nonnull __cnd) {
   return __bionic_thrd_error(pthread_cond_signal(__cnd));
 }
 
-__BIONIC_THREADS_INLINE int cnd_timedwait(cnd_t* __cnd,
-                                          mtx_t* __mtx,
-                                          const struct timespec* __timeout) {
+__BIONIC_THREADS_INLINE int cnd_timedwait(cnd_t* _Nonnull __cnd,
+                                          mtx_t* _Nonnull __mtx,
+                                          const struct timespec* _Nullable __timeout) {
   return __bionic_thrd_error(pthread_cond_timedwait(__cnd, __mtx, __timeout));
 }
 
-__BIONIC_THREADS_INLINE int cnd_wait(cnd_t* __cnd, mtx_t* __mtx) {
+__BIONIC_THREADS_INLINE int cnd_wait(cnd_t* _Nonnull __cnd, mtx_t* _Nonnull __mtx) {
   return __bionic_thrd_error(pthread_cond_wait(__cnd, __mtx));
 }
 
 
 
-__BIONIC_THREADS_INLINE void mtx_destroy(mtx_t* __mtx) {
+__BIONIC_THREADS_INLINE void mtx_destroy(mtx_t* _Nonnull __mtx) {
   pthread_mutex_destroy(__mtx);
 }
 
-__BIONIC_THREADS_INLINE int mtx_init(mtx_t* __mtx, int __type) {
+__BIONIC_THREADS_INLINE int mtx_init(mtx_t* _Nonnull __mtx, int __type) {
   int __pthread_type = (__type & mtx_recursive) ? PTHREAD_MUTEX_RECURSIVE
                                                 : PTHREAD_MUTEX_NORMAL;
   __type &= ~mtx_recursive;
@@ -99,31 +99,32 @@
   return __bionic_thrd_error(pthread_mutex_init(__mtx, &__attr));
 }
 
-__BIONIC_THREADS_INLINE int mtx_lock(mtx_t* __mtx) {
+__BIONIC_THREADS_INLINE int mtx_lock(mtx_t* _Nonnull __mtx) {
   return __bionic_thrd_error(pthread_mutex_lock(__mtx));
 }
 
-__BIONIC_THREADS_INLINE int mtx_timedlock(mtx_t* __mtx,
-                                          const struct timespec* __timeout) {
+__BIONIC_THREADS_INLINE int mtx_timedlock(mtx_t* _Nonnull __mtx,
+                                          const struct timespec* _Nullable __timeout) {
   return __bionic_thrd_error(pthread_mutex_timedlock(__mtx, __timeout));
 }
 
-__BIONIC_THREADS_INLINE int mtx_trylock(mtx_t* __mtx) {
+__BIONIC_THREADS_INLINE int mtx_trylock(mtx_t* _Nonnull __mtx) {
   return __bionic_thrd_error(pthread_mutex_trylock(__mtx));
 }
 
-__BIONIC_THREADS_INLINE int mtx_unlock(mtx_t* __mtx) {
+__BIONIC_THREADS_INLINE int mtx_unlock(mtx_t* _Nonnull __mtx) {
   return __bionic_thrd_error(pthread_mutex_unlock(__mtx));
 }
 
-
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 struct __bionic_thrd_data {
   thrd_start_t __func;
   void* __arg;
 };
+#pragma clang diagnostic pop
 
-static inline void* __bionic_thrd_trampoline(void* __arg) {
+static inline void* _Nonnull __bionic_thrd_trampoline(void* _Nonnull __arg) {
   struct __bionic_thrd_data __data =
       *__BIONIC_CAST(static_cast, struct __bionic_thrd_data*, __arg);
   free(__arg);
@@ -132,9 +133,9 @@
                        __BIONIC_CAST(static_cast, uintptr_t, __result));
 }
 
-__BIONIC_THREADS_INLINE int thrd_create(thrd_t* __thrd,
-                                        thrd_start_t __func,
-                                        void* __arg) {
+__BIONIC_THREADS_INLINE int thrd_create(thrd_t* _Nonnull __thrd,
+                                        thrd_start_t _Nonnull __func,
+                                        void* _Nullable __arg) {
   struct __bionic_thrd_data* __pthread_arg =
       __BIONIC_CAST(static_cast, struct __bionic_thrd_data*,
                     malloc(sizeof(struct __bionic_thrd_data)));
@@ -164,7 +165,7 @@
                              __BIONIC_CAST(static_cast, uintptr_t, __result)));
 }
 
-__BIONIC_THREADS_INLINE int thrd_join(thrd_t __thrd, int* __result) {
+__BIONIC_THREADS_INLINE int thrd_join(thrd_t __thrd, int* _Nullable __result) {
   void* __pthread_result;
   if (pthread_join(__thrd, &__pthread_result) != 0) return thrd_error;
   if (__result) {
@@ -173,8 +174,8 @@
   return thrd_success;
 }
 
-__BIONIC_THREADS_INLINE int thrd_sleep(const struct timespec* __duration,
-                                       struct timespec* __remaining) {
+__BIONIC_THREADS_INLINE int thrd_sleep(const struct timespec* _Nonnull __duration,
+                                       struct timespec* _Nullable __remaining) {
   int __rc = nanosleep(__duration, __remaining);
   if (__rc == 0) return 0;
   return (errno == EINTR) ? -1 : -2;
@@ -186,7 +187,7 @@
 
 
 
-__BIONIC_THREADS_INLINE int tss_create(tss_t* __key, tss_dtor_t __dtor) {
+__BIONIC_THREADS_INLINE int tss_create(tss_t* _Nonnull __key, tss_dtor_t _Nullable __dtor) {
   return __bionic_thrd_error(pthread_key_create(__key, __dtor));
 }
 
@@ -194,11 +195,11 @@
   pthread_key_delete(__key);
 }
 
-__BIONIC_THREADS_INLINE void* tss_get(tss_t __key) {
+__BIONIC_THREADS_INLINE void* _Nullable tss_get(tss_t __key) {
   return pthread_getspecific(__key);
 }
 
-__BIONIC_THREADS_INLINE int tss_set(tss_t __key, void* __value) {
+__BIONIC_THREADS_INLINE int tss_set(tss_t __key, void* _Nonnull __value) {
   return __bionic_thrd_error(pthread_setspecific(__key, __value));
 }
 
diff --git a/libc/include/bits/wait.h b/libc/include/bits/wait.h
index a6a2129..c7f1fb0 100644
--- a/libc/include/bits/wait.h
+++ b/libc/include/bits/wait.h
@@ -53,7 +53,7 @@
 #define WIFEXITED(__status) (WTERMSIG(__status) == 0)
 
 /** Returns true if the process was stopped by a signal. */
-#define WIFSTOPPED(__status) (WTERMSIG(__status) == 0x7f)
+#define WIFSTOPPED(__status) (((__status) & 0xff) == 0x7f)
 
 /** Returns true if the process was terminated by a signal. */
 #define WIFSIGNALED(__status) (WTERMSIG((__status)+1) >= 2)
diff --git a/libc/include/bits/wctype.h b/libc/include/bits/wctype.h
index 0015261..11d5fde 100644
--- a/libc/include/bits/wctype.h
+++ b/libc/include/bits/wctype.h
@@ -39,7 +39,7 @@
 
 int iswalnum(wint_t __wc);
 int iswalpha(wint_t __wc);
-int iswblank(wint_t __wc) __INTRODUCED_IN(21);
+int iswblank(wint_t __wc);
 int iswcntrl(wint_t __wc);
 int iswdigit(wint_t __wc);
 int iswgraph(wint_t __wc);
@@ -54,12 +54,12 @@
 wint_t towupper(wint_t __wc);
 
 typedef long wctype_t;
-wctype_t wctype(const char* __name);
+wctype_t wctype(const char* _Nonnull __name);
 int iswctype(wint_t __wc, wctype_t __type);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
-wctrans_t wctrans(const char* __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wint_t towctrans(wint_t __wc, wctrans_t _Nonnull __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wctrans_t _Nullable wctrans(const char* _Nonnull __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 
 __END_DECLS
 
diff --git a/libc/include/complex.h b/libc/include/complex.h
index 50da330..f205abd 100644
--- a/libc/include/complex.h
+++ b/libc/include/complex.h
@@ -55,99 +55,99 @@
 /* 7.3.5.1 The cacos functions */
 double complex cacos(double complex __z) __INTRODUCED_IN(23);
 float complex cacosf(float complex __z) __INTRODUCED_IN(23);
-long double complex cacosl(long double complex __z) __RENAME_LDBL(cacos, 23, 26);
+long double complex cacosl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.5.2 The casin functions */
 double complex casin(double complex __z) __INTRODUCED_IN(23);
 float complex casinf(float complex __z) __INTRODUCED_IN(23);
-long double complex casinl(long double complex __z) __RENAME_LDBL(casin, 23, 26);
+long double complex casinl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.5.1 The catan functions */
 double complex catan(double complex __z) __INTRODUCED_IN(23);
 float complex catanf(float complex __z) __INTRODUCED_IN(23);
-long double complex catanl(long double complex __z) __RENAME_LDBL(catan, 23, 26);
+long double complex catanl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.5.1 The ccos functions */
 double complex ccos(double complex __z) __INTRODUCED_IN(23);
 float complex ccosf(float complex __z) __INTRODUCED_IN(23);
-long double complex ccosl(long double complex __z) __RENAME_LDBL(ccos, 23, 26);
+long double complex ccosl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.5.1 The csin functions */
 double complex csin(double complex __z) __INTRODUCED_IN(23);
 float complex csinf(float complex __z) __INTRODUCED_IN(23);
-long double complex csinl(long double complex __z) __RENAME_LDBL(csin, 23, 26);
+long double complex csinl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.5.1 The ctan functions */
 double complex ctan(double complex __z) __INTRODUCED_IN(23);
 float complex ctanf(float complex __z) __INTRODUCED_IN(23);
-long double complex ctanl(long double complex __z) __RENAME_LDBL(ctan, 23, 26);
+long double complex ctanl(long double complex __z) __INTRODUCED_IN(26);
 
 /* 7.3.6 Hyperbolic functions */
 /* 7.3.6.1 The cacosh functions */
 double complex cacosh(double complex __z) __INTRODUCED_IN(23);
 float complex cacoshf(float complex __z) __INTRODUCED_IN(23);
-long double complex cacoshl(long double complex __z) __RENAME_LDBL(cacosh, 23, 26);
+long double complex cacoshl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.6.2 The casinh functions */
 double complex casinh(double complex __z) __INTRODUCED_IN(23);
 float complex casinhf(float complex __z) __INTRODUCED_IN(23);
-long double complex casinhl(long double complex __z) __RENAME_LDBL(casinh, 23, 26);
+long double complex casinhl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.6.3 The catanh functions */
 double complex catanh(double complex __z) __INTRODUCED_IN(23);
 float complex catanhf(float complex __z) __INTRODUCED_IN(23);
-long double complex catanhl(long double complex __z) __RENAME_LDBL(catanh, 23, 26);
+long double complex catanhl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.6.4 The ccosh functions */
 double complex ccosh(double complex __z) __INTRODUCED_IN(23);
 float complex ccoshf(float complex __z) __INTRODUCED_IN(23);
-long double complex ccoshl(long double complex __z) __RENAME_LDBL(ccosh, 23, 26);
+long double complex ccoshl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.6.5 The csinh functions */
 double complex csinh(double complex __z) __INTRODUCED_IN(23);
 float complex csinhf(float complex __z) __INTRODUCED_IN(23);
-long double complex csinhl(long double complex __z) __RENAME_LDBL(csinh, 23, 26);
+long double complex csinhl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.6.6 The ctanh functions */
 double complex ctanh(double complex __z) __INTRODUCED_IN(23);
 float complex ctanhf(float complex __z) __INTRODUCED_IN(23);
-long double complex ctanhl(long double complex __z) __RENAME_LDBL(ctanh, 23, 26);
+long double complex ctanhl(long double complex __z) __INTRODUCED_IN(26);
 
 /* 7.3.7 Exponential and logarithmic functions */
 /* 7.3.7.1 The cexp functions */
 double complex cexp(double complex __z) __INTRODUCED_IN(23);
 float complex cexpf(float complex __z) __INTRODUCED_IN(23);
-long double complex cexpl(long double complex __z) __RENAME_LDBL(cexp, 23, 26);
+long double complex cexpl(long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.7.2 The clog functions */
 double complex clog(double complex __z) __INTRODUCED_IN(26);
 float complex clogf(float complex __z) __INTRODUCED_IN(26);
-long double complex clogl(long double complex __z) __RENAME_LDBL(clog, 26, 26);
+long double complex clogl(long double complex __z) __INTRODUCED_IN(26);
 
 /* 7.3.8 Power and absolute-value functions */
 /* 7.3.8.1 The cabs functions */
 double cabs(double complex __z) __INTRODUCED_IN(23);
 float cabsf(float complex __z) __INTRODUCED_IN(23);
-long double cabsl(long double complex __z) __INTRODUCED_IN_32(21) __INTRODUCED_IN_64(23) /*__RENAME_LDBL(cabs)*/;
+long double cabsl(long double complex __z) __INTRODUCED_IN(23);
 /* 7.3.8.2 The cpow functions */
 double complex cpow(double complex __x, double complex __z) __INTRODUCED_IN(26);
 float complex cpowf(float complex __x, float complex __z) __INTRODUCED_IN(26);
-long double complex cpowl(long double complex __x, long double complex __z) __RENAME_LDBL(cpow, 26, 26);
+long double complex cpowl(long double complex __x, long double complex __z) __INTRODUCED_IN(26);
 /* 7.3.8.3 The csqrt functions */
 double complex csqrt(double complex __z) __INTRODUCED_IN(23);
 float complex csqrtf(float complex __z) __INTRODUCED_IN(23);
-long double complex csqrtl(long double complex __z) __INTRODUCED_IN_32(21) __INTRODUCED_IN_64(23) /*__RENAME_LDBL(csqrt)*/;
+long double complex csqrtl(long double complex __z) __INTRODUCED_IN(23);
 
 /* 7.3.9 Manipulation functions */
 /* 7.3.9.1 The carg functions */
 double carg(double complex __z) __INTRODUCED_IN(23);
 float cargf(float complex __z) __INTRODUCED_IN(23);
-long double cargl(long double complex __z) __RENAME_LDBL(carg, 23, 23);
+long double cargl(long double complex __z) __INTRODUCED_IN(23);
 /* 7.3.9.2 The cimag functions */
 double cimag(double complex __z) __INTRODUCED_IN(23);
 float cimagf(float complex __z) __INTRODUCED_IN(23);
-long double cimagl(long double complex __z) __RENAME_LDBL(cimag, 23, 23);
+long double cimagl(long double complex __z) __INTRODUCED_IN(23);
 /* 7.3.9.3 The conj functions */
 double complex conj(double complex __z) __INTRODUCED_IN(23);
 float complex conjf(float complex __z) __INTRODUCED_IN(23);
-long double complex conjl(long double complex __z) __RENAME_LDBL(conj, 23, 23);
+long double complex conjl(long double complex __z) __INTRODUCED_IN(23);
 /* 7.3.9.4 The cproj functions */
 double complex cproj(double complex __z) __INTRODUCED_IN(23);
 float complex cprojf(float complex __z) __INTRODUCED_IN(23);
-long double complex cprojl(long double complex __z) __INTRODUCED_IN_32(21) __INTRODUCED_IN_64(23) /*__RENAME_LDBL(cproj)*/;
+long double complex cprojl(long double complex __z) __INTRODUCED_IN(23);
 /* 7.3.9.5 The creal functions */
 double creal(double complex __z) __INTRODUCED_IN(23);
 float crealf(float complex __z) __INTRODUCED_IN(23);
-long double creall(long double complex __z) __RENAME_LDBL(creal, 23, 23);
+long double creall(long double complex __z) __INTRODUCED_IN(23);
 
 __END_DECLS
 
diff --git a/libc/include/dirent.h b/libc/include/dirent.h
index 2751b9e..4f5d0fb 100644
--- a/libc/include/dirent.h
+++ b/libc/include/dirent.h
@@ -123,10 +123,10 @@
  * or returns null and leaves `errno` unchanged at the end of the directory,
  * or returns null and sets `errno` on failure.
  */
-struct dirent64* _Nullable readdir64(DIR* _Nonnull __dir) __INTRODUCED_IN(21);
+struct dirent64* _Nullable readdir64(DIR* _Nonnull __dir);
 
 int readdir_r(DIR* _Nonnull __dir, struct dirent* _Nonnull __entry, struct dirent* _Nullable * _Nonnull __buffer) __attribute__((__deprecated__("readdir_r is deprecated; use readdir instead")));
-int readdir64_r(DIR* _Nonnull __dir, struct dirent64* _Nonnull __entry, struct dirent64* _Nullable * _Nonnull __buffer) __INTRODUCED_IN(21) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));
+int readdir64_r(DIR* _Nonnull __dir, struct dirent64* _Nonnull __entry, struct dirent64* _Nullable * _Nonnull __buffer) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));
 
 /**
  * [closedir(3)](http://man7.org/linux/man-pages/man3/closedir.3.html)
@@ -179,10 +179,8 @@
 /**
  * [alphasort64](http://man7.org/linux/man-pages/man3/alphasort.3.html) is a
  * comparator for use with scandir64() that uses strcmp().
- *
- * Available since API level 21.
  */
-int alphasort64(const struct dirent64* _Nonnull * _Nonnull __lhs, const struct dirent64* _Nonnull * _Nonnull __rhs) __INTRODUCED_IN(21);
+int alphasort64(const struct dirent64* _Nonnull * _Nonnull __lhs, const struct dirent64* _Nonnull * _Nonnull __rhs);
 
 /**
  * [scandir(3)](http://man7.org/linux/man-pages/man3/scandir.3.html)
@@ -205,10 +203,8 @@
  *
  * Returns the number of entries returned in the list on success,
  * and returns -1 and sets `errno` on failure.
- *
- * Available since API level 21.
  */
-int scandir64(const char* _Nonnull __path, struct dirent64* _Nonnull * _Nonnull * _Nonnull __name_list, int (* _Nullable __filter)(const struct dirent64* _Nonnull), int (* _Nullable __comparator)(const struct dirent64* _Nonnull * _Nonnull, const struct dirent64* _Nonnull * _Nonnull)) __INTRODUCED_IN(21);
+int scandir64(const char* _Nonnull __path, struct dirent64* _Nonnull * _Nonnull * _Nonnull __name_list, int (* _Nullable __filter)(const struct dirent64* _Nonnull), int (* _Nullable __comparator)(const struct dirent64* _Nonnull * _Nonnull, const struct dirent64* _Nonnull * _Nonnull));
 
 #if defined(__USE_GNU)
 
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index a8db387..16ce6fa 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -111,7 +111,7 @@
  */
 int creat(const char* _Nonnull __path, mode_t __mode);
 /** See creat(). */
-int creat64(const char* _Nonnull __path, mode_t __mode) __INTRODUCED_IN(21);
+int creat64(const char* _Nonnull __path, mode_t __mode);
 
 /**
  * [openat(2)](http://man7.org/linux/man-pages/man2/openat.2.html)
@@ -122,7 +122,7 @@
  */
 int openat(int __dir_fd, const char* _Nonnull __path, int __flags, ...);
 /** See openat(). */
-int openat64(int __dir_fd, const char* _Nonnull __path, int __flags, ...) __INTRODUCED_IN(21);
+int openat64(int __dir_fd, const char* _Nonnull __path, int __flags, ...);
 
 /**
  * [open(2)](http://man7.org/linux/man-pages/man2/open.2.html)
@@ -133,7 +133,7 @@
  */
 int open(const char* _Nonnull __path, int __flags, ...);
 /** See open(). */
-int open64(const char* _Nonnull __path, int __flags, ...) __INTRODUCED_IN(21);
+int open64(const char* _Nonnull __path, int __flags, ...);
 
 /**
  * [splice(2)](http://man7.org/linux/man-pages/man2/splice.2.html)
@@ -144,10 +144,8 @@
  *
  * Returns the number of bytes spliced on success and returns -1 and sets
  * `errno` on failure.
- *
- * Available since API level 21.
  */
-ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset, int __out_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset, int __out_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __out_offset, size_t __length, unsigned int __flags);
 
 /**
  * [tee(2)](http://man7.org/linux/man-pages/man2/tee.2.html)
@@ -158,10 +156,8 @@
  *
  * Returns the number of bytes duplicated on success and returns -1 and sets
  * `errno` on failure.
- *
- * Available since API level 21.
  */
-ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags);
 
 /**
  * [vmsplice(2)](http://man7.org/linux/man-pages/man2/vmsplice.2.html)
@@ -172,10 +168,8 @@
  *
  * Returns the number of bytes spliced on success and returns -1 and sets
  * `errno` on failure.
- *
- * Available since API level 21.
  */
-ssize_t vmsplice(int __fd, const struct iovec* _Nonnull __iov, size_t __count, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t vmsplice(int __fd, const struct iovec* _Nonnull __iov, size_t __count, unsigned int __flags);
 
 /**
  * [fallocate(2)](http://man7.org/linux/man-pages/man2/fallocate.2.html)
@@ -187,12 +181,10 @@
  * `FALLOC_FL_UNSHARE_RANGE`.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
- *
- * Available since API level 21.
  */
-int fallocate(int __fd, int __mode, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(fallocate64) __INTRODUCED_IN(21);
+int fallocate(int __fd, int __mode, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(fallocate64);
 /** See fallocate(). */
-int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length) __INTRODUCED_IN(21);
+int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length);
 
 /**
  * [posix_fadvise(2)](http://man7.org/linux/man-pages/man2/posix_fadvise.2.html)
@@ -203,24 +195,20 @@
  * and `POSIX_FADV_NOREUSE`.
  *
  * Returns 0 on success and returns an error number on failure.
- *
- * Available since API level 21.
  */
-int posix_fadvise(int __fd, off_t __offset, off_t __length, int __advice) __RENAME_IF_FILE_OFFSET64(posix_fadvise64) __INTRODUCED_IN(21);
+int posix_fadvise(int __fd, off_t __offset, off_t __length, int __advice) __RENAME_IF_FILE_OFFSET64(posix_fadvise64);
 /** See posix_fadvise(). */
-int posix_fadvise64(int __fd, off64_t __offset, off64_t __length, int __advice) __INTRODUCED_IN(21);
+int posix_fadvise64(int __fd, off64_t __offset, off64_t __length, int __advice);
 
 /**
  * [posix_fallocate(2)](http://man7.org/linux/man-pages/man2/posix_fallocate.2.html)
  * allocates file space.
  *
  * Returns 0 on success and returns an error number on failure.
- *
- * Available since API level 21.
  */
-int posix_fallocate(int __fd, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(posix_fallocate64) __INTRODUCED_IN(21);
+int posix_fallocate(int __fd, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(posix_fallocate64);
 /** See posix_fallocate(). */
-int posix_fallocate64(int __fd, off64_t __offset, off64_t __length) __INTRODUCED_IN(21);
+int posix_fallocate64(int __fd, off64_t __offset, off64_t __length);
 
 #if defined(__USE_GNU)
 
diff --git a/libc/include/fenv.h b/libc/include/fenv.h
index 6e8ea57..f7dcc8e 100644
--- a/libc/include/fenv.h
+++ b/libc/include/fenv.h
@@ -29,6 +29,11 @@
 
 #pragma once
 
+/**
+ * @file fenv.h
+ * @brief Floating-point environment.
+ */
+
 #include <sys/cdefs.h>
 
 #if defined(__aarch64__) || defined(__arm__)
@@ -43,33 +48,135 @@
 
 __BEGIN_DECLS
 
-int feclearexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fegetexceptflag(fexcept_t* _Nonnull __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int feraiseexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fesetexceptflag(const fexcept_t* _Nonnull __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fetestexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
+/**
+ * [feclearexcept(3)](http://man7.org/linux/man-pages/man3/feclearexcept.3.html)
+ * clears the given `exceptions` in hardware.
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int feclearexcept(int __exceptions);
 
-int fegetround(void) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fesetround(int __rounding_mode) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
+/**
+ * [fegetexceptflag(3)](http://man7.org/linux/man-pages/man3/fegetexceptflag.3.html)
+ * copies the state of the given `exceptions` from hardware into `*flag_ptr`.
+ * See fesetexceptflag().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int fegetexceptflag(fexcept_t* _Nonnull __flag_ptr, int __exceptions);
 
-int fegetenv(fenv_t* _Nonnull __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int feholdexcept(fenv_t* _Nonnull __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fesetenv(const fenv_t* _Nonnull __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int feupdateenv(const fenv_t* _Nonnull __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
+/**
+ * [feraiseexcept(3)](http://man7.org/linux/man-pages/man3/feraiseexcept.3.html)
+ * raises the given `exceptions` in hardware.
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int feraiseexcept(int __exceptions);
 
-int feenableexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fedisableexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
-int fegetexcept(void) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_X86(9);
+/**
+ * [fesetexceptflag(3)](http://man7.org/linux/man-pages/man3/fesetexceptflag.3.html)
+ * copies the state of the given `exceptions` from `*flag_ptr` into hardware.
+ * See fesetexceptflag().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int fesetexceptflag(const fexcept_t* _Nonnull __flag_ptr, int __exceptions);
 
-/*
- * The following constant represents the default floating-point environment
- * (that is, the one installed at program startup) and has type pointer to
- * const-qualified fenv_t.
+/**
+ * [fetestexcept(3)](http://man7.org/linux/man-pages/man3/fetestexcept.3.html)
+ * tests whether the given `exceptions` are set in hardware.
+ *
+ * Returns the currently-set subset of `exceptions`.
+ */
+int fetestexcept(int __exceptions);
+
+/**
+ * [fegetround(3)](http://man7.org/linux/man-pages/man3/fegetround.3.html)
+ * returns the current rounding mode.
+ *
+ * Returns the rounding mode on success, and returns a negative value on failure.
+ */
+int fegetround(void);
+
+/**
+ * [fesetround(3)](http://man7.org/linux/man-pages/man3/fesetround.3.html)
+ * sets the current rounding mode.
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int fesetround(int __rounding_mode);
+
+/**
+ * [fegetenv(3)](http://man7.org/linux/man-pages/man3/fegetenv.3.html)
+ * gets the current floating-point environment. See fesetenv().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int fegetenv(fenv_t* _Nonnull __env);
+
+/**
+ * [feholdexcept(3)](http://man7.org/linux/man-pages/man3/feholdexcept.3.html)
+ * gets the current floating-point environment, clears the status flags, and
+ * ignores floating point exceptions. See fesetenv()/feupdateenv().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int feholdexcept(fenv_t* _Nonnull __env);
+
+/**
+ * [fesetenv(3)](http://man7.org/linux/man-pages/man3/fesetenv.3.html)
+ * sets the current floating-point environment. See fegetenv().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int fesetenv(const fenv_t* _Nonnull __env);
+
+/**
+ * [feupdateenv(3)](http://man7.org/linux/man-pages/man3/feupdateenv.3.html)
+ * sets the current floating-point environment to `*env` but with currently-raised
+ * exceptions still raised. See fesetenv().
+ *
+ * Returns 0 on success, and returns non-zero on failure.
+ */
+int feupdateenv(const fenv_t* _Nonnull __env);
+
+/**
+ * [feenableexcept(3)](http://man7.org/linux/man-pages/man3/feenableexcept.3.html)
+ * sets the given `exceptions` to trap, if the hardware supports it. This is not
+ * generally useful on Android, because only x86/x86-64 can trap.
+ *
+ * Returns the previous set of enabled exceptions on success, and returns -1 on failure.
+ */
+int feenableexcept(int __exceptions);
+
+/**
+ * [fedisableexcept(3)](http://man7.org/linux/man-pages/man3/fedisableexcept.3.html)
+ * sets the given `exceptions` to not trap, if the hardware supports it. This is not
+ * generally useful on Android, because only x86/x86-64 can trap.
+ *
+ * Returns the previous set of enabled exceptions on success, and returns -1 on failure.
+ */
+int fedisableexcept(int __exceptions);
+
+/**
+ * [fegetexcept(3)](http://man7.org/linux/man-pages/man3/fegetexcept.3.html)
+ * returns the exceptions that currently trap. This is not generally useful on
+ * Android, because only x86/x86-64 can trap.
+ *
+ * Returns the exceptions that currently trap.
+ */
+int fegetexcept(void);
+
+/** See FE_DFL_ENV. */
+extern const fenv_t __fe_dfl_env;
+
+/**
+ * Constant representing the default floating-point environment
+ * (that is, the one installed at program startup).
  *
  * It can be used as an argument to the functions that manage the floating-point
  * environment, namely fesetenv() and feupdateenv().
  */
-extern const fenv_t __fe_dfl_env;
 #define FE_DFL_ENV (&__fe_dfl_env)
 
 __END_DECLS
diff --git a/libc/include/fts.h b/libc/include/fts.h
index bae2615..8dfd213 100644
--- a/libc/include/fts.h
+++ b/libc/include/fts.h
@@ -117,16 +117,11 @@
 
 __BEGIN_DECLS
 
-/*
- * Strictly these functions were available before Lollipop/21, but there was an accidental ABI
- * breakage in 21 that means you can't write code that runs on current devices and pre-21 devices,
- * so we break the tie in favor of current and future devices.
- */
-FTSENT* _Nullable fts_children(FTS* _Nonnull __fts, int __options) __INTRODUCED_IN(21);
-int fts_close(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
-FTS* _Nullable fts_open(char* _Nonnull const* _Nonnull __path, int __options, int (* _Nullable __comparator)(const FTSENT* _Nonnull * _Nonnull  __lhs, const FTSENT* _Nonnull * _Nonnull __rhs)) __INTRODUCED_IN(21);
-FTSENT* _Nullable fts_read(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
-int fts_set(FTS* _Nonnull __fts, FTSENT* _Nonnull __entry, int __options) __INTRODUCED_IN(21);
+FTSENT* _Nullable fts_children(FTS* _Nonnull __fts, int __options);
+int fts_close(FTS* _Nonnull __fts);
+FTS* _Nullable fts_open(char* _Nonnull const* _Nonnull __path, int __options, int (* _Nullable __comparator)(const FTSENT* _Nonnull * _Nonnull  __lhs, const FTSENT* _Nonnull * _Nonnull __rhs));
+FTSENT* _Nullable fts_read(FTS* _Nonnull __fts);
+int fts_set(FTS* _Nonnull __fts, FTSENT* _Nonnull __entry, int __options);
 
 __END_DECLS
 
diff --git a/libc/include/ftw.h b/libc/include/ftw.h
index c5fa4de..ac2473a 100644
--- a/libc/include/ftw.h
+++ b/libc/include/ftw.h
@@ -55,10 +55,10 @@
 };
 
 __BEGIN_DECLS
-int ftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int), int __max_fd_count) __INTRODUCED_IN(17);
-int nftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags) __INTRODUCED_IN(17);
-int ftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int), int __max_fd_count) __RENAME_STAT64(ftw, 17, 21);
-int nftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags) __RENAME_STAT64(nftw, 17, 21);
+int ftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int), int __max_fd_count);
+int nftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags);
+int ftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int), int __max_fd_count);
+int nftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags);
 __END_DECLS
 
 #endif
diff --git a/libc/include/iconv.h b/libc/include/iconv.h
index 7cf36dc..27e04bb 100644
--- a/libc/include/iconv.h
+++ b/libc/include/iconv.h
@@ -50,19 +50,22 @@
  * [iconv_open(3)](http://man7.org/linux/man-pages/man3/iconv_open.3.html) allocates a new converter
  * from `__src_encoding` to `__dst_encoding`.
  *
+ * Android supports the `utf8`, `ascii`, `usascii`, `utf16be`, `utf16le`, `utf32be`, `utf32le`,
+ * and `wchart` encodings for both source and destination.
+ *
+ * Android supports the GNU `//IGNORE` and `//TRANSLIT` extensions for the
+ * destination encoding.
+ *
  * Returns a new `iconv_t` on success and returns `((iconv_t) -1)` and sets `errno` on failure.
  *
  * Available since API level 28.
  */
-iconv_t _Nonnull iconv_open(const char* _Nonnull __src_encoding, const char* _Nonnull __dst_encoding) __INTRODUCED_IN(28);
+iconv_t _Nonnull iconv_open(const char* _Nonnull __dst_encoding, const char* _Nonnull __src_encoding) __INTRODUCED_IN(28);
 
 /**
  * [iconv(3)](http://man7.org/linux/man-pages/man3/iconv.3.html) converts characters from one
  * encoding to another.
  *
- * Android supports the `utf8`, `ascii`, `usascii`, `utf16be`, `utf16le`, `utf32be`, `utf32le`,
- * and `wchart` encodings. Android also supports the GNU `//IGNORE` and `//TRANSLIT` extensions.
- *
  * Returns the number of characters converted on success and returns `((size_t) -1)` and
  * sets `errno` on failure.
  *
diff --git a/libc/include/inttypes.h b/libc/include/inttypes.h
index 76aee38..9fcd9f3 100644
--- a/libc/include/inttypes.h
+++ b/libc/include/inttypes.h
@@ -327,12 +327,12 @@
 } imaxdiv_t;
 
 __BEGIN_DECLS
-intmax_t imaxabs(intmax_t __i) __attribute_const__ __INTRODUCED_IN(19);
-imaxdiv_t imaxdiv(intmax_t __numerator, intmax_t __denominator) __attribute_const__ __INTRODUCED_IN(19);
+intmax_t imaxabs(intmax_t __i) __attribute_const__;
+imaxdiv_t imaxdiv(intmax_t __numerator, intmax_t __denominator) __attribute_const__;
 intmax_t strtoimax(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
 uintmax_t strtoumax(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
-intmax_t wcstoimax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
-uintmax_t wcstoumax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
+intmax_t wcstoimax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base);
+uintmax_t wcstoumax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base);
 __END_DECLS
 
 #endif
diff --git a/libc/include/link.h b/libc/include/link.h
index a0a3d60..33fea49 100644
--- a/libc/include/link.h
+++ b/libc/include/link.h
@@ -55,11 +55,7 @@
   void* _Nullable dlpi_tls_data;
 };
 
-#if defined(__arm__)
-int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void* _Nullable), void* _Nullable __data) __INTRODUCED_IN(21);
-#else
-int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void*_Nullable ), void* _Nullable __data);
-#endif
+int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void* _Nullable), void* _Nullable __data);
 
 #ifdef __arm__
 typedef uintptr_t _Unwind_Ptr;
diff --git a/libc/include/locale.h b/libc/include/locale.h
index 27f2a3f..f5c79cb 100644
--- a/libc/include/locale.h
+++ b/libc/include/locale.h
@@ -96,13 +96,13 @@
   char int_n_sign_posn;
 };
 
-struct lconv* _Nonnull localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+struct lconv* _Nonnull localeconv(void);
 
-locale_t _Nullable duplocale(locale_t _Nonnull __l) __INTRODUCED_IN(21);
-void freelocale(locale_t _Nonnull __l) __INTRODUCED_IN(21);
-locale_t _Nullable newlocale(int __category_mask, const char* _Nonnull __locale_name, locale_t _Nullable __base) __INTRODUCED_IN(21);
+locale_t _Nullable duplocale(locale_t _Nonnull __l);
+void freelocale(locale_t _Nonnull __l);
+locale_t _Nullable newlocale(int __category_mask, const char* _Nonnull __locale_name, locale_t _Nullable __base);
 char* _Nullable setlocale(int __category, const char* _Nullable __locale_name);
-locale_t _Nullable uselocale(locale_t _Nullable __l) __INTRODUCED_IN(21);
+locale_t _Nullable uselocale(locale_t _Nullable __l);
 
 #define LC_GLOBAL_LOCALE __BIONIC_CAST(reinterpret_cast, locale_t, -1L)
 
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index 6a2d380..6f992d9 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -39,6 +39,21 @@
  *
  * Returns a pointer to the allocated memory on success and returns a null
  * pointer and sets `errno` on failure.
+ *
+ * Note that Android (like most Unix systems) allows "overcommit". This
+ * allows processes to allocate more memory than the system has, provided
+ * they don't use it all. This works because only "dirty" pages that have
+ * been written to actually require physical memory. In practice, this
+ * means that it's rare to see memory allocation functions return a null
+ * pointer, and that a non-null pointer does not mean that you actually
+ * have all of the memory you asked for.
+ *
+ * Note also that the Linux Out Of Memory (OOM) killer behaves differently
+ * for code run via `adb shell`. The assumption is that if you ran
+ * something via `adb shell` you're a developer who actually wants the
+ * device to do what you're asking it to do _even if_ that means killing
+ * other processes. Obviously this is not the case for apps, which will
+ * be killed in preference to killing other processes.
  */
 void* _Nullable malloc(size_t __byte_count) __mallocfunc __BIONIC_ALLOC_SIZE(1) __wur;
 
@@ -47,7 +62,7 @@
  * and clears memory on the heap.
  *
  * Returns a pointer to the allocated memory on success and returns a null
- * pointer and sets `errno` on failure.
+ * pointer and sets `errno` on failure (but see the notes for malloc()).
  */
 void* _Nullable calloc(size_t __item_count, size_t __item_size) __mallocfunc __BIONIC_ALLOC_SIZE(1,2) __wur;
 
@@ -56,7 +71,8 @@
  * allocated memory on the heap.
  *
  * Returns a pointer (which may be different from `__ptr`) to the resized
- * memory on success and returns a null pointer and sets `errno` on failure.
+ * memory on success and returns a null pointer and sets `errno` on failure
+ * (but see the notes for malloc()).
  */
 void* _Nullable realloc(void* _Nullable __ptr, size_t __byte_count) __BIONIC_ALLOC_SIZE(2) __wur;
 
@@ -68,7 +84,8 @@
  * multiplication overflows.
  *
  * Returns a pointer (which may be different from `__ptr`) to the resized
- * memory on success and returns a null pointer and sets `errno` on failure.
+ * memory on success and returns a null pointer and sets `errno` on failure
+ * (but see the notes for malloc()).
  */
 void* _Nullable reallocarray(void* _Nullable __ptr, size_t __item_count, size_t __item_size) __BIONIC_ALLOC_SIZE(2, 3) __wur __INTRODUCED_IN(29);
 
@@ -83,7 +100,7 @@
  * memory on the heap with the required alignment.
  *
  * Returns a pointer to the allocated memory on success and returns a null
- * pointer and sets `errno` on failure.
+ * pointer and sets `errno` on failure (but see the notes for malloc()).
  *
  * See also posix_memalign().
  */
@@ -92,10 +109,8 @@
 /**
  * [malloc_usable_size(3)](http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html)
  * returns the actual size of the given heap block.
- *
- * Available since API level 17.
  */
-size_t malloc_usable_size(const void* _Nullable __ptr) __INTRODUCED_IN(17);
+size_t malloc_usable_size(const void* _Nullable __ptr);
 
 #define __MALLINFO_BODY \
   /** Total number of non-mmapped bytes currently allocated from OS. */ \
@@ -232,8 +247,9 @@
 /**
  * mallopt() option for per-thread memory initialization tuning.
  * The value argument should be one of:
- * 1: Disable automatic heap initialization and, where possible, memory tagging,
- *    on this thread.
+ * 1: Disable automatic heap initialization on this thread only.
+ *    If memory tagging is enabled, disable as much as possible of the
+ *    memory tagging initialization for this thread.
  * 0: Normal behavior.
  *
  * Available since API level 31.
@@ -319,6 +335,16 @@
 };
 
 /**
+ * mallopt() option to print human readable statistics about the memory
+ * allocator to the log. There is no format for this data, each allocator
+ * can use a different format, and the data that is printed can
+ * change at any time. This is expected to be used as a debugging aid.
+ *
+ * Available since API level 35.
+ */
+#define M_LOG_STATS (-205)
+
+/**
  * [mallopt(3)](http://man7.org/linux/man-pages/man3/mallopt.3.html) modifies
  * heap behavior. Values of `__option` are the `M_` constants from this header.
  *
diff --git a/libc/include/math.h b/libc/include/math.h
index a5fa7c3..fc6c228 100644
--- a/libc/include/math.h
+++ b/libc/include/math.h
@@ -75,232 +75,231 @@
 
 double acos(double __x);
 float acosf(float __x);
-long double acosl(long double __x) __RENAME_LDBL(acos, 3, 21);
+long double acosl(long double __x);
 
 double asin(double __x);
 float asinf(float __x);
-long double asinl(long double __x) __RENAME_LDBL(asin, 3, 21);
+long double asinl(long double __x);
 
 double atan(double __x);
 float atanf(float __x);
-long double atanl(long double __x) __RENAME_LDBL(atan, 3, 21);
+long double atanl(long double __x);
 
 double atan2(double __y, double __x);
 float atan2f(float __y, float __x);
-long double atan2l(long double __y, long double __x) __RENAME_LDBL(atan2, 3, 21);
+long double atan2l(long double __y, long double __x);
 
 double cos(double __x);
 float cosf(float __x);
-long double cosl(long double __x) __RENAME_LDBL(cos, 3, 21);
+long double cosl(long double __x);
 
 double sin(double __x);
 float sinf(float __x);
-long double sinl(long double __x) __RENAME_LDBL(sin, 3, 21);
+long double sinl(long double __x);
 
 double tan(double __x);
 float tanf(float __x);
-long double tanl(long double __x) __RENAME_LDBL(tan, 3, 21);
+long double tanl(long double __x);
 
 double acosh(double __x);
 float acoshf(float __x);
-long double acoshl(long double __x) __RENAME_LDBL(acosh, 3, 21);
+long double acoshl(long double __x);
 
 double asinh(double __x);
 float asinhf(float __x);
-long double asinhl(long double __x) __RENAME_LDBL(asinh, 3, 21);
+long double asinhl(long double __x);
 
 double atanh(double __x);
 float atanhf(float __x);
-long double atanhl(long double __x) __RENAME_LDBL(atanh, 3, 21);
+long double atanhl(long double __x);
 
 double cosh(double __x);
 float coshf(float __x);
-long double coshl(long double __x) __RENAME_LDBL(cosh, 3, 21);
+long double coshl(long double __x);
 
 double sinh(double __x);
 float sinhf(float __x);
-long double sinhl(long double __x) __RENAME_LDBL(sinh, 3, 21);
+long double sinhl(long double __x);
 
 double tanh(double __x);
 float tanhf(float __x);
-long double tanhl(long double __x) __RENAME_LDBL(tanh, 3, 21);
+long double tanhl(long double __x);
 
 double exp(double __x);
 float expf(float __x);
-long double expl(long double __x) __RENAME_LDBL(exp, 3, 21);
+long double expl(long double __x);
 
 double exp2(double __x);
 float exp2f(float __x);
-long double exp2l(long double __x) __RENAME_LDBL(exp2, 3, 21);
+long double exp2l(long double __x);
 
 double expm1(double __x);
 float expm1f(float __x);
-long double expm1l(long double __x) __RENAME_LDBL(expm1, 3, 21);
+long double expm1l(long double __x);
 
 double frexp(double __x, int* _Nonnull __exponent);
 float frexpf(float __x, int* _Nonnull __exponent);
-long double frexpl(long double __x, int* _Nonnull __exponent) __RENAME_LDBL(frexp, 3, 21);
+long double frexpl(long double __x, int* _Nonnull __exponent);
 
 int ilogb(double __x) __attribute_const__;
 int ilogbf(float __x) __attribute_const__;
-int ilogbl(long double __x) __RENAME_LDBL(ilogb, 3, 3) __attribute_const__;
+int ilogbl(long double __x) __attribute_const__;
 
 double ldexp(double __x, int __exponent);
 float ldexpf(float __x, int __exponent);
-long double ldexpl(long double __x, int __exponent) __RENAME_LDBL(ldexp, 3, 3);
+long double ldexpl(long double __x, int __exponent);
 
 double log(double __x);
 float logf(float __x);
-long double logl(long double __x) __RENAME_LDBL(log, 3, 21);
+long double logl(long double __x);
 
 double log10(double __x);
 float log10f(float __x);
-long double log10l(long double __x) __RENAME_LDBL(log10, 3, 21);
+long double log10l(long double __x);
 
 double log1p(double __x);
 float log1pf(float __x);
-long double log1pl(long double __x) __RENAME_LDBL(log1p, 3, 21);
+long double log1pl(long double __x);
 
-double log2(double __x) __INTRODUCED_IN(18);
-float log2f(float __x) __INTRODUCED_IN(18);
-long double log2l(long double __x) __RENAME_LDBL(log2, 18, 18);
+double log2(double __x);
+float log2f(float __x);
+long double log2l(long double __x);
 
 double logb(double __x);
 float logbf(float __x);
-long double logbl(long double __x) __RENAME_LDBL(logb, 3, 18);
+long double logbl(long double __x);
 
 double modf(double __x, double* _Nonnull __integral_part);
 float modff(float __x, float* _Nonnull __integral_part);
-long double modfl(long double __x, long double* _Nonnull __integral_part) __RENAME_LDBL(modf, 3, 21);
+long double modfl(long double __x, long double* _Nonnull __integral_part);
 
 double scalbn(double __x, int __exponent);
 float scalbnf(float __x, int __exponent);
-long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
+long double scalbnl(long double __x, int __exponent);
 
-/* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+double scalbln(double __x, long __exponent);
+float scalblnf(float __x, long __exponent);
+long double scalblnl(long double __x, long __exponent);
 
 double cbrt(double __x);
 float cbrtf(float __x);
-long double cbrtl(long double __x) __RENAME_LDBL(cbrt, 3, 21);
+long double cbrtl(long double __x);
 
 double fabs(double __x) __attribute_const__;
 float fabsf(float __x) __attribute_const__;
-long double fabsl(long double __x) __RENAME_LDBL(fabs, 3, 3) __attribute_const__;
+long double fabsl(long double __x) __attribute_const__;
 
 double hypot(double __x, double __y);
 float hypotf(float __x, float __y);
-long double hypotl(long double __x, long double __y) __RENAME_LDBL(hypot, 3, 21);
+long double hypotl(long double __x, long double __y);
 
 double pow(double __x, double __y);
 float powf(float __x, float __y);
-long double powl(long double __x, long double __y) __RENAME_LDBL(pow, 3, 21);
+long double powl(long double __x, long double __y);
 
 double sqrt(double __x);
 float sqrtf(float __x);
-long double sqrtl(long double __x) __RENAME_LDBL(sqrt, 3, 21);
+long double sqrtl(long double __x);
 
 double erf(double __x);
 float erff(float __x);
-long double erfl(long double __x) __RENAME_LDBL(erf, 3, 21);
+long double erfl(long double __x);
 
 double erfc(double __x);
 float erfcf(float __x);
-long double erfcl(long double __x) __RENAME_LDBL(erfc, 3, 21);
+long double erfcl(long double __x);
 
 double lgamma(double __x);
 float lgammaf(float __x);
-long double lgammal(long double __x) __RENAME_LDBL(lgamma, 3, 21);
+long double lgammal(long double __x);
 
 double tgamma(double __x);
 float tgammaf(float __x);
-long double tgammal(long double __x) __RENAME_LDBL(tgamma, 3, 21);
+long double tgammal(long double __x);
 
 double ceil(double __x);
 float ceilf(float __x);
-long double ceill(long double __x) __RENAME_LDBL(ceil, 3, 3);
+long double ceill(long double __x);
 
 double floor(double __x);
 float floorf(float __x);
-long double floorl(long double __x) __RENAME_LDBL(floor, 3, 3);
+long double floorl(long double __x);
 
 double nearbyint(double __x);
 float nearbyintf(float __x);
-long double nearbyintl(long double __x) __RENAME_LDBL(nearbyint, 3, 21);
+long double nearbyintl(long double __x);
 
 double rint(double __x);
 float rintf(float __x);
-long double rintl(long double __x) __RENAME_LDBL(rint, 3, 21);
+long double rintl(long double __x);
 
 long lrint(double __x);
 long lrintf(float __x);
-long lrintl(long double __x) __RENAME_LDBL(lrint, 3, 21);
+long lrintl(long double __x);
 
 long long llrint(double __x);
 long long llrintf(float __x);
-long long llrintl(long double __x) __RENAME_LDBL(llrint, 3, 21);
+long long llrintl(long double __x);
 
 double round(double __x);
 float roundf(float __x);
-long double roundl(long double __x) __RENAME_LDBL(roundl, 3, 3);
+long double roundl(long double __x);
 
 long lround(double __x);
 long lroundf(float __x);
-long lroundl(long double __x) __RENAME_LDBL(lround, 3, 3);
+long lroundl(long double __x);
 
 long long llround(double __x);
 long long llroundf(float __x);
-long long llroundl(long double __x) __RENAME_LDBL(llround, 3, 3);
+long long llroundl(long double __x);
 
 double trunc(double __x);
 float truncf(float __x);
-long double truncl(long double __x) __RENAME_LDBL(trunc, 3, 3);
+long double truncl(long double __x);
 
 double fmod(double __x, double __y);
 float fmodf(float __x, float __y);
-long double fmodl(long double __x, long double __y) __RENAME_LDBL(fmod, 3, 21);
+long double fmodl(long double __x, long double __y);
 
 double remainder(double __x, double __y);
 float remainderf(float __x, float __y);
-long double remainderl(long double __x, long double __y) __RENAME_LDBL(remainder, 3, 21);
+long double remainderl(long double __x, long double __y);
 
 double remquo(double __x, double __y, int* _Nonnull __quotient_bits);
 float remquof(float __x, float __y, int* _Nonnull __quotient_bits);
-long double remquol(long double __x, long double __y, int* _Nonnull __quotient_bits) __RENAME_LDBL(remquo, 3, 21);
+long double remquol(long double __x, long double __y, int* _Nonnull __quotient_bits);
 
 double copysign(double __value, double __sign) __attribute_const__;
 float copysignf(float __value, float __sign) __attribute_const__;
-long double copysignl(long double __value, long double __sign) __RENAME_LDBL(copysign, 3, 3) __attribute_const__;
+long double copysignl(long double __value, long double __sign) __attribute_const__;
 
 double nan(const char* _Nonnull __kind) __attribute_const__;
 float nanf(const char* _Nonnull __kind) __attribute_const__;
-long double nanl(const char* _Nonnull __kind) __RENAME_LDBL(nan, 13, 13) __attribute_const__;
+long double nanl(const char* _Nonnull __kind) __attribute_const__;
 
 double nextafter(double __x, double __y);
 float nextafterf(float __x, float __y);
-long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
+long double nextafterl(long double __x, long double __y);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
+double nexttoward(double __x, long double __y);
 float nexttowardf(float __x, long double __y);
-long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);
+long double nexttowardl(long double __x, long double __y);
 
 double fdim(double __x, double __y);
 float fdimf(float __x, float __y);
-long double fdiml(long double __x, long double __y) __RENAME_LDBL(fdim, 3, 3);
+long double fdiml(long double __x, long double __y);
 
 double fmax(double __x, double __y) __attribute_const__;
 float fmaxf(float __x, float __y) __attribute_const__;
-long double fmaxl(long double __x, long double __y) __RENAME_LDBL(fmax, 3, 3) __attribute_const__;
+long double fmaxl(long double __x, long double __y) __attribute_const__;
 
 double fmin(double __x, double __y) __attribute_const__;
 float fminf(float __x, float __y) __attribute_const__;
-long double fminl(long double __x, long double __y) __RENAME_LDBL(fmin, 3, 3) __attribute_const__;
+long double fminl(long double __x, long double __y) __attribute_const__;
 
 double fma(double __x, double __y, double __z);
 float fmaf(float __x, float __y, float __z);
-long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL_NO_GUARD_FOR_NDK(fma, 3, 21);
+long double fmal(long double __x, long double __y, long double __z);
 
 #define isgreater(x, y) __builtin_isgreater((x), (y))
 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
@@ -320,7 +319,7 @@
  * to the std namespace, making it impossible to use both <cmath> (which gets
  * included by a lot of other standard headers) and ::isnan.
  */
-int (isinf)(double __x) __attribute_const__ __INTRODUCED_IN(21);
+int (isinf)(double __x) __attribute_const__;
 int (isnan)(double __x) __attribute_const__;
 
 /* POSIX extensions. */
@@ -368,7 +367,7 @@
 double lgamma_r(double __x, int* _Nonnull __sign);
 double significand(double __x);
 long double lgammal_r(long double __x, int* _Nonnull __sign) __INTRODUCED_IN(23);
-long double significandl(long double __x) __INTRODUCED_IN(21);
+long double significandl(long double __x);
 float dremf(float __x, float __y);
 int finitef(float __x) __attribute_const__;
 float gammaf(float __x);
diff --git a/libc/include/mntent.h b/libc/include/mntent.h
index 43cab1f..9a31838 100644
--- a/libc/include/mntent.h
+++ b/libc/include/mntent.h
@@ -57,10 +57,10 @@
 
 __BEGIN_DECLS
 
-int endmntent(FILE* _Nullable __fp) __INTRODUCED_IN(21);
+int endmntent(FILE* _Nullable __fp);
 struct mntent* _Nullable getmntent(FILE* _Nonnull __fp);
-struct mntent* _Nullable getmntent_r(FILE* _Nonnull __fp, struct mntent* _Nonnull __entry, char* _Nonnull __buf, int __size) __INTRODUCED_IN(21);
-FILE* _Nullable setmntent(const char* _Nonnull __filename, const char* _Nonnull __type) __INTRODUCED_IN(21);
+struct mntent* _Nullable getmntent_r(FILE* _Nonnull __fp, struct mntent* _Nonnull __entry, char* _Nonnull __buf, int __size);
+FILE* _Nullable setmntent(const char* _Nonnull __filename, const char* _Nonnull __type);
 char* _Nullable hasmntopt(const struct mntent* _Nonnull __entry, const char* _Nonnull __option) __INTRODUCED_IN(26);
 
 __END_DECLS
diff --git a/libc/include/net/if.h b/libc/include/net/if.h
index f261f71..79b4195 100644
--- a/libc/include/net/if.h
+++ b/libc/include/net/if.h
@@ -41,13 +41,13 @@
 
 struct if_nameindex {
   unsigned if_index;
-  char* if_name;
+  char* _Nullable if_name;
 };
 
-char* if_indextoname(unsigned __index, char* __buf);
-unsigned if_nametoindex(const char* __name);
-struct if_nameindex* if_nameindex(void) __INTRODUCED_IN(24);
-void if_freenameindex(struct if_nameindex* __ptr) __INTRODUCED_IN(24);
+char* _Nullable if_indextoname(unsigned __index, char* _Nonnull __buf);
+unsigned if_nametoindex(const char* _Nonnull __name);
+struct if_nameindex* _Nullable if_nameindex(void) __INTRODUCED_IN(24);
+void if_freenameindex(struct if_nameindex* _Nullable __ptr) __INTRODUCED_IN(24);
 
 __END_DECLS
 
diff --git a/libc/include/netdb.h b/libc/include/netdb.h
index 7a1987e..88214d5 100644
--- a/libc/include/netdb.h
+++ b/libc/include/netdb.h
@@ -78,6 +78,8 @@
  * supplied in host order, and returned in network order (suitable for
  * use in system calls).
  */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 struct hostent {
 	char	*h_name;	/* official name of host */
 	char	**h_aliases;	/* alias list */
@@ -98,7 +100,7 @@
 	char	*s_name;	/* official service name */
 	char	**s_aliases;	/* alias list */
 	int	s_port;		/* port # */
-	char	*s_proto;	/* protocol to use */
+	char	* _Nullable s_proto;	/* protocol to use */
 };
 
 struct protoent {
@@ -117,6 +119,7 @@
 	struct	sockaddr *ai_addr;	/* binary address */
 	struct	addrinfo *ai_next;	/* next structure in linked list */
 };
+#pragma clang diagnostic pop
 
 /*
  * Error return codes from gethostbyname() and gethostbyaddr()
@@ -196,47 +199,47 @@
 
 __BEGIN_DECLS
 
-int getaddrinfo(const char* __node, const char* __service, const struct addrinfo* __hints, struct addrinfo** __result);
-void freeaddrinfo(struct addrinfo* __ptr);
+int getaddrinfo(const char* _Nullable __node, const char* _Nullable __service, const struct addrinfo* _Nullable __hints, struct addrinfo* _Nullable * _Nonnull __result);
+void freeaddrinfo(struct addrinfo* _Nullable __ptr);
 
 /* Android ABI error: POSIX getnameinfo(3) uses socklen_t rather than size_t. */
-int getnameinfo(const struct sockaddr* __sa, socklen_t __sa_length, char* __host, size_t __host_length, char* __service, size_t __service_length, int __flags);
-const char* gai_strerror(int __error);
+int getnameinfo(const struct sockaddr* _Nonnull __sa, socklen_t __sa_length, char* _Nullable __host, size_t __host_length, char* _Nullable __service, size_t __service_length, int __flags);
+const char* _Nonnull gai_strerror(int __error);
 
 /* These functions are obsolete. Use getaddrinfo/getnameinfo instead. */
 #define h_errno (*__get_h_errno())
-int* __get_h_errno(void);
-void herror(const char* __s);
-const char* hstrerror(int __error);
-struct hostent* gethostbyaddr(const void* __addr, socklen_t __length, int __type);
-int gethostbyaddr_r(const void* __addr, socklen_t __length, int __type, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr) __INTRODUCED_IN(23);
-struct hostent* gethostbyname(const char* __name);
-int gethostbyname_r(const char* __name, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr);
-struct hostent* gethostbyname2(const char* __name, int __af);
-int gethostbyname2_r(const char* __name, int __af, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr) __INTRODUCED_IN(23);
+int* _Nonnull __get_h_errno(void);
+void herror(const char* _Nonnull __s);
+const char* _Nonnull hstrerror(int __error);
+struct hostent* _Nullable gethostbyaddr(const void* _Nonnull __addr, socklen_t __length, int __type);
+int gethostbyaddr_r(const void* _Nonnull __addr, socklen_t __length, int __type, struct hostent* _Nonnull __ret, char* _Nonnull __buf, size_t __buf_size, struct hostent* _Nullable * _Nonnull __result, int* _Nonnull __h_errno_ptr) __INTRODUCED_IN(23);
+struct hostent* _Nullable gethostbyname(const char* _Nonnull __name);
+int gethostbyname_r(const char* _Nonnull __name, struct hostent* _Nonnull __ret, char* _Nonnull __buf, size_t __buf_size, struct hostent* _Nullable * _Nonnull __result, int* _Nonnull __h_errno_ptr);
+struct hostent* _Nullable gethostbyname2(const char* _Nonnull __name, int __af);
+int gethostbyname2_r(const char* _Nonnull __name, int __af, struct hostent* _Nonnull __ret, char* _Nonnull __buf, size_t __buf_size, struct hostent* _Nullable * _Nonnull __result, int* _Nonnull __h_errno_ptr) __INTRODUCED_IN(23);
 void endhostent(void) __INTRODUCED_IN(28);
-struct hostent* gethostent(void);
+struct hostent* _Nullable gethostent(void);
 void sethostent(int __stay_open) __INTRODUCED_IN(28);
 
 /* These functions are obsolete. None of these functions return anything but nullptr. */
 void endnetent(void) __INTRODUCED_IN(28);
-struct netent* getnetbyaddr(uint32_t __net, int __type);
-struct netent* getnetbyname(const char* __name);
-struct netent* getnetent(void) __INTRODUCED_IN(28);
+struct netent* _Nullable getnetbyaddr(uint32_t __net, int __type);
+struct netent* _Nullable getnetbyname(const char* _Nonnull __name);
+struct netent* _Nullable getnetent(void) __INTRODUCED_IN(28);
 void setnetent(int __stay_open) __INTRODUCED_IN(28);
 
 /* None of these functions return anything but nullptr. */
 void endprotoent(void) __INTRODUCED_IN(28);
-struct protoent* getprotobyname(const char* __name);
-struct protoent* getprotobynumber(int __proto);
-struct protoent* getprotoent(void) __INTRODUCED_IN(28);
+struct protoent* _Nullable getprotobyname(const char* _Nonnull __name);
+struct protoent* _Nullable getprotobynumber(int __proto);
+struct protoent* _Nullable getprotoent(void) __INTRODUCED_IN(28);
 void setprotoent(int __stay_open) __INTRODUCED_IN(28);
 
 /* These functions return entries from a built-in database. */
 void endservent(void);
-struct servent* getservbyname(const char* __name, const char* __proto);
-struct servent* getservbyport(int __port_in_network_order, const char* __proto);
-struct servent* getservent(void);
+struct servent* _Nullable getservbyname(const char* _Nonnull __name, const char* _Nullable __proto);
+struct servent* _Nullable getservbyport(int __port_in_network_order, const char* _Nullable __proto);
+struct servent* _Nullable getservent(void);
 void setservent(int __stay_open);
 
 __END_DECLS
diff --git a/libc/include/netinet/ether.h b/libc/include/netinet/ether.h
index 480063d..d570c18 100644
--- a/libc/include/netinet/ether.h
+++ b/libc/include/netinet/ether.h
@@ -44,7 +44,7 @@
  *
  * Returns a pointer to a static buffer.
  */
-char* ether_ntoa(const struct ether_addr* __addr);
+char* _Nonnull ether_ntoa(const struct ether_addr* _Nonnull __addr);
 
 /**
  * [ether_ntoa_r(3)](http://man7.org/linux/man-pages/man3/ether_ntoa_r.3.html) returns a string
@@ -52,7 +52,7 @@
  *
  * Returns a pointer to the given buffer.
  */
-char* ether_ntoa_r(const struct ether_addr* __addr, char* __buf);
+char* _Nonnull ether_ntoa_r(const struct ether_addr* _Nonnull __addr, char* _Nonnull __buf);
 
 /**
  * [ether_aton(3)](http://man7.org/linux/man-pages/man3/ether_aton.3.html) returns an `ether_addr`
@@ -60,7 +60,7 @@
  *
  * Returns a pointer to a static buffer, or NULL if the given string isn't a valid MAC address.
  */
-struct ether_addr* ether_aton(const char* __ascii);
+struct ether_addr* _Nullable ether_aton(const char* _Nonnull __ascii);
 
 /**
  * [ether_aton_r(3)](http://man7.org/linux/man-pages/man3/ether_aton_r.3.html) returns an
@@ -68,6 +68,6 @@
  *
  * Returns a pointer to the given buffer, or NULL if the given string isn't a valid MAC address.
  */
-struct ether_addr* ether_aton_r(const char* __ascii, struct ether_addr* __addr);
+struct ether_addr* _Nullable ether_aton_r(const char* _Nonnull __ascii, struct ether_addr* _Nonnull __addr);
 
 __END_DECLS
diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h
index 46e3543..b235e6e 100644
--- a/libc/include/netinet/in.h
+++ b/libc/include/netinet/in.h
@@ -54,7 +54,7 @@
 
 typedef uint16_t in_port_t;
 
-int bindresvport(int __fd, struct sockaddr_in* __sin);
+int bindresvport(int __fd, struct sockaddr_in* _Nullable __sin);
 
 #if __ANDROID_API__ >= 24
 extern const struct in6_addr in6addr_any __INTRODUCED_IN(24);
diff --git a/libc/include/poll.h b/libc/include/poll.h
index e3a9039..6bdc886 100644
--- a/libc/include/poll.h
+++ b/libc/include/poll.h
@@ -58,10 +58,8 @@
  *
  * Returns the number of ready file descriptors on success, 0 for timeout,
  * and returns -1 and sets `errno` on failure.
- *
- * Available since API level 28.
  */
-int ppoll(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
+int ppoll(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask);
 
 /**
  * Like ppoll() but allows setting a signal mask with RT signals even from a 32-bit process.
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 98695eb..1f08628 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -116,10 +116,10 @@
 int pthread_attr_setstacksize(pthread_attr_t* _Nonnull __addr, size_t __size);
 
 int pthread_condattr_destroy(pthread_condattr_t* _Nonnull __attr);
-int pthread_condattr_getclock(const pthread_condattr_t* _Nonnull __attr, clockid_t* _Nonnull __clock) __INTRODUCED_IN(21);
+int pthread_condattr_getclock(const pthread_condattr_t* _Nonnull __attr, clockid_t* _Nonnull __clock);
 int pthread_condattr_getpshared(const pthread_condattr_t* _Nonnull __attr, int* _Nonnull __shared);
 int pthread_condattr_init(pthread_condattr_t* _Nonnull __attr);
-int pthread_condattr_setclock(pthread_condattr_t* _Nonnull __attr, clockid_t __clock) __INTRODUCED_IN(21);
+int pthread_condattr_setclock(pthread_condattr_t* _Nonnull __attr, clockid_t __clock);
 int pthread_condattr_setpshared(pthread_condattr_t* _Nonnull __attr, int __shared);
 
 int pthread_cond_broadcast(pthread_cond_t* _Nonnull __cond);
@@ -169,7 +169,7 @@
 
 void* _Nullable pthread_getspecific(pthread_key_t __key);
 
-pid_t pthread_gettid_np(pthread_t __pthread) __INTRODUCED_IN(21);
+pid_t pthread_gettid_np(pthread_t __pthread);
 
 int pthread_join(pthread_t __pthread, void* _Nullable * _Nullable __return_value_ptr);
 
@@ -190,8 +190,7 @@
 int pthread_mutex_destroy(pthread_mutex_t* _Nonnull __mutex);
 int pthread_mutex_init(pthread_mutex_t* _Nonnull __mutex, const pthread_mutexattr_t* _Nullable __attr);
 int pthread_mutex_lock(pthread_mutex_t* _Nonnull __mutex);
-int pthread_mutex_timedlock(pthread_mutex_t* _Nonnull __mutex, const struct timespec* _Nullable __timeout)
-  __INTRODUCED_IN(21);
+int pthread_mutex_timedlock(pthread_mutex_t* _Nonnull __mutex, const struct timespec* _Nullable __timeout);
 
 /*
  * POSIX historically only supported using pthread_mutex_timedlock() with CLOCK_REALTIME, however
diff --git a/libc/include/sched.h b/libc/include/sched.h
index 26bc742..b1f1842 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -172,27 +172,23 @@
  * Returns the pid of the child to the caller on success and
  * returns -1 and sets `errno` on failure.
  */
-int clone(int (* __BIONIC_COMPLICATED_NULLNESS __fn)(void* __BIONIC_COMPLICATED_NULLNESS ), void* __BIONIC_COMPLICATED_NULLNESS __child_stack, int __flags, void* _Nullable __arg, ...) __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_X86(17);
+int clone(int (* __BIONIC_COMPLICATED_NULLNESS __fn)(void* __BIONIC_COMPLICATED_NULLNESS ), void* __BIONIC_COMPLICATED_NULLNESS __child_stack, int __flags, void* _Nullable __arg, ...);
 
 /**
  * [unshare(2)](http://man7.org/linux/man-pages/man2/unshare.2.html)
  * disassociates part of the caller's execution context.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
- *
- * Available since API level 17.
  */
-int unshare(int __flags) __INTRODUCED_IN(17);
+int unshare(int __flags);
 
 /**
  * [setns(2)](http://man7.org/linux/man-pages/man2/setns.2.html)
  * reassociates a thread with a different namespace.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
- *
- * Available since API level 21.
  */
-int setns(int __fd, int __ns_type) __INTRODUCED_IN(21);
+int setns(int __fd, int __ns_type);
 
 /**
  * [sched_getcpu(3)](http://man7.org/linux/man-pages/man3/sched_getcpu.3.html)
diff --git a/libc/include/search.h b/libc/include/search.h
index 00deef1..fe897d1 100644
--- a/libc/include/search.h
+++ b/libc/include/search.h
@@ -66,18 +66,14 @@
 /**
  * [insque(3)](http://man7.org/linux/man-pages/man3/insque.3.html) inserts
  * an item in a queue (an intrusive doubly-linked list).
- *
- * Available since API level 21.
  */
-void insque(void* _Nonnull __element, void* _Nullable __previous) __INTRODUCED_IN(21);
+void insque(void* _Nonnull __element, void* _Nullable __previous);
 
 /**
  * [remque(3)](http://man7.org/linux/man-pages/man3/remque.3.html) removes
  * an item from a queue (an intrusive doubly-linked list).
- *
- * Available since API level 21.
  */
-void remque(void* _Nonnull __element) __INTRODUCED_IN(21);
+void remque(void* _Nonnull __element);
 
 /**
  * [hcreate(3)](http://man7.org/linux/man-pages/man3/hcreate.3.html)
@@ -155,10 +151,8 @@
  * See bsearch() if you have a sorted array.
  *
  * Returns a pointer to the matching element on success, or NULL on failure.
- *
- * Available since API level 21.
  */
-void* _Nullable lfind(const void* _Nonnull __key, const void* _Nonnull __array, size_t* _Nonnull __count, size_t __size, int (* _Nonnull __comparator)(const void* _Nonnull, const void* _Nonnull)) __INTRODUCED_IN(21);
+void* _Nullable lfind(const void* _Nonnull __key, const void* _Nonnull __array, size_t* _Nonnull __count, size_t __size, int (* _Nonnull __comparator)(const void* _Nonnull, const void* _Nonnull));
 
 /**
  * [lsearch(3)](http://man7.org/linux/man-pages/man3/lsearch.3.html) brute-force
@@ -170,10 +164,8 @@
  *
  * Returns a pointer to the matching element on success, or to the newly-added
  * element on failure.
- *
- * Available since API level 21.
  */
-void* _Nonnull lsearch(const void* _Nonnull __key, void* _Nonnull __array, size_t* _Nonnull __count, size_t __size, int (* _Nonnull __comparator)(const void* _Nonnull, const void* _Nonnull)) __INTRODUCED_IN(21);
+void* _Nonnull lsearch(const void* _Nonnull __key, void* _Nonnull __array, size_t* _Nonnull __count, size_t __size, int (* _Nonnull __comparator)(const void* _Nonnull, const void* _Nonnull));
 
 /**
  * [tdelete(3)](http://man7.org/linux/man-pages/man3/tdelete.3.html) searches
@@ -214,6 +206,6 @@
  * [twalk(3)](http://man7.org/linux/man-pages/man3/twalk.3.html) calls
  * `__visitor` on every node in the tree.
  */
-void twalk(const void* _Nullable __root, void (* _Nullable __visitor)(const void* _Nullable, VISIT, int)) __INTRODUCED_IN(21);
+void twalk(const void* _Nullable __root, void (* _Nullable __visitor)(const void* _Nullable, VISIT, int));
 
 __END_DECLS
diff --git a/libc/include/signal.h b/libc/include/signal.h
index b9aeaab..cf83db8 100644
--- a/libc/include/signal.h
+++ b/libc/include/signal.h
@@ -51,8 +51,8 @@
 /* We take a few real-time signals for ourselves. May as well use the same names as glibc. */
 #define SIGRTMIN (__libc_current_sigrtmin())
 #define SIGRTMAX (__libc_current_sigrtmax())
-int __libc_current_sigrtmin(void) __INTRODUCED_IN(21);
-int __libc_current_sigrtmax(void) __INTRODUCED_IN(21);
+int __libc_current_sigrtmin(void);
+int __libc_current_sigrtmax(void);
 
 extern const char* _Nonnull const sys_siglist[_NSIG];
 extern const char* _Nonnull const sys_signame[_NSIG]; /* BSD compatibility. */
@@ -64,16 +64,16 @@
 
 int siginterrupt(int __signal, int __flag);
 
-sighandler_t _Nonnull signal(int __signal, sighandler_t _Nullable __handler) __INTRODUCED_IN(21);
-int sigaddset(sigset_t* _Nonnull __set, int __signal) __INTRODUCED_IN(21);
+sighandler_t _Nonnull signal(int __signal, sighandler_t _Nullable __handler);
+int sigaddset(sigset_t* _Nonnull __set, int __signal);
 int sigaddset64(sigset64_t* _Nonnull __set, int __signal) __INTRODUCED_IN(28);
-int sigdelset(sigset_t* _Nonnull __set, int __signal) __INTRODUCED_IN(21);
+int sigdelset(sigset_t* _Nonnull __set, int __signal);
 int sigdelset64(sigset64_t* _Nonnull __set, int __signal) __INTRODUCED_IN(28);
-int sigemptyset(sigset_t* _Nonnull __set) __INTRODUCED_IN(21);
+int sigemptyset(sigset_t* _Nonnull __set);
 int sigemptyset64(sigset64_t* _Nonnull __set) __INTRODUCED_IN(28);
-int sigfillset(sigset_t* _Nonnull __set) __INTRODUCED_IN(21);
+int sigfillset(sigset_t* _Nonnull __set);
 int sigfillset64(sigset64_t* _Nonnull __set) __INTRODUCED_IN(28);
-int sigismember(const sigset_t* _Nonnull __set, int __signal) __INTRODUCED_IN(21);
+int sigismember(const sigset_t* _Nonnull __set, int __signal);
 int sigismember64(const sigset64_t* _Nonnull __set, int __signal) __INTRODUCED_IN(28);
 
 int sigpending(sigset_t* _Nonnull __set);
@@ -105,8 +105,8 @@
 
 int sigaltstack(const stack_t* _Nullable __new_signal_stack, stack_t*  _Nullable __old_signal_stack);
 
-void psiginfo(const siginfo_t* _Nonnull __info, const char* _Nullable __msg) __INTRODUCED_IN(17);
-void psignal(int __signal, const char* _Nullable __msg) __INTRODUCED_IN(17);
+void psiginfo(const siginfo_t* _Nonnull __info, const char* _Nullable __msg);
+void psignal(int __signal, const char* _Nullable __msg);
 
 int pthread_kill(pthread_t __pthread, int __signal);
 #if defined(__USE_GNU)
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index e748faa..2fc5b21 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -118,8 +118,8 @@
 size_t fwrite(const void* _Nonnull __buf, size_t __size, size_t __count, FILE* _Nonnull __fp);
 int getc(FILE* _Nonnull __fp);
 int getchar(void);
-ssize_t getdelim(char* _Nullable * _Nonnull __line_ptr, size_t* _Nonnull __line_length_ptr, int __delimiter, FILE* _Nonnull __fp) __INTRODUCED_IN(18);
-ssize_t getline(char* _Nullable * _Nonnull __line_ptr, size_t* _Nonnull __line_length_ptr, FILE* _Nonnull __fp) __INTRODUCED_IN(18);
+ssize_t getdelim(char* _Nullable * _Nonnull __line_ptr, size_t* _Nonnull __line_length_ptr, int __delimiter, FILE* _Nonnull __fp);
+ssize_t getline(char* _Nullable * _Nonnull __line_ptr, size_t* _Nonnull __line_length_ptr, FILE* _Nonnull __fp);
 
 void perror(const char* _Nullable __msg);
 int printf(const char* _Nonnull __fmt, ...) __printflike(1, 2);
@@ -136,16 +136,16 @@
 int vfprintf(FILE* _Nonnull __fp, const char* _Nonnull __fmt, va_list __args) __printflike(2, 0);
 int vprintf(const char* _Nonnull __fp, va_list __args) __printflike(1, 0);
 
-int dprintf(int __fd, const char* _Nonnull __fmt, ...) __printflike(2, 3) __INTRODUCED_IN(21);
-int vdprintf(int __fd, const char* _Nonnull __fmt, va_list __args) __printflike(2, 0) __INTRODUCED_IN(21);
+int dprintf(int __fd, const char* _Nonnull __fmt, ...) __printflike(2, 3);
+int vdprintf(int __fd, const char* _Nonnull __fmt, va_list __args) __printflike(2, 0);
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L) || \
     (defined(__cplusplus) && __cplusplus <= 201103L)
 char* _Nullable gets(char* _Nonnull __buf) __attribute__((deprecated("gets is unsafe, use fgets instead")));
 #endif
-int sprintf(char* _Nonnull __s, const char* _Nonnull __fmt, ...)
+int sprintf(char* __BIONIC_COMPLICATED_NULLNESS __s, const char* _Nonnull __fmt, ...)
     __printflike(2, 3) __warnattr_strict("sprintf is often misused; please use snprintf");
-int vsprintf(char* _Nonnull __s, const char* _Nonnull __fmt, va_list __args)
+int vsprintf(char* __BIONIC_COMPLICATED_NULLNESS __s, const char* _Nonnull __fmt, va_list __args)
     __printflike(2, 0) __warnattr_strict("vsprintf is often misused; please use vsnprintf");
 char* _Nullable tmpnam(char* _Nullable __s)
     __warnattr("tmpnam is unsafe, use mkstemp or tmpfile instead");
@@ -251,10 +251,10 @@
 FILE* _Nullable tmpfile(void);
 FILE* _Nullable tmpfile64(void) __INTRODUCED_IN(24);
 
-int snprintf(char* _Nullable __buf, size_t __size, const char* _Nonnull __fmt, ...) __printflike(3, 4);
+int snprintf(char* __BIONIC_COMPLICATED_NULLNESS __buf, size_t __size, const char* _Nonnull __fmt, ...) __printflike(3, 4);
 int vfscanf(FILE* _Nonnull __fp, const char* _Nonnull __fmt, va_list __args) __scanflike(2, 0);
 int vscanf(const char* _Nonnull __fmt , va_list __args) __scanflike(1, 0);
-int vsnprintf(char* _Nullable __buf, size_t __size, const char* _Nonnull __fmt, va_list __args) __printflike(3, 0);
+int vsnprintf(char* __BIONIC_COMPLICATED_NULLNESS __buf, size_t __size, const char* _Nonnull __fmt, va_list __args) __printflike(3, 0);
 int vsscanf(const char* _Nonnull __s, const char* _Nonnull __fmt, va_list __args) __scanflike(2, 0);
 
 #define L_ctermid 1024 /* size for ctermid() */
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 2bcb870..ef81c83 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -43,12 +43,12 @@
 
 __noreturn void abort(void) __attribute__((__nomerge__));
 __noreturn void exit(int __status);
-__noreturn void _Exit(int __status) __INTRODUCED_IN(21);
+__noreturn void _Exit(int __status);
 
 int atexit(void (* _Nonnull __fn)(void));
 
-int at_quick_exit(void (* _Nonnull __fn)(void)) __INTRODUCED_IN(21);
-void quick_exit(int __status) __noreturn __INTRODUCED_IN(21);
+int at_quick_exit(void (* _Nonnull __fn)(void));
+void quick_exit(int __status) __noreturn;
 
 char* _Nullable getenv(const char* _Nonnull __name);
 int putenv(char* _Nonnull __assignment);
@@ -63,7 +63,7 @@
 int mkostemp(char* _Nonnull __template, int __flags) __INTRODUCED_IN(23);
 int mkostemps64(char* _Nonnull __template, int __suffix_length, int __flags) __INTRODUCED_IN(23);
 int mkostemps(char* _Nonnull __template, int __suffix_length, int __flags) __INTRODUCED_IN(23);
-int mkstemp64(char* _Nonnull __template) __INTRODUCED_IN(21);
+int mkstemp64(char* _Nonnull __template);
 int mkstemp(char* _Nonnull __template);
 int mkstemps64(char* _Nonnull __template, int __flags) __INTRODUCED_IN(23);
 int mkstemps(char* _Nonnull __template, int __flags);
@@ -73,12 +73,12 @@
 unsigned long strtoul(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
 unsigned long long strtoull(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
 
-int posix_memalign(void* _Nullable * _Nullable __memptr, size_t __alignment, size_t __size) __INTRODUCED_IN(17);
+int posix_memalign(void* _Nullable * _Nullable __memptr, size_t __alignment, size_t __size);
 
 void* _Nullable aligned_alloc(size_t __alignment, size_t __size) __INTRODUCED_IN(28);
 
 double strtod(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr);
-long double strtold(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr) __RENAME_LDBL(strtod, 3, 21);
+long double strtold(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr);
 
 unsigned long strtoul_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(26);
 
@@ -99,7 +99,7 @@
 
 #define RAND_MAX 0x7fffffff
 
-int rand_r(unsigned int* _Nonnull __seed_ptr) __INTRODUCED_IN(21);
+int rand_r(unsigned int* _Nonnull __seed_ptr);
 
 double drand48(void);
 double erand48(unsigned short __xsubi[_Nonnull 3]);
@@ -111,11 +111,11 @@
 unsigned short* _Nonnull seed48(unsigned short __seed16v[_Nonnull 3]);
 void srand48(long __seed);
 
-char* _Nullable initstate(unsigned int __seed, char* _Nonnull __state, size_t __n) __INTRODUCED_IN(21);
-char* _Nullable setstate(char* _Nonnull __state) __INTRODUCED_IN(21);
+char* _Nullable initstate(unsigned int __seed, char* _Nonnull __state, size_t __n);
+char* _Nullable setstate(char* _Nonnull __state);
 
 int getpt(void);
-int posix_openpt(int __flags) __INTRODUCED_IN(21);
+int posix_openpt(int __flags);
 char* _Nullable ptsname(int __fd);
 int ptsname_r(int __fd, char* _Nonnull __buf, size_t __n);
 int unlockpt(int __fd);
@@ -153,38 +153,38 @@
 int getloadavg(double __averages[_Nonnull], int __n) __INTRODUCED_IN(29);
 
 /* BSD compatibility. */
-const char* _Nullable getprogname(void) __INTRODUCED_IN(21);
-void setprogname(const char* _Nonnull __name) __INTRODUCED_IN(21);
+const char* _Nullable getprogname(void);
+void setprogname(const char* _Nonnull __name);
 
 int mblen(const char* _Nullable __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
-size_t mbstowcs(wchar_t* _Nullable __dst, const char* _Nullable __src, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
-int mbtowc(wchar_t* _Nullable __wc_ptr, const char*  _Nullable __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
-int wctomb(char* _Nullable __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+size_t mbstowcs(wchar_t* _Nullable __dst, const char* _Nullable __src, size_t __n);
+int mbtowc(wchar_t* _Nullable __wc_ptr, const char*  _Nullable __s, size_t __n);
+int wctomb(char* _Nullable __dst, wchar_t __wc);
 
-size_t wcstombs(char* _Nullable __dst, const wchar_t* _Nullable __src, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+size_t wcstombs(char* _Nullable __dst, const wchar_t* _Nullable __src, size_t __n);
 
-size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
+size_t __ctype_get_mb_cur_max(void);
 #define MB_CUR_MAX __ctype_get_mb_cur_max()
 
 #if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
 #include <bits/fortify/stdlib.h>
 #endif
 
-int abs(int __x) __attribute_const__ __INTRODUCED_IN(19);
-long labs(long __x) __attribute_const__ __INTRODUCED_IN(19);
-long long llabs(long long __x) __attribute_const__ __INTRODUCED_IN(19);
+int abs(int __x) __attribute_const__;
+long labs(long __x) __attribute_const__;
+long long llabs(long long __x) __attribute_const__;
 
-float strtof(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr) __INTRODUCED_IN(21);
-double atof(const char* _Nonnull __s) __attribute_pure__ __INTRODUCED_IN(21);
-int rand(void) __INTRODUCED_IN(21);
-void srand(unsigned int __seed) __INTRODUCED_IN(21);
-long random(void) __INTRODUCED_IN(21);
-void srandom(unsigned int __seed) __INTRODUCED_IN(21);
-int grantpt(int __fd) __INTRODUCED_IN(21);
+float strtof(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr);
+double atof(const char* _Nonnull __s) __attribute_pure__;
+int rand(void);
+void srand(unsigned int __seed);
+long random(void);
+void srandom(unsigned int __seed);
+int grantpt(int __fd);
 
-long long strtoll_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-unsigned long long strtoull_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-long double strtold_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+long long strtoll_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l);
+unsigned long long strtoull_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l);
+long double strtold_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l);
 
 #if __ANDROID_API__ >= 26
 double strtod_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l) __INTRODUCED_IN(26);
diff --git a/libc/include/string.h b/libc/include/string.h
index d6b2967..e7fd9a5 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -76,7 +76,7 @@
 void* _Nullable memmem(const void* _Nonnull __haystack, size_t __haystack_size, const void* _Nonnull __needle, size_t __needle_size) __attribute_pure__;
 
 char* _Nullable strchr(const char* _Nonnull __s, int __ch) __attribute_pure__;
-char* _Nullable __strchr_chk(const char* _Nonnull __s, int __ch, size_t __n) __INTRODUCED_IN(18);
+char* _Nullable __strchr_chk(const char* _Nonnull __s, int __ch, size_t __n);
 #if defined(__USE_GNU)
 #if defined(__cplusplus)
 extern "C++" char* _Nonnull strchrnul(char* _Nonnull __s, int __ch) __RENAME(strchrnul) __attribute_pure__ __INTRODUCED_IN(24);
@@ -87,13 +87,13 @@
 #endif
 
 char* _Nullable strrchr(const char* _Nonnull __s, int __ch) __attribute_pure__;
-char* _Nullable __strrchr_chk(const char* _Nonnull __s, int __ch, size_t __n) __INTRODUCED_IN(18);
+char* _Nullable __strrchr_chk(const char* _Nonnull __s, int __ch, size_t __n);
 
 size_t strlen(const char* _Nonnull __s) __attribute_pure__;
-size_t __strlen_chk(const char* _Nonnull __s, size_t __n) __INTRODUCED_IN(17);
+size_t __strlen_chk(const char* _Nonnull __s, size_t __n);
 
 int strcmp(const char* _Nonnull __lhs, const char* _Nonnull __rhs) __attribute_pure__;
-char* _Nonnull stpcpy(char* _Nonnull __dst, const char* _Nonnull __src) __INTRODUCED_IN(21);
+char* _Nonnull stpcpy(char* _Nonnull __dst, const char* _Nonnull __src);
 char* _Nonnull strcpy(char* _Nonnull __dst, const char* _Nonnull __src);
 char* _Nonnull strcat(char* _Nonnull __dst, const char* _Nonnull __src);
 char* _Nullable strdup(const char* _Nonnull __s);
@@ -120,7 +120,7 @@
 char* _Nonnull strncat(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n);
 char* _Nullable strndup(const char* _Nonnull __s, size_t __n);
 int strncmp(const char* _Nonnull __lhs, const char* _Nonnull __rhs, size_t __n) __attribute_pure__;
-char* _Nonnull stpncpy(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n) __INTRODUCED_IN(21);
+char* _Nonnull stpncpy(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n);
 char* _Nonnull strncpy(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n);
 
 size_t strlcat(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n);
@@ -136,8 +136,8 @@
 int strcoll(const char* _Nonnull __lhs, const char* _Nonnull __rhs) __attribute_pure__;
 size_t strxfrm(char* __BIONIC_COMPLICATED_NULLNESS __dst, const char* _Nonnull __src, size_t __n);
 
-int strcoll_l(const char* _Nonnull __lhs, const char* _Nonnull __rhs, locale_t _Nonnull __l) __attribute_pure__ __INTRODUCED_IN(21);
-size_t strxfrm_l(char* __BIONIC_COMPLICATED_NULLNESS __dst, const char* _Nonnull __src, size_t __n, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+int strcoll_l(const char* _Nonnull __lhs, const char* _Nonnull __rhs, locale_t _Nonnull __l) __attribute_pure__;
+size_t strxfrm_l(char* __BIONIC_COMPLICATED_NULLNESS __dst, const char* _Nonnull __src, size_t __n, locale_t _Nonnull __l);
 
 #if defined(__USE_GNU) && !defined(basename)
 /*
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 744a45b..943d4c6 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -61,7 +61,7 @@
 ** This was previously for testing, but now that SystemProperties is its own testable class,
 ** there is never a reason to call this function and its implementation simply returns -1.
 */
-int __system_property_set_filename(const char* __filename);
+int __system_property_set_filename(const char* __unused __filename);
 
 /*
 ** Initialize the area to be used to store properties.  Can
@@ -102,7 +102,7 @@
 **
 ** Returns 0 on success, -1 if the property area is full.
 */
-int __system_property_add(const char* __name, unsigned int __name_length, const char* __value, unsigned int __value_length);
+int __system_property_add(const char* _Nonnull __name, unsigned int __name_length, const char* _Nonnull __value, unsigned int __value_length);
 
 /* Update the value of a system property returned by
 ** __system_property_find.  Can only be done by a single process
@@ -112,14 +112,14 @@
 **
 ** Returns 0 on success, -1 if the parameters are incorrect.
 */
-int __system_property_update(prop_info* __pi, const char* __value, unsigned int __value_length);
+int __system_property_update(prop_info* _Nonnull __pi, const char* _Nonnull __value, unsigned int __value_length);
 
 /* Read the serial number of a system property returned by
 ** __system_property_find.
 **
 ** Returns the serial number on success, -1 on error.
 */
-uint32_t __system_property_serial(const prop_info* __pi);
+uint32_t __system_property_serial(const prop_info* _Nonnull __pi);
 
 /* Initialize the system properties area in read only mode.
  * Should be done by all processes that need to read system
diff --git a/libc/include/sys/auxv.h b/libc/include/sys/auxv.h
index bf70dda..b664e2a 100644
--- a/libc/include/sys/auxv.h
+++ b/libc/include/sys/auxv.h
@@ -45,9 +45,7 @@
  *
  * Returns the corresponding value on success,
  * and returns 0 and sets `errno` to `ENOENT` on failure.
- *
- * Available since API level 18.
  */
-unsigned long int getauxval(unsigned long int __type) __INTRODUCED_IN(18);
+unsigned long int getauxval(unsigned long int __type);
 
 __END_DECLS
diff --git a/libc/include/sys/cachectl.h b/libc/include/sys/cachectl.h
index 5ec295d..fd775ee 100644
--- a/libc/include/sys/cachectl.h
+++ b/libc/include/sys/cachectl.h
@@ -28,6 +28,27 @@
 
 #pragma once
 
+/*
+ * @file sys/cachectl.h
+ * @brief Architecture-specific cache control.
+ */
+
 #include <sys/cdefs.h>
 
-/* This header file is obsolete. */
+__BEGIN_DECLS
+
+/**
+ * Flag for __riscv_flush_icache() to indicate that only the current
+ * thread's instruction cache needs to be flushed (rather than the
+ * default of all threads).
+ */
+#define SYS_RISCV_FLUSH_ICACHE_LOCAL 1UL
+
+/**
+ * __riscv_flush_icache(2) flushes the instruction cache for the given range of addresses.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ */
+int __riscv_flush_icache(void* __start, void* __end, unsigned long __flags);
+
+__END_DECLS
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 484757e..4154e62 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -201,39 +201,6 @@
 #  define __RENAME_IF_FILE_OFFSET64(func)
 #endif
 
-/*
- * For LP32, `long double` == `double`. Historically many `long double` functions were incorrect
- * on x86, missing on most architectures, and even if they are present and correct, linking to
- * them just bloats your ELF file by adding extra relocations. The __BIONIC_LP32_USE_LONG_DOUBLE
- * macro lets us test the headers both ways (and adds an escape valve).
- *
- * Note that some functions have their __RENAME_LDBL commented out as a sign that although we could
- * use __RENAME_LDBL it would actually cause the function to be introduced later because the
- * `long double` variant appeared before the `double` variant.
- *
- * The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
- * allows libc++ to refer to these functions in inlines without needing to guard them, needed since
- * libc++ doesn't currently guard these calls. There's no risk to the apps though because using
- * those APIs will still cause a link error.
- */
-#if defined(__LP64__) || defined(__BIONIC_LP32_USE_LONG_DOUBLE)
-#define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
-#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN_NO_GUARD_FOR_NDK(regular_api_level)
-#else
-#define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
-#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN_NO_GUARD_FOR_NDK(rewrite_api_level)
-#endif
-
-/*
- * On all architectures, `struct stat` == `struct stat64`, but LP32 didn't gain the *64 functions
- * until API level 21.
- */
-#if defined(__LP64__) || defined(__BIONIC_LP32_USE_STAT64)
-#define __RENAME_STAT64(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
-#else
-#define __RENAME_STAT64(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
-#endif
-
 /* glibc compatibility. */
 #if defined(__LP64__)
 #define __WORDSIZE 64
diff --git a/libc/include/sys/endian.h b/libc/include/sys/endian.h
index 9155b4c..1c7448c 100644
--- a/libc/include/sys/endian.h
+++ b/libc/include/sys/endian.h
@@ -49,10 +49,10 @@
 
 /* glibc compatibility. */
 __BEGIN_DECLS
-uint32_t htonl(uint32_t __x) __attribute_const__ __INTRODUCED_IN(21);
-uint16_t htons(uint16_t __x) __attribute_const__ __INTRODUCED_IN(21);
-uint32_t ntohl(uint32_t __x) __attribute_const__ __INTRODUCED_IN(21);
-uint16_t ntohs(uint16_t __x) __attribute_const__ __INTRODUCED_IN(21);
+uint32_t htonl(uint32_t __x) __attribute_const__;
+uint16_t htons(uint16_t __x) __attribute_const__;
+uint32_t ntohl(uint32_t __x) __attribute_const__;
+uint16_t ntohs(uint16_t __x) __attribute_const__;
 __END_DECLS
 
 #define htonl(x) __swap32(x)
diff --git a/libc/include/sys/epoll.h b/libc/include/sys/epoll.h
index 9e09408..2091b90 100644
--- a/libc/include/sys/epoll.h
+++ b/libc/include/sys/epoll.h
@@ -38,11 +38,11 @@
 __BEGIN_DECLS
 
 int epoll_create(int __size);
-int epoll_create1(int __flags) __INTRODUCED_IN(21);
+int epoll_create1(int __flags);
 
 int epoll_ctl(int __epoll_fd, int __op, int __fd, struct epoll_event* __BIONIC_COMPLICATED_NULLNESS __event);
 int epoll_wait(int __epoll_fd, struct epoll_event* _Nonnull __events, int __event_count, int __timeout_ms);
-int epoll_pwait(int __epoll_fd, struct epoll_event* _Nonnull __events, int __event_count, int __timeout_ms, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
+int epoll_pwait(int __epoll_fd, struct epoll_event* _Nonnull __events, int __event_count, int __timeout_ms, const sigset_t* _Nullable __mask);
 int epoll_pwait64(int __epoll_fd, struct epoll_event* _Nonnull __events, int __event_count, int __timeout_ms, const sigset64_t* _Nullable __mask) __INTRODUCED_IN(28);
 
 __END_DECLS
diff --git a/libc/include/sys/fsuid.h b/libc/include/sys/fsuid.h
index c1c8ebb..273749f 100644
--- a/libc/include/sys/fsuid.h
+++ b/libc/include/sys/fsuid.h
@@ -43,19 +43,15 @@
  * filesystem checks.
  *
  * Returns the previous UID.
- *
- * Available since API level 21.
  */
-int setfsuid(uid_t __uid) __INTRODUCED_IN(21);
+int setfsuid(uid_t __uid);
 
 /**
  * [setfsgid(2)](http://man7.org/linux/man-pages/man2/setfsgid.2.html) sets the GID used for
  * filesystem checks.
  *
  * Returns the previous GID.
- *
- * Available since API level 21.
  */
-int setfsgid(gid_t __gid) __INTRODUCED_IN(21);
+int setfsgid(gid_t __gid);
 
 __END_DECLS
diff --git a/libc/include/sys/ifunc.h b/libc/include/sys/ifunc.h
index 7fbca4a..d35600e 100644
--- a/libc/include/sys/ifunc.h
+++ b/libc/include/sys/ifunc.h
@@ -40,13 +40,15 @@
 #if defined(__aarch64__)
 
 /**
- * Provides information about hardware capabilities to ifunc resolvers.
+ * Provides information about hardware capabilities to arm64 ifunc resolvers.
  *
- * Starting with API level 30, ifunc resolvers on arm64 are passed two arguments. The first is a
- * uint64_t whose value is equal to getauxval(AT_HWCAP) | _IFUNC_ARG_HWCAP. The second is a pointer
- * to a data structure of this type. Prior to API level 30, no arguments are passed to ifunc
- * resolvers. Code that wishes to be compatible with prior API levels should not accept any
- * arguments in the resolver.
+ * Prior to API level 30, arm64 ifunc resolvers are passed no arguments.
+ *
+ * Starting with API level 30, arm64 ifunc resolvers are passed two arguments.
+ * The first is a uint64_t whose value is equal to getauxval(AT_HWCAP) | _IFUNC_ARG_HWCAP.
+ * The second is a pointer to a data structure of this type.
+ *
+ * Code that wishes to be compatible with API levels before 30 must call getauxval() itself.
  */
 typedef struct __ifunc_arg_t {
   /** Set to sizeof(__ifunc_arg_t). */
@@ -60,9 +62,14 @@
 } __ifunc_arg_t;
 
 /**
- * If this bit is set in the first argument to an ifunc resolver, indicates that the second argument
- * is a pointer to a data structure of type __ifunc_arg_t. This bit is always set on Android
- * starting with API level 30.
+ * If this bit is set in the first argument to an ifunc resolver, the second argument
+ * is a pointer to a data structure of type __ifunc_arg_t.
+ *
+ * This bit is always set on Android starting with API level 30.
+ * This bit is meaningless before API level 30 because ifunc resolvers are not passed any arguments.
+ * This bit has no real use on Android, but is included for glibc source compatibility;
+ * glibc used this bit to distinguish the case where the ifunc resolver received a single argument,
+ * which was an evolutionary stage Android never went through.
  */
 #define _IFUNC_ARG_HWCAP (1ULL << 62)
 
diff --git a/libc/include/sys/inotify.h b/libc/include/sys/inotify.h
index e834d07..f070857 100644
--- a/libc/include/sys/inotify.h
+++ b/libc/include/sys/inotify.h
@@ -41,7 +41,7 @@
 #define IN_NONBLOCK O_NONBLOCK
 
 int inotify_init(void);
-int inotify_init1(int __flags) __INTRODUCED_IN(21);
+int inotify_init1(int __flags);
 int inotify_add_watch(int __fd, const char* _Nonnull __path, uint32_t __mask);
 int inotify_rm_watch(int __fd, uint32_t __watch_descriptor);
 
diff --git a/libc/include/sys/mman.h b/libc/include/sys/mman.h
index bcf856d..f32ae61 100644
--- a/libc/include/sys/mman.h
+++ b/libc/include/sys/mman.h
@@ -50,19 +50,17 @@
  * and returns `MAP_FAILED` and sets `errno` on failure.
  */
 #if defined(__USE_FILE_OFFSET64)
-void* mmap(void* __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset) __RENAME(mmap64);
+void* _Nonnull mmap(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset) __RENAME(mmap64);
 #else
-void* mmap(void* __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset);
+void* _Nonnull mmap(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset);
 #endif
 
 /**
  * mmap64() is a variant of mmap() that takes a 64-bit offset even on LP32.
  *
  * See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
- *
- * Available since API level 21.
  */
-void* mmap64(void* __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset) __INTRODUCED_IN(21);
+void* _Nonnull mmap64(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset);
 
 /**
  * [munmap(2)](http://man7.org/linux/man-pages/man2/munmap.2.html)
@@ -70,7 +68,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int munmap(void* __addr, size_t __size);
+int munmap(void* _Nonnull __addr, size_t __size);
 
 /**
  * [msync(2)](http://man7.org/linux/man-pages/man2/msync.2.html)
@@ -78,7 +76,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int msync(void* __addr, size_t __size, int __flags);
+int msync(void* _Nonnull __addr, size_t __size, int __flags);
 
 /**
  * [mprotect(2)](http://man7.org/linux/man-pages/man2/mprotect.2.html)
@@ -86,7 +84,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int mprotect(void* __addr, size_t __size, int __prot);
+int mprotect(void* _Nonnull __addr, size_t __size, int __prot);
 
 /** Flag for mremap(). */
 #define MREMAP_MAYMOVE  1
@@ -101,27 +99,23 @@
  * Returns the address of the mapping on success,
  * and returns `MAP_FAILED` and sets `errno` on failure.
  */
-void* mremap(void* __old_addr, size_t __old_size, size_t __new_size, int __flags, ...);
+void* _Nonnull mremap(void* _Nonnull __old_addr, size_t __old_size, size_t __new_size, int __flags, ...);
 
 /**
  * [mlockall(2)](http://man7.org/linux/man-pages/man2/mlockall.2.html)
  * locks pages (preventing swapping).
  *
- * Available since API level 17.
- *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int mlockall(int __flags) __INTRODUCED_IN(17);
+int mlockall(int __flags);
 
 /**
  * [munlockall(2)](http://man7.org/linux/man-pages/man2/munlockall.2.html)
  * unlocks pages (allowing swapping).
  *
- * Available since API level 17.
- *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int munlockall(void) __INTRODUCED_IN(17);
+int munlockall(void);
 
 /**
  * [mlock(2)](http://man7.org/linux/man-pages/man2/mlock.2.html)
@@ -129,7 +123,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int mlock(const void* __addr, size_t __size);
+int mlock(const void* _Nonnull __addr, size_t __size);
 
 /**
  * [mlock2(2)](http://man7.org/linux/man-pages/man2/mlock.2.html)
@@ -139,7 +133,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int mlock2(const void* __addr, size_t __size, int __flags) __INTRODUCED_IN(30);
+int mlock2(const void* _Nonnull __addr, size_t __size, int __flags) __INTRODUCED_IN(30);
 
 /**
  * [munlock(2)](http://man7.org/linux/man-pages/man2/munlock.2.html)
@@ -147,7 +141,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int munlock(const void* __addr, size_t __size);
+int munlock(const void* _Nonnull __addr, size_t __size);
 
 /**
  * [mincore(2)](http://man7.org/linux/man-pages/man2/mincore.2.html)
@@ -155,7 +149,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int mincore(void* __addr, size_t __size, unsigned char* __vector);
+int mincore(void* _Nonnull __addr, size_t __size, unsigned char* _Nonnull __vector);
 
 /**
  * [madvise(2)](http://man7.org/linux/man-pages/man2/madvise.2.html)
@@ -163,7 +157,7 @@
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
  */
-int madvise(void* __addr, size_t __size, int __advice);
+int madvise(void* _Nonnull __addr, size_t __size, int __advice);
 
 /**
  * [process_madvise(2)](http://man7.org/linux/man-pages/man2/process_madvise.2.html)
@@ -177,7 +171,7 @@
  *
  * Returns the number of bytes advised on success, and returns -1 and sets `errno` on failure.
  */
-ssize_t process_madvise(int __pid_fd, const struct iovec* __iov, size_t __count, int __advice, unsigned __flags) __INTRODUCED_IN(31);
+ssize_t process_madvise(int __pid_fd, const struct iovec* _Nonnull __iov, size_t __count, int __advice, unsigned __flags) __INTRODUCED_IN(31);
 
 #if defined(__USE_GNU)
 
@@ -189,7 +183,7 @@
  *
  * Returns an fd on success, and returns -1 and sets `errno` on failure.
  */
-int memfd_create(const char* __name, unsigned __flags) __INTRODUCED_IN(30);
+int memfd_create(const char* _Nonnull __name, unsigned __flags) __INTRODUCED_IN(30);
 
 #endif
 
@@ -226,6 +220,6 @@
  *
  * Returns 0 on success, and returns a positive error number on failure.
  */
-int posix_madvise(void* __addr, size_t __size, int __advice) __INTRODUCED_IN(23);
+int posix_madvise(void* _Nonnull __addr, size_t __size, int __advice) __INTRODUCED_IN(23);
 
 __END_DECLS
diff --git a/libc/include/sys/resource.h b/libc/include/sys/resource.h
index ccb267d..6743343 100644
--- a/libc/include/sys/resource.h
+++ b/libc/include/sys/resource.h
@@ -43,19 +43,19 @@
 typedef unsigned long rlim_t;
 typedef unsigned long long rlim64_t;
 
-int getrlimit(int __resource, struct rlimit* __limit);
-int setrlimit(int __resource, const struct rlimit* __limit);
+int getrlimit(int __resource, struct rlimit* _Nonnull __limit);
+int setrlimit(int __resource, const struct rlimit* _Nonnull __limit);
 
-int getrlimit64(int __resource, struct rlimit64* __limit) __INTRODUCED_IN(21);
-int setrlimit64(int __resource, const struct rlimit64* __limit) __INTRODUCED_IN(21);
+int getrlimit64(int __resource, struct rlimit64* _Nonnull __limit);
+int setrlimit64(int __resource, const struct rlimit64* _Nonnull __limit);
 
 int getpriority(int __which, id_t __who);
 int setpriority(int __which, id_t __who, int __priority);
 
-int getrusage(int __who, struct rusage* __usage);
+int getrusage(int __who, struct rusage* _Nonnull __usage);
 
-int prlimit(pid_t __pid, int __resource, const struct rlimit* __new_limit, struct rlimit* __old_limit) __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(21);
-int prlimit64(pid_t __pid, int __resource, const struct rlimit64* __new_limit, struct rlimit64* __old_limit) __INTRODUCED_IN(21);
+int prlimit(pid_t __pid, int __resource, const struct rlimit* _Nullable __new_limit, struct rlimit* _Nullable __old_limit) __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(21);
+int prlimit64(pid_t __pid, int __resource, const struct rlimit64* _Nullable __new_limit, struct rlimit64* _Nullable __old_limit);
 
 __END_DECLS
 
diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h
index 8c6c2ff..84c2621 100644
--- a/libc/include/sys/select.h
+++ b/libc/include/sys/select.h
@@ -71,9 +71,9 @@
     } \
   } while (0)
 
-void __FD_CLR_chk(int, fd_set* _Nonnull , size_t) __INTRODUCED_IN(21);
-void __FD_SET_chk(int, fd_set* _Nonnull, size_t) __INTRODUCED_IN(21);
-int __FD_ISSET_chk(int, const fd_set* _Nonnull, size_t) __INTRODUCED_IN(21);
+void __FD_CLR_chk(int, fd_set* _Nonnull , size_t);
+void __FD_SET_chk(int, fd_set* _Nonnull, size_t);
+int __FD_ISSET_chk(int, const fd_set* _Nonnull, size_t);
 
 #define __FD_CLR(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] &= ~__FDMASK(fd))
 #define __FD_SET(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] |= __FDMASK(fd))
diff --git a/libc/include/sys/sem.h b/libc/include/sys/sem.h
index cd62242..f4256e2 100644
--- a/libc/include/sys/sem.h
+++ b/libc/include/sys/sem.h
@@ -45,18 +45,18 @@
 
 union semun {
   int val;
-  struct semid_ds* buf;
-  unsigned short* array;
-  struct seminfo* __buf;
-  void* __pad;
+  struct semid_ds* _Nullable buf;
+  unsigned short* _Nullable array;
+  struct seminfo* _Nullable __buf;
+  void* _Nullable __pad;
 };
 
 int semctl(int __sem_id, int __sem_num, int __cmd, ...) __INTRODUCED_IN(26);
 int semget(key_t __key, int __sem_count, int __flags) __INTRODUCED_IN(26);
-int semop(int __sem_id, struct sembuf* __ops, size_t __op_count) __INTRODUCED_IN(26);
+int semop(int __sem_id, struct sembuf* _Nonnull __ops, size_t __op_count) __INTRODUCED_IN(26);
 
 #if defined(__USE_GNU)
-int semtimedop(int __sem_id, struct sembuf* __ops, size_t __op_count, const struct timespec* __timeout) __INTRODUCED_IN(26);
+int semtimedop(int __sem_id, struct sembuf* _Nonnull __ops, size_t __op_count, const struct timespec* _Nullable __timeout) __INTRODUCED_IN(26);
 #endif
 
 __END_DECLS
diff --git a/libc/include/sys/sendfile.h b/libc/include/sys/sendfile.h
index 4b00d5d..a72091d 100644
--- a/libc/include/sys/sendfile.h
+++ b/libc/include/sys/sendfile.h
@@ -40,23 +40,21 @@
 
 /* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64)
-ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64) __INTRODUCED_IN(21);
+ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64);
 #else
 /**
  * [sendfile(2)](http://man7.org/linux/man-pages/man2/sendfile.2.html) copies data directly
  * between two file descriptors.
  *
  * Returns the number of bytes copied on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 21.
  */
 ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count);
 #endif
 
 /**
  * Like sendfile() but allows using a 64-bit offset
- * even from a 32-bit process without `__FILE_OFFSET_BITS=64`.
+ * even from a 32-bit process without `_FILE_OFFSET_BITS=64`.
  */
-ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* _Nullable __offset, size_t __count) __INTRODUCED_IN(21);
+ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* _Nullable __offset, size_t __count);
 
 __END_DECLS
diff --git a/libc/include/sys/shm.h b/libc/include/sys/shm.h
index a3f84d3..9d58046 100644
--- a/libc/include/sys/shm.h
+++ b/libc/include/sys/shm.h
@@ -47,11 +47,11 @@
 typedef unsigned long shmatt_t;
 
 /** Not useful on Android; disallowed by SELinux. */
-void* shmat(int __shm_id, const void* __addr, int __flags) __INTRODUCED_IN(26);
+void* _Nonnull shmat(int __shm_id, const void* _Nullable __addr, int __flags) __INTRODUCED_IN(26);
 /** Not useful on Android; disallowed by SELinux. */
-int shmctl(int __shm_id, int __cmd, struct shmid_ds* __buf) __INTRODUCED_IN(26);
+int shmctl(int __shm_id, int __cmd, struct shmid_ds* _Nullable __buf) __INTRODUCED_IN(26);
 /** Not useful on Android; disallowed by SELinux. */
-int shmdt(const void* __addr) __INTRODUCED_IN(26);
+int shmdt(const void* _Nonnull __addr) __INTRODUCED_IN(26);
 /** Not useful on Android; disallowed by SELinux. */
 int shmget(key_t __key, size_t __size, int __flags) __INTRODUCED_IN(26);
 
diff --git a/libc/include/sys/signalfd.h b/libc/include/sys/signalfd.h
index f669cc8..2be9bdc 100644
--- a/libc/include/sys/signalfd.h
+++ b/libc/include/sys/signalfd.h
@@ -45,10 +45,8 @@
  * file descriptor for reading signal events.
  *
  * Returns the file descriptor on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 18.
  */
-int signalfd(int __fd, const sigset_t* _Nonnull __mask, int __flags) __INTRODUCED_IN(18);
+int signalfd(int __fd, const sigset_t* _Nonnull __mask, int __flags);
 
 /**
  * Like signalfd() but allows setting a signal mask with RT signals even from a 32-bit process.
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 41c5a9a..22b88cb 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -70,6 +70,8 @@
   char sa_data[14];
 };
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 struct sockaddr_storage {
   union {
     struct {
@@ -106,6 +108,8 @@
   int cmsg_type;
 };
 
+#pragma clang diagnostic pop
+
 #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr((mhdr), (cmsg))
 #define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
 #define CMSG_DATA(cmsg) (((unsigned char*)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
@@ -116,7 +120,7 @@
    ? (struct cmsghdr*) (msg)->msg_control : (struct cmsghdr*) NULL)
 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) &&   (cmsg)->cmsg_len <= (unsigned long)   ((mhdr)->msg_controllen -   ((char*)(cmsg) - (char*)(mhdr)->msg_control)))
 
-struct cmsghdr* __cmsg_nxthdr(struct msghdr* __msg, struct cmsghdr* __cmsg) __INTRODUCED_IN(21);
+struct cmsghdr* _Nullable __cmsg_nxthdr(struct msghdr* _Nonnull __msg, struct cmsghdr* _Nonnull __cmsg);
 
 #define SCM_RIGHTS 0x01
 #define SCM_CREDENTIALS 0x02
@@ -287,29 +291,28 @@
 # define __socketcall extern
 #endif
 
-__socketcall int accept(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
-__socketcall int accept4(int __fd, struct sockaddr* __addr, socklen_t* __addr_length, int __flags) __INTRODUCED_IN(21);
-__socketcall int bind(int __fd, const struct sockaddr* __addr, socklen_t __addr_length);
-__socketcall int connect(int __fd, const struct sockaddr* __addr, socklen_t __addr_length);
-__socketcall int getpeername(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
-__socketcall int getsockname(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
-__socketcall int getsockopt(int __fd, int __level, int __option, void* __value, socklen_t* __value_length);
+__socketcall int accept(int __fd, struct sockaddr* _Nullable __addr, socklen_t* _Nullable __addr_length);
+__socketcall int accept4(int __fd, struct sockaddr* _Nullable __addr, socklen_t* _Nullable __addr_length, int __flags);
+__socketcall int bind(int __fd, const struct sockaddr* _Nonnull __addr, socklen_t __addr_length);
+__socketcall int connect(int __fd, const struct sockaddr* _Nonnull __addr, socklen_t __addr_length);
+__socketcall int getpeername(int __fd, struct sockaddr* _Nonnull __addr, socklen_t* _Nonnull __addr_length);
+__socketcall int getsockname(int __fd, struct sockaddr* _Nonnull __addr, socklen_t* _Nonnull __addr_length);
+__socketcall int getsockopt(int __fd, int __level, int __option, void* _Nullable __value, socklen_t* _Nonnull __value_length);
 __socketcall int listen(int __fd, int __backlog);
-__socketcall int recvmmsg(int __fd, struct mmsghdr* __msgs, unsigned int __msg_count, int __flags, const struct timespec* __timeout)
-  __INTRODUCED_IN(21);
-__socketcall ssize_t recvmsg(int __fd, struct msghdr* __msg, int __flags);
-__socketcall int sendmmsg(int __fd, const struct mmsghdr* __msgs, unsigned int __msg_count, int __flags) __INTRODUCED_IN(21);
-__socketcall ssize_t sendmsg(int __fd, const struct msghdr* __msg, int __flags);
-__socketcall int setsockopt(int __fd, int __level, int __option, const void* __value, socklen_t __value_length);
+__socketcall int recvmmsg(int __fd, struct mmsghdr* _Nonnull __msgs, unsigned int __msg_count, int __flags, const struct timespec* _Nullable __timeout);
+__socketcall ssize_t recvmsg(int __fd, struct msghdr* _Nonnull __msg, int __flags);
+__socketcall int sendmmsg(int __fd, const struct mmsghdr* _Nonnull __msgs, unsigned int __msg_count, int __flags);
+__socketcall ssize_t sendmsg(int __fd, const struct msghdr* _Nonnull __msg, int __flags);
+__socketcall int setsockopt(int __fd, int __level, int __option, const void* _Nullable __value, socklen_t __value_length);
 __socketcall int shutdown(int __fd, int __how);
 __socketcall int socket(int __af, int __type, int __protocol);
-__socketcall int socketpair(int __af, int __type, int __protocol, int __fds[2]);
+__socketcall int socketpair(int __af, int __type, int __protocol, int __fds[_Nonnull 2]);
 
-ssize_t recv(int __fd, void* __buf, size_t __n, int __flags);
-ssize_t send(int __fd, const void* __buf, size_t __n, int __flags);
+ssize_t recv(int __fd, void* _Nullable __buf, size_t __n, int __flags);
+ssize_t send(int __fd, const void* _Nonnull __buf, size_t __n, int __flags);
 
-__socketcall ssize_t sendto(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length);
-__socketcall ssize_t recvfrom(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length);
+__socketcall ssize_t sendto(int __fd, const void* _Nonnull __buf, size_t __n, int __flags, const struct sockaddr* _Nullable __dst_addr, socklen_t __dst_addr_length);
+__socketcall ssize_t recvfrom(int __fd, void* _Nullable __buf, size_t __n, int __flags, struct sockaddr* _Nullable __src_addr, socklen_t* _Nullable __src_addr_length);
 
 #if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
 #include <bits/fortify/socket.h>
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 54621b7..f916573 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -141,13 +141,13 @@
 int mkdir(const char* _Nonnull __path, mode_t __mode);
 
 int fstat(int __fd, struct stat* _Nonnull __buf);
-int fstat64(int __fd, struct stat64* _Nonnull __buf) __RENAME_STAT64(fstat, 3, 21);
+int fstat64(int __fd, struct stat64* _Nonnull __buf);
 int fstatat(int __dir_fd, const char* _Nonnull __path, struct stat* _Nonnull __buf, int __flags);
-int fstatat64(int __dir_fd, const char* _Nonnull __path, struct stat64* _Nonnull __buf, int __flags) __RENAME_STAT64(fstatat, 3, 21);
+int fstatat64(int __dir_fd, const char* _Nonnull __path, struct stat64* _Nonnull __buf, int __flags);
 int lstat(const char* _Nonnull __path, struct stat* _Nonnull __buf);
-int lstat64(const char* _Nonnull __path, struct stat64* _Nonnull __buf) __RENAME_STAT64(lstat, 3, 21);
+int lstat64(const char* _Nonnull __path, struct stat64* _Nonnull __buf);
 int stat(const char* _Nonnull __path, struct stat* _Nonnull __buf);
-int stat64(const char* _Nonnull __path, struct stat64* _Nonnull __buf) __RENAME_STAT64(stat, 3, 21);
+int stat64(const char* _Nonnull __path, struct stat64* _Nonnull __buf);
 
 int mknod(const char* _Nonnull __path, mode_t __mode, dev_t __dev);
 mode_t umask(mode_t __mask);
@@ -156,12 +156,12 @@
 #include <bits/fortify/stat.h>
 #endif
 
-int mkfifo(const char* _Nonnull __path, mode_t __mode) __INTRODUCED_IN(21);
+int mkfifo(const char* _Nonnull __path, mode_t __mode);
 int mkfifoat(int __dir_fd, const char* _Nonnull __path, mode_t __mode) __INTRODUCED_IN(23);
 
 int fchmodat(int __dir_fd, const char* _Nonnull __path, mode_t __mode, int __flags);
 int mkdirat(int __dir_fd, const char* _Nonnull __path, mode_t __mode);
-int mknodat(int __dir_fd, const char* _Nonnull __path, mode_t __mode, dev_t __dev) __INTRODUCED_IN(21);
+int mknodat(int __dir_fd, const char* _Nonnull __path, mode_t __mode, dev_t __dev);
 
 /**
  * Used in the tv_nsec field of an argument to utimensat()/futimens()
@@ -200,10 +200,8 @@
  * See also UTIME_NOW and UTIME_OMIT.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int futimens(int __fd, const struct timespec __times[_Nullable 2]) __INTRODUCED_IN(19);
+int futimens(int __fd, const struct timespec __times[_Nullable 2]);
 
 #if defined(__USE_GNU)
 /**
diff --git a/libc/include/sys/statvfs.h b/libc/include/sys/statvfs.h
index 793ee13..46fbea5 100644
--- a/libc/include/sys/statvfs.h
+++ b/libc/include/sys/statvfs.h
@@ -93,25 +93,21 @@
  * queries filesystem statistics for the given path.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int statvfs(const char* __path, struct statvfs* __buf) __INTRODUCED_IN(19);
+int statvfs(const char* _Nonnull __path, struct statvfs* _Nonnull __buf);
 
 /**
  * [fstatvfs(3)](http://man7.org/linux/man-pages/man3/fstatvfs.3.html)
  * queries filesystem statistics for the given file descriptor.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int fstatvfs(int __fd, struct statvfs* __buf) __INTRODUCED_IN(19);
+int fstatvfs(int __fd, struct statvfs* _Nonnull __buf);
 
 /** Equivalent to statvfs() . */
-int statvfs64(const char* __path, struct statvfs64* __buf) __INTRODUCED_IN(21);
+int statvfs64(const char* _Nonnull __path, struct statvfs64* _Nonnull __buf);
 
 /** Equivalent to fstatvfs(). */
-int fstatvfs64(int __fd, struct statvfs64* __buf) __INTRODUCED_IN(21);
+int fstatvfs64(int __fd, struct statvfs64* _Nonnull __buf);
 
 __END_DECLS
diff --git a/libc/include/sys/swap.h b/libc/include/sys/swap.h
index 9d016d4..474aed7 100644
--- a/libc/include/sys/swap.h
+++ b/libc/include/sys/swap.h
@@ -55,18 +55,14 @@
  * [swapon(2)](http://man7.org/linux/man-pages/man2/swapon.2.html) enables swapping.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int swapon(const char* _Nonnull __path,  int __flags) __INTRODUCED_IN(19);
+int swapon(const char* _Nonnull __path,  int __flags);
 
 /**
  * [swapoff(2)](http://man7.org/linux/man-pages/man2/swapoff.2.html) disables swapping.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int swapoff(const char* _Nonnull __path) __INTRODUCED_IN(19);
+int swapoff(const char* _Nonnull __path);
 
 __END_DECLS
diff --git a/libc/include/sys/system_properties.h b/libc/include/sys/system_properties.h
index a2e1923..dc869da 100644
--- a/libc/include/sys/system_properties.h
+++ b/libc/include/sys/system_properties.h
@@ -43,7 +43,7 @@
 /*
  * Sets system property `name` to `value`, creating the system property if it doesn't already exist.
  */
-int __system_property_set(const char* __name, const char* __value);
+int __system_property_set(const char* _Nonnull __name, const char* _Nonnull __value);
 
 /*
  * Returns a `prop_info` corresponding system property `name`, or nullptr if it doesn't exist.
@@ -51,14 +51,14 @@
  *
  * Property lookup is expensive, so it can be useful to cache the result of this function.
  */
-const prop_info* __system_property_find(const char* __name);
+const prop_info* _Nullable __system_property_find(const char* _Nonnull __name);
 
 /*
  * Calls `callback` with a consistent trio of name, value, and serial number for property `pi`.
  */
-void __system_property_read_callback(const prop_info* __pi,
-    void (*__callback)(void* __cookie, const char* __name, const char* __value, uint32_t __serial),
-    void* __cookie) __INTRODUCED_IN(26);
+void __system_property_read_callback(const prop_info* _Nonnull __pi,
+    void (* _Nonnull __callback)(void* _Nullable __cookie, const char* _Nonnull __name, const char* _Nonnull __value, uint32_t __serial),
+    void* _Nullable __cookie) __INTRODUCED_IN(26);
 
 /*
  * Passes a `prop_info` for each system property to the provided
@@ -66,13 +66,12 @@
  *
  * This method is for inspecting and debugging the property system, and not generally useful.
  */
-int __system_property_foreach(void (*__callback)(const prop_info* __pi, void* __cookie), void* __cookie)
-  __INTRODUCED_IN(19);
+int __system_property_foreach(void (* _Nonnull __callback)(const prop_info* _Nonnull __pi, void* _Nullable __cookie), void* _Nullable __cookie);
 
 /*
  * Waits for the specific system property identified by `pi` to be updated
  * past `old_serial`. Waits no longer than `relative_timeout`, or forever
- * if `relaive_timeout` is null.
+ * if `relative_timeout` is null.
  *
  * If `pi` is null, waits for the global serial number instead.
  *
@@ -82,17 +81,17 @@
  * timed out.
  */
 struct timespec;
-bool __system_property_wait(const prop_info* __pi, uint32_t __old_serial, uint32_t* __new_serial_ptr, const struct timespec* __relative_timeout)
+bool __system_property_wait(const prop_info* _Nullable __pi, uint32_t __old_serial, uint32_t* _Nonnull __new_serial_ptr, const struct timespec* _Nullable __relative_timeout)
     __INTRODUCED_IN(26);
 
 /* Deprecated. In Android O and above, there's no limit on property name length. */
 #define PROP_NAME_MAX   32
 /* Deprecated. Use __system_property_read_callback instead. */
-int __system_property_read(const prop_info* __pi, char* __name, char* __value);
+int __system_property_read(const prop_info* _Nonnull __pi, char* _Nullable __name, char* _Nonnull __value);
 /* Deprecated. Use __system_property_read_callback instead. */
-int __system_property_get(const char* __name, char* __value);
+int __system_property_get(const char* _Nonnull __name, char* _Nonnull __value);
 /* Deprecated. Use __system_property_foreach instead. */
-const prop_info* __system_property_find_nth(unsigned __n);
+const prop_info* _Nullable __system_property_find_nth(unsigned __n);
 
 __END_DECLS
 
diff --git a/libc/include/sys/thread_properties.h b/libc/include/sys/thread_properties.h
index b5d30c7..efd212a 100644
--- a/libc/include/sys/thread_properties.h
+++ b/libc/include/sys/thread_properties.h
@@ -50,8 +50,8 @@
  *
  * Available since API level 31.
  */
-void __libc_get_static_tls_bounds(void** __static_tls_begin,
-                                  void** __static_tls_end) __INTRODUCED_IN(31);
+void __libc_get_static_tls_bounds(void* _Nonnull * _Nonnull __static_tls_begin,
+                                  void* _Nonnull * _Nonnull __static_tls_end) __INTRODUCED_IN(31);
 
 
 /**
@@ -66,7 +66,7 @@
  *
  * Available since API level 31.
  */
-void __libc_register_thread_exit_callback(void (*__cb)(void)) __INTRODUCED_IN(31);
+void __libc_register_thread_exit_callback(void (* _Nonnull __cb)(void)) __INTRODUCED_IN(31);
 
 /**
  * Iterates over all dynamic TLS chunks for the given thread.
@@ -76,11 +76,11 @@
  * Available since API level 31.
  */
 void __libc_iterate_dynamic_tls(pid_t __tid,
-                                void (*__cb)(void* __dynamic_tls_begin,
-                                             void* __dynamic_tls_end,
+                                void (* _Nonnull __cb)(void* _Nonnull __dynamic_tls_begin,
+                                             void* _Nonnull __dynamic_tls_end,
                                              size_t __dso_id,
-                                             void* __arg),
-                                void* __arg) __INTRODUCED_IN(31);
+                                             void* _Nullable __arg),
+                                void* _Nullable __arg) __INTRODUCED_IN(31);
 
 /**
  * Register on_creation and on_destruction callbacks, which will be called after a dynamic
@@ -89,9 +89,9 @@
  * Available since API level 31.
  */
 void __libc_register_dynamic_tls_listeners(
-    void (*__on_creation)(void* __dynamic_tls_begin,
-                          void* __dynamic_tls_end),
-    void (*__on_destruction)(void* __dynamic_tls_begin,
-                             void* __dynamic_tls_end)) __INTRODUCED_IN(31);
+    void (* _Nonnull __on_creation)(void* _Nonnull __dynamic_tls_begin,
+                          void* _Nonnull __dynamic_tls_end),
+    void (* _Nonnull __on_destruction)(void* _Nonnull __dynamic_tls_begin,
+                             void* _Nonnull __dynamic_tls_end)) __INTRODUCED_IN(31);
 
 __END_DECLS
diff --git a/libc/include/sys/time.h b/libc/include/sys/time.h
index 45190c3..6ba7a37 100644
--- a/libc/include/sys/time.h
+++ b/libc/include/sys/time.h
@@ -38,21 +38,34 @@
 
 __BEGIN_DECLS
 
-int gettimeofday(struct timeval* __tv, struct timezone* __tz);
-int settimeofday(const struct timeval* __tv, const struct timezone* __tz);
+int gettimeofday(struct timeval* _Nullable __tv, struct timezone* _Nullable __tz);
+int settimeofday(const struct timeval* _Nullable __tv, const struct timezone* _Nullable __tz);
 
-int getitimer(int __which, struct itimerval* __current_value);
-int setitimer(int __which, const struct itimerval* __new_value, struct itimerval* __old_value);
+int getitimer(int __which, struct itimerval* _Nonnull __current_value);
+int setitimer(int __which, const struct itimerval* _Nonnull __new_value, struct itimerval* _Nullable __old_value);
 
-int utimes(const char* __path, const struct timeval __times[2]);
+int utimes(const char* _Nonnull __path, const struct timeval __times[_Nullable 2]);
 
 #if defined(__USE_BSD)
-int futimes(int __fd, const struct timeval __times[2]) __INTRODUCED_IN(26);
-int lutimes(const char* __path, const struct timeval __times[2]) __INTRODUCED_IN(26);
+int futimes(int __fd, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
+int lutimes(const char* _Nonnull __path, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
 #endif
 
 #if defined(__USE_GNU)
-int futimesat(int __dir_fd, const char* __path, const struct timeval __times[2]) __INTRODUCED_IN(26);
+/**
+ * [futimesat(2)](https://man7.org/linux/man-pages/man2/futimesat.2.html) sets
+ * file timestamps.
+ *
+ * Note: Linux supports `__path` being NULL (in which case `__dir_fd` need not
+ * be a directory), allowing futimensat() to be implemented with utimensat().
+ * Most callers should just use utimensat() directly, especially on Android
+ * where utimensat() has been available for longer than futimesat().
+ *
+ * Returns 0 on success and -1 and sets `errno` on failure.
+ *
+ * Available since API level 26.
+ */
+int futimesat(int __dir_fd, const char* __BIONIC_COMPLICATED_NULLNESS __path, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
 #endif
 
 #define timerclear(a)   \
diff --git a/libc/include/sys/timerfd.h b/libc/include/sys/timerfd.h
index b89941b..de1f55b 100644
--- a/libc/include/sys/timerfd.h
+++ b/libc/include/sys/timerfd.h
@@ -50,10 +50,8 @@
  * timer file descriptor.
  *
  * Returns the new file descriptor on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int timerfd_create(clockid_t __clock, int __flags) __INTRODUCED_IN(19);
+int timerfd_create(clockid_t __clock, int __flags);
 
 /** The timerfd_settime() flag to use absolute rather than relative times. */
 #define TFD_TIMER_ABSTIME (1 << 0)
@@ -65,19 +63,15 @@
  * stops a timer.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int timerfd_settime(int __fd, int __flags, const struct itimerspec* __new_value, struct itimerspec* __old_value) __INTRODUCED_IN(19);
+int timerfd_settime(int __fd, int __flags, const struct itimerspec* _Nonnull __new_value, struct itimerspec* _Nullable __old_value);
 
 /**
  * [timerfd_gettime(2)](http://man7.org/linux/man-pages/man2/timerfd_gettime.2.html) queries the
  * current timer settings.
  *
  * Returns 0 on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 19.
  */
-int timerfd_gettime(int __fd, struct itimerspec* __current_value) __INTRODUCED_IN(19);
+int timerfd_gettime(int __fd, struct itimerspec* _Nonnull __current_value);
 
 __END_DECLS
diff --git a/libc/include/sys/times.h b/libc/include/sys/times.h
index 25d03e3..8b6e91d 100644
--- a/libc/include/sys/times.h
+++ b/libc/include/sys/times.h
@@ -46,6 +46,6 @@
  * Returns a (possibly overflowed) absolute time on success,
  * and returns -1 and sets `errno` on failure.
  */
-clock_t times(struct tms* __buf);
+clock_t times(struct tms* _Nullable __buf);
 
 __END_DECLS
diff --git a/libc/include/sys/timex.h b/libc/include/sys/timex.h
index 52db5dc..4823edf 100644
--- a/libc/include/sys/timex.h
+++ b/libc/include/sys/timex.h
@@ -46,7 +46,7 @@
  *
  * Available since API level 24.
  */
-int adjtimex(struct timex* __buf) __INTRODUCED_IN(24);
+int adjtimex(struct timex* _Nonnull __buf) __INTRODUCED_IN(24);
 
 /**
  * clock_adjtime adjusts a specific kernel clock.
@@ -55,6 +55,6 @@
  *
  * Available since API level 24.
  */
-int clock_adjtime(clockid_t __clock, struct timex* __tx) __INTRODUCED_IN(24);
+int clock_adjtime(clockid_t __clock, struct timex* _Nonnull __tx) __INTRODUCED_IN(24);
 
 __END_DECLS
diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h
index bb6443b..4f4d5ce 100644
--- a/libc/include/sys/ucontext.h
+++ b/libc/include/sys/ucontext.h
@@ -318,12 +318,20 @@
 
 #if defined(__USE_GNU)
 
-#define REG_PC 0
-#define REG_RA 1
-#define REG_SP 2
-#define REG_TP 4
-#define REG_S0 8
-#define REG_A0 10
+enum {
+  REG_PC = 0,
+#define REG_PC REG_PC
+  REG_RA = 1,
+#define REG_RA REG_RA
+  REG_SP = 2,
+#define REG_SP REG_SP
+  REG_TP = 4,
+#define REG_TP REG_TP
+  REG_S0 = 8,
+#define REG_S0 REG_S0
+  REG_A0 = 10,
+#define REG_A0 REG_A0
+};
 
 #endif // defined(__USE_GNU)
 
diff --git a/libc/include/sys/uio.h b/libc/include/sys/uio.h
index 583cfc6..c8c64ae 100644
--- a/libc/include/sys/uio.h
+++ b/libc/include/sys/uio.h
@@ -46,7 +46,7 @@
  * Returns the number of bytes read on success,
  * and returns -1 and sets `errno` on failure.
  */
-ssize_t readv(int __fd, const struct iovec* __iov, int __count);
+ssize_t readv(int __fd, const struct iovec* _Nonnull __iov, int __count);
 
 /**
  * [writev(2)](http://man7.org/linux/man-pages/man2/writev.2.html) writes
@@ -55,7 +55,7 @@
  * Returns the number of bytes written on success,
  * and returns -1 and sets `errno` on failure.
  */
-ssize_t writev(int __fd, const struct iovec* __iov, int __count);
+ssize_t writev(int __fd, const struct iovec* _Nonnull __iov, int __count);
 
 #if defined(__USE_GNU)
 
@@ -69,7 +69,7 @@
  *
  * Available since API level 24.
  */
-ssize_t preadv(int __fd, const struct iovec* __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(preadv64) __INTRODUCED_IN(24);
+ssize_t preadv(int __fd, const struct iovec* _Nonnull __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(preadv64) __INTRODUCED_IN(24);
 
 /**
  * [pwritev(2)](http://man7.org/linux/man-pages/man2/pwritev.2.html) writes
@@ -81,21 +81,21 @@
  *
  * Available since API level 24.
  */
-ssize_t pwritev(int __fd, const struct iovec* __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(pwritev64) __INTRODUCED_IN(24);
+ssize_t pwritev(int __fd, const struct iovec* _Nonnull __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(pwritev64) __INTRODUCED_IN(24);
 
 /**
  * Like preadv() but with a 64-bit offset even in a 32-bit process.
  *
  * Available since API level 24.
  */
-ssize_t preadv64(int __fd, const struct iovec* __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
+ssize_t preadv64(int __fd, const struct iovec* _Nonnull __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
 
 /**
  * Like pwritev() but with a 64-bit offset even in a 32-bit process.
  *
  * Available since API level 24.
  */
-ssize_t pwritev64(int __fd, const struct iovec* __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
+ssize_t pwritev64(int __fd, const struct iovec* _Nonnull __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
 
 /**
  * [preadv2(2)](http://man7.org/linux/man-pages/man2/preadv2.2.html) reads
@@ -107,7 +107,7 @@
  *
  * Available since API level 33.
  */
-ssize_t preadv2(int __fd, const struct iovec* __iov, int __count, off_t __offset, int __flags) __RENAME_IF_FILE_OFFSET64(preadv64v2) __INTRODUCED_IN(33);
+ssize_t preadv2(int __fd, const struct iovec* _Nonnull __iov, int __count, off_t __offset, int __flags) __RENAME_IF_FILE_OFFSET64(preadv64v2) __INTRODUCED_IN(33);
 
 /**
  * [pwritev2(2)](http://man7.org/linux/man-pages/man2/pwritev2.2.html) writes
@@ -119,21 +119,21 @@
  *
  * Available since API level 33.
  */
-ssize_t pwritev2(int __fd, const struct iovec* __iov, int __count, off_t __offset, int __flags) __RENAME_IF_FILE_OFFSET64(pwritev64v2) __INTRODUCED_IN(33);
+ssize_t pwritev2(int __fd, const struct iovec* _Nonnull __iov, int __count, off_t __offset, int __flags) __RENAME_IF_FILE_OFFSET64(pwritev64v2) __INTRODUCED_IN(33);
 
 /**
  * Like preadv2() but with a 64-bit offset even in a 32-bit process.
  *
  * Available since API level 33.
  */
-ssize_t preadv64v2(int __fd, const struct iovec* __iov, int __count, off64_t __offset, int __flags) __INTRODUCED_IN(33);
+ssize_t preadv64v2(int __fd, const struct iovec* _Nonnull __iov, int __count, off64_t __offset, int __flags) __INTRODUCED_IN(33);
 
 /**
  * Like pwritev2() but with a 64-bit offset even in a 32-bit process.
  *
  * Available since API level 33.
  */
-ssize_t pwritev64v2(int __fd, const struct iovec* __iov, int __count, off64_t __offset, int __flags) __INTRODUCED_IN(33);
+ssize_t pwritev64v2(int __fd, const struct iovec* _Nonnull __iov, int __count, off64_t __offset, int __flags) __INTRODUCED_IN(33);
 
 /**
  * [process_vm_readv(2)](http://man7.org/linux/man-pages/man2/process_vm_readv.2.html)
@@ -144,7 +144,7 @@
  *
  * Available since API level 23.
  */
-ssize_t process_vm_readv(pid_t __pid, const struct iovec* __local_iov, unsigned long __local_iov_count, const struct iovec* __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
+ssize_t process_vm_readv(pid_t __pid, const struct iovec* __BIONIC_COMPLICATED_NULLNESS __local_iov, unsigned long __local_iov_count, const struct iovec* __BIONIC_COMPLICATED_NULLNESS __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
 
 /**
  * [process_vm_writev(2)](http://man7.org/linux/man-pages/man2/process_vm_writev.2.html)
@@ -155,7 +155,7 @@
  *
  * Available since API level 23.
  */
-ssize_t process_vm_writev(pid_t __pid, const struct iovec* __local_iov, unsigned long __local_iov_count, const struct iovec* __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
+ssize_t process_vm_writev(pid_t __pid, const struct iovec* __BIONIC_COMPLICATED_NULLNESS __local_iov, unsigned long __local_iov_count, const struct iovec* __BIONIC_COMPLICATED_NULLNESS __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
 
 #endif
 
diff --git a/libc/include/sys/vfs.h b/libc/include/sys/vfs.h
index 18ae428..3579799 100644
--- a/libc/include/sys/vfs.h
+++ b/libc/include/sys/vfs.h
@@ -105,9 +105,9 @@
 #define XFS_SUPER_MAGIC       0x58465342
 
 int statfs(const char* _Nonnull __path, struct statfs* _Nonnull __buf);
-int statfs64(const char* _Nonnull __path, struct statfs64* _Nonnull __buf) __INTRODUCED_IN(21);
+int statfs64(const char* _Nonnull __path, struct statfs64* _Nonnull __buf);
 int fstatfs(int __fd, struct statfs* _Nonnull __buf);
-int fstatfs64(int __fd, struct statfs64* _Nonnull __buf) __INTRODUCED_IN(21);
+int fstatfs64(int __fd, struct statfs64* _Nonnull __buf);
 
 __END_DECLS
 
diff --git a/libc/include/sys/wait.h b/libc/include/sys/wait.h
index e6fb855..5208366 100644
--- a/libc/include/sys/wait.h
+++ b/libc/include/sys/wait.h
@@ -39,7 +39,7 @@
 
 pid_t wait(int* _Nullable __status);
 pid_t waitpid(pid_t __pid, int* _Nullable __status, int __options);
-pid_t wait4(pid_t __pid, int* _Nullable __status, int __options, struct rusage* _Nullable __rusage) __INTRODUCED_IN(18);
+pid_t wait4(pid_t __pid, int* _Nullable __status, int __options, struct rusage* _Nullable __rusage);
 
 /* Posix states that idtype_t should be an enumeration type, but
  * the kernel headers define P_ALL, P_PID and P_PGID as constant macros
diff --git a/libc/include/sys/xattr.h b/libc/include/sys/xattr.h
index dc58026..745f50c 100644
--- a/libc/include/sys/xattr.h
+++ b/libc/include/sys/xattr.h
@@ -44,90 +44,114 @@
  * sets an extended attribute on the file referred to by the given file
  * descriptor.
  *
+ * A `size` of 0 can be used to set an empty value, in which case `value` is
+ * ignored and may be null. Setting an xattr to an empty value is not the same
+ * as removing an xattr; see removexattr() for the latter operation.
+ *
  * Valid flags are `XATTR_CREATE` and `XATTR_REPLACE`.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int fsetxattr(int __fd, const char* __name, const void* __value, size_t __size, int __flags);
+int fsetxattr(int __fd, const char* _Nonnull __name, const void* _Nullable __value, size_t __size, int __flags);
 
 /**
  * [setxattr(2)](http://man7.org/linux/man-pages/man2/setxattr.2.html)
  * sets an extended attribute on the file referred to by the given path.
  *
+ * A `size` of 0 can be used to set an empty value, in which case `value` is
+ * ignored and may be null. Setting an xattr to an empty value is not the same
+ * as removing an xattr; see removexattr() for the latter operation.
+ *
  * Valid flags are `XATTR_CREATE` and `XATTR_REPLACE`.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int setxattr(const char* __path, const char* __name, const void* __value, size_t __size, int __flags);
+int setxattr(const char* _Nonnull __path, const char* _Nonnull __name, const void* _Nullable __value, size_t __size, int __flags);
 
 /**
  * [lsetxattr(2)](http://man7.org/linux/man-pages/man2/lsetxattr.2.html)
  * sets an extended attribute on the file referred to by the given path, which
  * is the link itself rather than its target in the case of a symbolic link.
  *
+ * A `size` of 0 can be used to set an empty value, in which case `value` is
+ * ignored and may be null. Setting an xattr to an empty value is not the same
+ * as removing an xattr; see removexattr() for the latter operation.
+ *
  * Valid flags are `XATTR_CREATE` and `XATTR_REPLACE`.
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int lsetxattr(const char* __path, const char* __name, const void* __value, size_t __size, int __flags);
+int lsetxattr(const char* _Nonnull __path, const char* _Nonnull __name, const void* _Nullable __value, size_t __size, int __flags);
 
 /**
  * [fgetxattr(2)](http://man7.org/linux/man-pages/man2/fgetxattr.2.html)
  * gets an extended attribute on the file referred to by the given file
  * descriptor.
  *
+ * A `size` of 0 can be used to query the current length, in which case `value` is ignored and may be null.
+ *
  * Returns the non-negative length of the value on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t fgetxattr(int __fd, const char* __name, void* __value, size_t __size);
+ssize_t fgetxattr(int __fd, const char* _Nonnull __name, void* _Nullable __value, size_t __size);
 
 /**
  * [getxattr(2)](http://man7.org/linux/man-pages/man2/getxattr.2.html)
  * gets an extended attribute on the file referred to by the given path.
  *
+ * A `size` of 0 can be used to query the current length, in which case `value` is ignored and may be null.
+ *
  * Returns the non-negative length of the value on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t getxattr(const char* __path, const char* __name, void* __value, size_t __size);
+ssize_t getxattr(const char* _Nonnull __path, const char* _Nonnull __name, void* _Nullable __value, size_t __size);
 
 /**
  * [lgetxattr(2)](http://man7.org/linux/man-pages/man2/lgetxattr.2.html)
  * gets an extended attribute on the file referred to by the given path, which
  * is the link itself rather than its target in the case of a symbolic link.
  *
+ * A `size` of 0 can be used to query the current length, in which case `value` is ignored and may be null.
+ *
  * Returns the non-negative length of the value on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t lgetxattr(const char* __path, const char* __name, void* __value, size_t __size);
+ssize_t lgetxattr(const char* _Nonnull __path, const char* _Nonnull __name, void* _Nullable __value, size_t __size);
 
 /**
  * [flistxattr(2)](http://man7.org/linux/man-pages/man2/flistxattr.2.html)
  * lists the extended attributes on the file referred to by the given file
  * descriptor.
  *
+ * A `size` of 0 can be used to query the current length, in which case `list` is ignored and may be null.
+ *
  * Returns the non-negative length of the list on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t flistxattr(int __fd, char* __list, size_t __size);
+ssize_t flistxattr(int __fd, char* _Nullable __list, size_t __size);
 
 /**
  * [listxattr(2)](http://man7.org/linux/man-pages/man2/listxattr.2.html)
  * lists the extended attributes on the file referred to by the given path.
  *
+ * A `size` of 0 can be used to query the current length, in which case `list` is ignored and may be null.
+ *
  * Returns the non-negative length of the list on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t listxattr(const char* __path, char* __list, size_t __size);
+ssize_t listxattr(const char* _Nonnull __path, char* _Nullable __list, size_t __size);
 
 /**
  * [llistxattr(2)](http://man7.org/linux/man-pages/man2/llistxattr.2.html)
  * lists the extended attributes on the file referred to by the given path, which
  * is the link itself rather than its target in the case of a symbolic link.
  *
+ * A `size` of 0 can be used to query the current length, in which case `list` is ignored and may be null.
+ *
  * Returns the non-negative length of the list on success, or
  * returns -1 and sets `errno` on failure.
  */
-ssize_t llistxattr(const char* __path, char* __list, size_t __size);
+ssize_t llistxattr(const char* _Nonnull __path, char* _Nullable __list, size_t __size);
 
 /**
  * [fremovexattr(2)](http://man7.org/linux/man-pages/man2/fremovexattr.2.html)
@@ -136,7 +160,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int fremovexattr(int __fd, const char* __name);
+int fremovexattr(int __fd, const char* _Nonnull __name);
 
 /**
  * [lremovexattr(2)](http://man7.org/linux/man-pages/man2/lremovexattr.2.html)
@@ -145,7 +169,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int lremovexattr(const char* __path, const char* __name);
+int lremovexattr(const char* _Nonnull __path, const char* _Nonnull __name);
 
 /**
  * [removexattr(2)](http://man7.org/linux/man-pages/man2/removexattr.2.html)
@@ -153,6 +177,6 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int removexattr(const char* __path, const char* __name);
+int removexattr(const char* _Nonnull __path, const char* _Nonnull __name);
 
 __END_DECLS
diff --git a/libc/include/syslog.h b/libc/include/syslog.h
index d89d769..90ea76e 100644
--- a/libc/include/syslog.h
+++ b/libc/include/syslog.h
@@ -112,17 +112,21 @@
  */
 #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
 
-/** openlog() options are currently ignored on Android. */
+/** openlog() option ignored on Android. */
 #define LOG_PID    0x01
-/** openlog() options are currently ignored on Android. */
+/** openlog() option ignored on Android. */
 #define LOG_CONS   0x02
-/** openlog() options are currently ignored on Android. */
+/** openlog() option ignored on Android. */
 #define LOG_ODELAY 0x04
-/** openlog() options are currently ignored on Android. */
+/** openlog() option ignored on Android. */
 #define LOG_NDELAY 0x08
-/** openlog() options are currently ignored on Android. */
+/** openlog() option ignored on Android. */
 #define LOG_NOWAIT 0x10
-/** openlog() options are currently ignored on Android. */
+/**
+ * openlog() option to log to stderr as well as the system log.
+ *
+ * Available since API level 34 (ignored before then).
+ */
 #define LOG_PERROR 0x20
 
 /**
diff --git a/libc/include/termios.h b/libc/include/termios.h
index 92ac24b..853b4eb 100644
--- a/libc/include/termios.h
+++ b/libc/include/termios.h
@@ -49,19 +49,19 @@
  * [cfgetispeed(3)](http://man7.org/linux/man-pages/man3/cfgetispeed.3.html)
  * returns the terminal input baud rate.
  */
-speed_t cfgetispeed(const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
+speed_t cfgetispeed(const struct termios* _Nonnull __t);
 
 /**
  * [cfgetospeed(3)](http://man7.org/linux/man-pages/man3/cfgetospeed.3.html)
  * returns the terminal output baud rate.
  */
-speed_t cfgetospeed(const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
+speed_t cfgetospeed(const struct termios* _Nonnull __t);
 
 /**
  * [cfmakeraw(3)](http://man7.org/linux/man-pages/man3/cfmakeraw.3.html)
  * configures the terminal for "raw" mode.
  */
-void cfmakeraw(struct termios* _Nonnull __t) __INTRODUCED_IN(21);
+void cfmakeraw(struct termios* _Nonnull __t);
 
 /**
  * [cfsetspeed(3)](http://man7.org/linux/man-pages/man3/cfsetspeed.3.html)
@@ -69,7 +69,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int cfsetspeed(struct termios* _Nonnull __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetspeed(struct termios* _Nonnull __t, speed_t __speed);
 
 /**
  * [cfsetispeed(3)](http://man7.org/linux/man-pages/man3/cfsetispeed.3.html)
@@ -77,7 +77,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int cfsetispeed(struct termios* _Nonnull _t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetispeed(struct termios* _Nonnull _t, speed_t __speed);
 
 /**
  * [cfsetospeed(3)](http://man7.org/linux/man-pages/man3/cfsetospeed.3.html)
@@ -85,7 +85,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int cfsetospeed(struct termios* _Nonnull __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetospeed(struct termios* _Nonnull __t, speed_t __speed);
 
 /**
  * [tcdrain(3)](http://man7.org/linux/man-pages/man3/tcdrain.3.html)
@@ -93,7 +93,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcdrain(int __fd) __INTRODUCED_IN(21);
+int tcdrain(int __fd);
 
 /**
  * [tcflow(3)](http://man7.org/linux/man-pages/man3/tcflow.3.html)
@@ -102,7 +102,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcflow(int __fd, int __action) __INTRODUCED_IN(21);
+int tcflow(int __fd, int __action);
 
 /**
  * [tcflush(3)](http://man7.org/linux/man-pages/man3/tcflush.3.html)
@@ -112,7 +112,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcflush(int __fd, int __queue) __INTRODUCED_IN(21);
+int tcflush(int __fd, int __queue);
 
 /**
  * [tcgetattr(3)](http://man7.org/linux/man-pages/man3/tcgetattr.3.html)
@@ -120,7 +120,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcgetattr(int __fd, struct termios* _Nonnull __t) __INTRODUCED_IN(21);
+int tcgetattr(int __fd, struct termios* _Nonnull __t);
 
 /**
  * [tcgetsid(3)](http://man7.org/linux/man-pages/man3/tcgetsid.3.html)
@@ -129,7 +129,7 @@
  * Returns a non-negative session id on success and
  * returns -1 and sets `errno` on failure.
  */
-pid_t tcgetsid(int __fd) __INTRODUCED_IN(21);
+pid_t tcgetsid(int __fd);
 
 /**
  * [tcsendbreak(3)](http://man7.org/linux/man-pages/man3/tcsendbreak.3.html)
@@ -137,7 +137,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcsendbreak(int __fd, int __duration) __INTRODUCED_IN(21);
+int tcsendbreak(int __fd, int __duration);
 
 /**
  * [tcsetattr(3)](http://man7.org/linux/man-pages/man3/tcsetattr.3.html)
@@ -145,7 +145,7 @@
  *
  * Returns 0 on success and returns -1 and sets `errno` on failure.
  */
-int tcsetattr(int __fd, int __optional_actions, const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
+int tcsetattr(int __fd, int __optional_actions, const struct termios* _Nonnull __t);
 
 #endif
 
diff --git a/libc/include/time.h b/libc/include/time.h
index 5339540..31c2050 100644
--- a/libc/include/time.h
+++ b/libc/include/time.h
@@ -26,8 +26,12 @@
  * SUCH DAMAGE.
  */
 
-#ifndef _TIME_H_
-#define _TIME_H_
+#pragma once
+
+/**
+ * @file time.h
+ * @brief Clock and timer functionality.
+ */
 
 #include <sys/cdefs.h>
 #include <sys/time.h>
@@ -35,79 +39,435 @@
 
 __BEGIN_DECLS
 
+/* If we just use void* in the typedef, the compiler exposes that in error messages. */
+struct __timezone_t;
+
+/**
+ * The `timezone_t` type that represents a timezone.
+ *
+ * To use this with std::unique_ptr you'll want something like
+ * `std::unique_ptr<std::remove_pointer_t<timezone_t>, decltype(&tzfree)> tz{tzalloc("Asia/Seoul"), tzfree};`
+ * to remove the pointer.
+ */
+typedef struct __timezone_t* timezone_t;
+
+/** Divisor to compute seconds from the result of a call to clock(). */
 #define CLOCKS_PER_SEC 1000000
 
+/**
+ * The name of the current timezone's non-daylight savings (`tzname[0]`) and
+ * daylight savings (`tzname[1]`) variants. See tzset().
+ */
 extern char* _Nonnull tzname[];
+
+/** Whether the current timezone ever uses daylight savings time. See tzset(). */
 extern int daylight;
+
+/** The difference in seconds between UTC and the current timezone. See tzset(). */
 extern long int timezone;
 
 struct sigevent;
 
+/**
+ * A "broken-down" time, useful for parsing/formatting times for human consumption.
+ */
 struct tm {
+  /** Seconds, 0-60. (60 is a leap second.) */
   int tm_sec;
+  /** Minutes, 0-59. */
   int tm_min;
+  /** Hours, 0-23. */
   int tm_hour;
+  /** Day of month, 1-31. */
   int tm_mday;
+  /** Month of year, 0-11. (Not 1-12!) */
   int tm_mon;
+  /** Years since 1900. (So 2023 is 123, not 2023!) */
   int tm_year;
+  /** Day of week, 0-6. (Sunday is 0, Saturday is 6.) */
   int tm_wday;
+  /** Day of year, 0-365. */
   int tm_yday;
+  /** Daylight savings flag, positive for DST in effect, 0 for DST not in effect, and -1 for unknown. */
   int tm_isdst;
+  /** Offset from UTC (GMT) in seconds for this time. */
   long int tm_gmtoff;
+  /** Name of the timezone for this time. */
   const char* _Nullable tm_zone;
 };
 
+/** Alternative name for `tm_zone` in `struct tm`. */
 #define TM_ZONE tm_zone
 
+/**
+ * [time(2)](http://man7.org/linux/man-pages/man2/time.2.html) returns
+ * the number of seconds since the Unix epoch (1970-01-01 00:00:00 +0000).
+ *
+ * Returns the time in seconds on success, and returns -1 and sets `errno` on failure.
+ */
 time_t time(time_t* _Nullable __t);
+
+/**
+ * [nanosleep(2)](http://man7.org/linux/man-pages/man2/nanosleep.2.html) sleeps
+ * for at least the given time (or until a signal arrives).
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure. If the sleep
+ * was interrupted by a signal, `errno` will be `EINTR` and `remainder` will be
+ * the amount of time remaining.
+ */
 int nanosleep(const struct timespec* _Nonnull __request, struct timespec* _Nullable __remainder);
 
+/**
+ * [asctime(3)](http://man7.org/linux/man-pages/man3/asctime.3p.html) formats
+ * the time `tm` as a string.
+ *
+ * Returns a pointer to a string on success, and returns NULL on failure.
+ *
+ * That string will be overwritten by later calls to this function.
+ *
+ * New code should prefer strftime().
+ */
 char* _Nullable asctime(const struct tm* _Nonnull __tm);
+
+/**
+ * [asctime_r(3)](http://man7.org/linux/man-pages/man3/asctime_r.3p.html) formats
+ * the time `tm` as a string in the given buffer `buf`.
+ *
+ * Returns a pointer to a string on success, and returns NULL on failure.
+ *
+ * New code should prefer strftime().
+ */
 char* _Nullable asctime_r(const struct tm* _Nonnull __tm, char* _Nonnull __buf);
 
+/**
+ * [difftime(3)](http://man7.org/linux/man-pages/man3/difftime.3.html) returns
+ * the difference between two times.
+ *
+ * Returns the difference in seconds.
+ */
 double difftime(time_t __lhs, time_t __rhs);
+
+/**
+ * [mktime(3)](http://man7.org/linux/man-pages/man3/mktime.3p.html) converts
+ * broken-down time `tm` into the number of seconds since the Unix epoch.
+ *
+ * See tzset() for details of how the timezone is set, and mktime_rz()
+ * for an alternative.
+ *
+ * Returns the time in seconds on success, and returns -1 and sets `errno` on failure.
+ */
 time_t mktime(struct tm* _Nonnull __tm);
 
+/**
+ * mktime_z(3) converts broken-down time `tm` into the number of seconds
+ * since the Unix epoch, assuming the given timezone.
+ *
+ * Returns the time in seconds on success, and returns -1 and sets `errno` on failure.
+ *
+ * Available since API level 35.
+ */
+time_t mktime_z(timezone_t _Nonnull __tz, struct tm* _Nonnull __tm) __INTRODUCED_IN(35);
+
+/**
+ * [localtime(3)](http://man7.org/linux/man-pages/man3/localtime.3p.html) converts
+ * the number of seconds since the Unix epoch in `t` to a broken-down time, taking
+ * the device's timezone into account.
+ *
+ * That broken-down time will be overwritten by later calls to this function.
+ *
+ * Returns a pointer to a broken-down time on success, and returns null and sets `errno` on failure.
+ */
 struct tm* _Nullable localtime(const time_t* _Nonnull __t);
+
+/**
+ * [localtime_r(3)](http://man7.org/linux/man-pages/man3/localtime_r.3p.html) converts
+ * the number of seconds since the Unix epoch in `t` to a broken-down time.
+ * That broken-down time will be written to the given struct `tm`.
+ *
+ * See tzset() for details of how the timezone is set, and localtime_rz()
+ * for an alternative.
+ *
+ * Returns a pointer to a broken-down time on success, and returns null and sets `errno` on failure.
+ */
 struct tm* _Nullable localtime_r(const time_t* _Nonnull __t, struct tm* _Nonnull __tm);
 
+/**
+ * localtime_rz(3) converts the number of seconds since the Unix epoch in
+ * `t` to a broken-down time, assuming the given timezone. That broken-down
+ * time will be written to the given struct `tm`.
+ *
+ * Returns a pointer to a broken-down time on success, and returns null and sets `errno` on failure.
+ *
+ * Available since API level 35.
+ */
+struct tm* _Nullable localtime_rz(timezone_t _Nonnull __tz, const time_t* _Nonnull __t, struct tm* _Nonnull __tm) __INTRODUCED_IN(35);
+
+/**
+ * Inverse of localtime().
+ */
+time_t timelocal(struct tm* _Nonnull __tm);
+
+/**
+ * [gmtime(3)](http://man7.org/linux/man-pages/man3/gmtime.3p.html) converts
+ * the number of seconds since the Unix epoch in `t` to a broken-down time, using
+ * UTC (historically also known as GMT).
+ *
+ * That broken-down time will be overwritten by later calls to this function.
+ *
+ * Returns a pointer to a broken-down time on success, and returns null and sets `errno` on failure.
+ */
 struct tm* _Nullable gmtime(const time_t* _Nonnull __t);
+
+/**
+ * [gmtime_r(3)](http://man7.org/linux/man-pages/man3/gmtime_r.3p.html) converts
+ * the number of seconds since the Unix epoch in `t` to a broken-down time, using
+ * UTC (historically also known as GMT).
+ *
+ * That broken-down time will be written to the provided struct `tm`.
+ *
+ * Returns a pointer to a broken-down time on success, and returns null and sets `errno` on failure.
+ */
 struct tm* _Nullable gmtime_r(const time_t* _Nonnull __t, struct tm* _Nonnull __tm);
 
-char* _Nullable strptime(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnull __tm) __strftimelike(2);
-char* _Nullable strptime_l(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnull __tm, locale_t _Nonnull __l) __strftimelike(2) __INTRODUCED_IN(28);
-
-size_t strftime(char* _Nonnull __buf, size_t __n, const char* _Nonnull __fmt, const struct tm* _Nullable __tm) __strftimelike(3);
-size_t strftime_l(char* _Nonnull __buf, size_t __n, const char* _Nonnull __fmt, const struct tm* _Nullable __tm, locale_t _Nonnull __l) __strftimelike(3) __INTRODUCED_IN(21);
-
-char* _Nullable ctime(const time_t* _Nonnull __t);
-char* _Nullable ctime_r(const time_t* _Nonnull __t, char* _Nonnull __buf);
-
-void tzset(void);
-
-clock_t clock(void);
-
-int clock_getcpuclockid(pid_t __pid, clockid_t* _Nonnull __clock) __INTRODUCED_IN(23);
-
-
-int clock_getres(clockid_t __clock, struct timespec* _Nullable __resolution);
-int clock_gettime(clockid_t __clock, struct timespec* _Nonnull __ts);
-int clock_nanosleep(clockid_t __clock, int __flags, const struct timespec* _Nonnull __request, struct timespec* _Nullable __remainder);
-int clock_settime(clockid_t __clock, const struct timespec* _Nonnull __ts);
-
-int timer_create(clockid_t __clock, struct sigevent* _Nullable __event, timer_t _Nonnull * _Nonnull __timer_ptr);
-int timer_delete(timer_t _Nonnull __timer);
-int timer_settime(timer_t _Nonnull __timer, int __flags, const struct itimerspec* _Nonnull __new_value, struct itimerspec* _Nullable __old_value);
-int timer_gettime(timer_t _Nonnull _timer, struct itimerspec* _Nonnull __ts);
-int timer_getoverrun(timer_t _Nonnull __timer);
-
-/* Non-standard extensions that are in the BSDs and glibc. */
-time_t timelocal(struct tm* _Nonnull __tm);
+/**
+ * Inverse of gmtime().
+ */
 time_t timegm(struct tm* _Nonnull __tm);
 
-#define TIME_UTC 1
+/**
+ * [strptime(3)](http://man7.org/linux/man-pages/man3/strptime.3.html) parses
+ * a string `s` assuming format `fmt` into broken-down time `tm`.
+ *
+ * Returns a pointer to the first character _not_ parsed, or null if no characters were parsed.
+ */
+char* _Nullable strptime(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnull __tm) __strftimelike(2);
+
+/**
+ * Equivalent to strptime() on Android where only C/POSIX locales are available.
+ */
+char* _Nullable strptime_l(const char* _Nonnull __s, const char* _Nonnull __fmt, struct tm* _Nonnull __tm, locale_t _Nonnull __l) __strftimelike(2) __INTRODUCED_IN(28);
+
+/**
+ * [strftime(3)](http://man7.org/linux/man-pages/man3/strftime.3.html) formats
+ * a broken-down time `tm` into the buffer `buf` using format `fmt`.
+ *
+ * Returns a pointer to the first character _not_ parsed, or null if no characters were parsed.
+ */
+size_t strftime(char* _Nonnull __buf, size_t __n, const char* _Nonnull __fmt, const struct tm* _Nullable __tm) __strftimelike(3);
+
+/**
+ * Equivalent to strftime() on Android where only C/POSIX locales are available.
+ */
+size_t strftime_l(char* _Nonnull __buf, size_t __n, const char* _Nonnull __fmt, const struct tm* _Nullable __tm, locale_t _Nonnull __l) __strftimelike(3);
+
+/**
+ * [ctime(3)](http://man7.org/linux/man-pages/man3/ctime.3p.html) formats
+ * the time `tm` as a string.
+ *
+ * Returns a pointer to a string on success, and returns NULL on failure.
+ *
+ * That string will be overwritten by later calls to this function.
+ *
+ * New code should prefer strftime().
+ */
+char* _Nullable ctime(const time_t* _Nonnull __t);
+
+/**
+ * [ctime_r(3)](http://man7.org/linux/man-pages/man3/ctime.3p.html) formats
+ * the time `tm` as a string in the given buffer `buf`.
+ *
+ * Returns a pointer to a string on success, and returns NULL on failure.
+ *
+ * New code should prefer strftime().
+ */
+char* _Nullable ctime_r(const time_t* _Nonnull __t, char* _Nonnull __buf);
+
+/**
+ * [tzset(3)](http://man7.org/linux/man-pages/man3/tzset.3.html) tells
+ * libc that the timezone has changed.
+ *
+ * tzset() on Android looks at both the system property
+ * `persist.sys.timezone` and the environment variable `TZ`. The former is
+ * the device's current timezone as shown in Settings, while the latter is
+ * usually unset but can be used to override the global setting. This is a
+ * bad idea outside of unit tests or single-threaded programs because it's
+ * inherently thread-unsafe. See tzalloc(), localtime_rz(), mktime_z(),
+ * and tzfree() for an alternative.
+ */
+void tzset(void);
+
+/**
+ * tzalloc(3) allocates a timezone corresponding to the given Olson ID.
+ *
+ * A null `id` returns the system timezone (as seen in Settings) from
+ * the system property `persist.sys.timezone`, ignoring `$TZ`. Although
+ * tzset() honors `$TZ`, callers of tzalloc() can use `$TZ` themselves if
+ * that's the (thread-unsafe) behavior they want, but by ignoring `$TZ`
+ * tzalloc() is thread safe (though obviously the system timezone can
+ * change, especially if your mobile device is actually mobile!).
+ *
+ * To use this with std::unique_ptr you'll want something like
+ * `std::unique_ptr<std::remove_pointer_t<timezone_t>, decltype(&tzfree)> tz{tzalloc("Asia/Seoul"), tzfree};`
+ * to remove the pointer.
+ *
+ * Returns a timezone object on success, and returns NULL and sets `errno` on failure.
+ *
+ * Available since API level 35.
+ */
+timezone_t _Nullable tzalloc(const char* _Nullable __id) __INTRODUCED_IN(35);
+
+/**
+ * tzfree(3) frees a timezone object returned by tzalloc().
+ *
+ * To use this with std::unique_ptr you'll want something like
+ * `std::unique_ptr<std::remove_pointer_t<timezone_t>, decltype(&tzfree)> tz{tzalloc("Asia/Seoul"), tzfree};`
+ * to remove the pointer.
+ *
+ * Available since API level 35.
+ */
+void tzfree(timezone_t _Nullable __tz) __INTRODUCED_IN(35);
+
+/**
+ * [clock(3)](http://man7.org/linux/man-pages/man3/clock.3.html)
+ * returns an approximation of CPU time used, equivalent to
+ * `clock_gettime(CLOCK_PROCESS_CPUTIME_ID)` but with more confusing
+ * units. Use `CLOCKS_PER_SEC` to convert the result to seconds.
+ *
+ * Returns the time in seconds on success, and returns -1 and sets `errno` on failure.
+ *
+ * New code should prefer `clock_gettime(CLOCK_PROCESS_CPUTIME_ID)`.
+ */
+clock_t clock(void);
+
+/**
+ * [clock_getcpuclockid(3)](http://man7.org/linux/man-pages/man3/clock_getcpuclockid.3.html)
+ * gets the clock ID of the cpu-time clock for the given `pid`.
+ *
+ * Returns 0 on success, and returns -1 and returns an error number on failure.
+ */
+int clock_getcpuclockid(pid_t __pid, clockid_t* _Nonnull __clock) __INTRODUCED_IN(23);
+
+/**
+ * [clock_getres(2)](http://man7.org/linux/man-pages/man2/clock_getres.2.html)
+ * gets the resolution of the given clock.
+ *
+ * Returns 0 on success, and returns -1 and returns an error number on failure.
+ */
+int clock_getres(clockid_t __clock, struct timespec* _Nullable __resolution);
+
+/**
+ * [clock_gettime(2)](http://man7.org/linux/man-pages/man2/clock_gettime.2.html)
+ * gets the time according to the given clock.
+ *
+ * Returns 0 on success, and returns -1 and returns an error number on failure.
+ */
+int clock_gettime(clockid_t __clock, struct timespec* _Nonnull __ts);
+
+/**
+ * [clock_nanosleep(2)](http://man7.org/linux/man-pages/man2/clock_nanosleep.2.html)
+ * sleeps for the given time as measured by the given clock.
+ *
+ * Returns 0 on success, and returns -1 and returns an error number on failure.
+ * If the sleep was interrupted by a signal, the return value will be `EINTR`
+ * and `remainder` will be the amount of time remaining.
+ */
+int clock_nanosleep(clockid_t __clock, int __flags, const struct timespec* _Nonnull __request, struct timespec* _Nullable __remainder);
+
+/**
+ * [clock_settime(2)](http://man7.org/linux/man-pages/man2/clock_settime.2.html)
+ * sets the time for the given clock.
+ *
+ * Returns 0 on success, and returns -1 and returns an error number on failure.
+ */
+int clock_settime(clockid_t __clock, const struct timespec* _Nonnull __ts);
+
+/**
+ * [timer_create(2)](http://man7.org/linux/man-pages/man2/timer_create.2.html)
+ * creates a POSIX timer.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ */
+int timer_create(clockid_t __clock, struct sigevent* _Nullable __event, timer_t _Nonnull * _Nonnull __timer_ptr);
+
+/**
+ * [timer_delete(2)](http://man7.org/linux/man-pages/man2/timer_delete.2.html)
+ * destroys a POSIX timer.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ */
+int timer_delete(timer_t _Nonnull __timer);
+
+/**
+ * [timer_settime(2)](http://man7.org/linux/man-pages/man2/timer_settime.2.html)
+ * starts or stops a POSIX timer.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ */
+int timer_settime(timer_t _Nonnull __timer, int __flags, const struct itimerspec* _Nonnull __new_value, struct itimerspec* _Nullable __old_value);
+
+/**
+ * [timer_gettime(2)](http://man7.org/linux/man-pages/man2/timer_gettime.2.html)
+ * gets the time until the given timer next fires.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ */
+int timer_gettime(timer_t _Nonnull _timer, struct itimerspec* _Nonnull __ts);
+
+/**
+ * [timer_getoverrun(2)](http://man7.org/linux/man-pages/man2/timer_getoverrun.2.html)
+ * gets the overrun count (the number of times the timer should have fired, but
+ * didn't) for the last time the timer fired.
+ *
+ * Returns the overrun count on success, and returns -1 and sets `errno` on failure.
+ */
+int timer_getoverrun(timer_t _Nonnull __timer);
+
+/**
+ * The timebase for timespec_get() and timespec_getres() corresponding to CLOCK_REALTIME.
+ *
+ * Available since API level 29.
+ */
+#define TIME_UTC (CLOCK_REALTIME+1)
+
+/**
+ * The timebase for timespec_get() and timespec_getres() corresponding to CLOCK_MONOTONIC.
+ *
+ * Available since API level 35.
+ */
+#define TIME_MONOTONIC (CLOCK_MONOTONIC+1)
+
+/**
+ * The timebase for timespec_get() and timespec_getres() corresponding to CLOCK_PROCESS_CPUTIME_ID.
+ *
+ * Available since API level 35.
+ */
+#define TIME_ACTIVE (CLOCK_PROCESS_CPUTIME_ID+1)
+
+/**
+ * The timebase for timespec_get() and timespec_getres() corresponding to CLOCK_THREAD_CPUTIME_ID.
+ *
+ * Available since API level 35.
+ */
+#define TIME_THREAD_ACTIVE (CLOCK_THREAD_CPUTIME_ID+1)
+
+/**
+ * timespec_get(3) is equivalent to clock_gettime() for the clock corresponding to the given base.
+ *
+ * Returns the base on success and returns 0 on failure.
+ *
+ * Available since API level 29 for TIME_UTC; other bases arrived later.
+ * Code for Android should prefer clock_gettime().
+ */
 int timespec_get(struct timespec* _Nonnull __ts, int __base) __INTRODUCED_IN(29);
 
-__END_DECLS
+/**
+ * timespec_getres(3) is equivalent to clock_getres() for the clock corresponding to the given base.
+ *
+ * Returns the base on success and returns 0 on failure.
+ *
+ * Available since API level 35.
+ * Code for Android should prefer clock_gettime().
+ */
+int timespec_getres(struct timespec* _Nonnull __ts, int __base) __INTRODUCED_IN(35);
 
-#endif
+__END_DECLS
diff --git a/libc/include/uchar.h b/libc/include/uchar.h
index 90af651..0c7424d 100644
--- a/libc/include/uchar.h
+++ b/libc/include/uchar.h
@@ -58,10 +58,8 @@
  *
  * Returns the number of bytes written to `__buf` on success, and returns -1 and sets `errno`
  * on failure.
- *
- * Available since API level 21.
  */
-size_t c16rtomb(char* _Nullable __buf, char16_t __ch16, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t c16rtomb(char* _Nullable __buf, char16_t __ch16, mbstate_t* _Nullable __ps);
 
 /**
  * [c32rtomb(3)](http://man7.org/linux/man-pages/man3/c32rtomb.3.html) converts a single UTF-32
@@ -69,25 +67,19 @@
  *
  * Returns the number of bytes written to `__buf` on success, and returns -1 and sets `errno`
  * on failure.
- *
- * Available since API level 21.
  */
-size_t c32rtomb(char* _Nullable __buf, char32_t __ch32, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t c32rtomb(char* _Nullable __buf, char32_t __ch32, mbstate_t* _Nullable __ps);
 
 /**
  * [mbrtoc16(3)](http://man7.org/linux/man-pages/man3/mbrtoc16.3.html) converts the next UTF-8
  * sequence to a UTF-16 code point.
- *
- * Available since API level 21.
  */
-size_t mbrtoc16(char16_t* _Nullable __ch16, const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t mbrtoc16(char16_t* _Nullable __ch16, const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps);
 
 /**
  * [mbrtoc32(3)](http://man7.org/linux/man-pages/man3/mbrtoc32.3.html) converts the next UTF-8
  * sequence to a UTF-32 code point.
- *
- * Available since API level 21.
  */
-size_t mbrtoc32(char32_t* _Nullable __ch32, const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t mbrtoc32(char32_t* _Nullable __ch32, const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps);
 
 __END_DECLS
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 7ad94e1..9385264 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -86,12 +86,12 @@
 pid_t  getppid(void);
 pid_t  getpgrp(void);
 int    setpgrp(void);
-pid_t  getsid(pid_t __pid) __INTRODUCED_IN(17);
+pid_t  getsid(pid_t __pid);
 pid_t  setsid(void);
 
 int execv(const char* _Nonnull __path, char* _Nullable const* _Nullable __argv);
 int execvp(const char* _Nonnull __file, char* _Nullable const* _Nullable __argv);
-int execvpe(const char* _Nonnull __file, char* _Nullable const* _Nullable __argv, char* _Nullable const* _Nullable __envp) __INTRODUCED_IN(21);
+int execvpe(const char* _Nonnull __file, char* _Nullable const* _Nullable __argv, char* _Nullable const* _Nullable __envp);
 int execve(const char* _Nonnull __file, char* _Nullable const* _Nullable __argv, char* _Nullable const* _Nullable __envp);
 int execl(const char* _Nonnull __path, const char* _Nullable __arg0, ...) __attribute__((__sentinel__));
 int execlp(const char* _Nonnull __file, const char* _Nullable __arg0, ...) __attribute__((__sentinel__));
@@ -206,7 +206,7 @@
 int access(const char* _Nonnull __path, int __mode);
 int faccessat(int __dirfd, const char* _Nonnull __path, int __mode, int __flags);
 int link(const char* _Nonnull __old_path, const char* _Nonnull __new_path);
-int linkat(int __old_dir_fd, const char* _Nonnull __old_path, int __new_dir_fd, const char* _Nonnull __new_path, int __flags) __INTRODUCED_IN(21);
+int linkat(int __old_dir_fd, const char* _Nonnull __old_path, int __new_dir_fd, const char* _Nonnull __new_path, int __flags);
 int unlink(const char* _Nonnull __path);
 int unlinkat(int __dirfd, const char* _Nonnull __path, int __flags);
 int chdir(const char* _Nonnull __path);
@@ -218,10 +218,9 @@
 #endif
 int chroot(const char* _Nonnull __path);
 int symlink(const char* _Nonnull __old_path, const char* _Nonnull __new_path);
-int symlinkat(const char* _Nonnull __old_path, int __new_dir_fd, const char* _Nonnull __new_path) __INTRODUCED_IN(21);
+int symlinkat(const char* _Nonnull __old_path, int __new_dir_fd, const char* _Nonnull __new_path);
 ssize_t readlink(const char* _Nonnull __path, char* _Nonnull __buf, size_t __buf_size);
-ssize_t readlinkat(int __dir_fd, const char* _Nonnull __path, char* _Nonnull __buf, size_t __buf_size)
-    __INTRODUCED_IN(21);
+ssize_t readlinkat(int __dir_fd, const char* _Nonnull __path, char* _Nonnull __buf, size_t __buf_size);
 int chown(const char* _Nonnull __path, uid_t __owner, gid_t __group);
 int fchown(int __fd, uid_t __owner, gid_t __group);
 int fchownat(int __dir_fd, const char* _Nonnull __path, uid_t __owner, gid_t __group, int __flags);
@@ -261,13 +260,13 @@
 
 int dup(int __old_fd);
 int dup2(int __old_fd, int __new_fd);
-int dup3(int __old_fd, int __new_fd, int __flags) __INTRODUCED_IN(21);
+int dup3(int __old_fd, int __new_fd, int __flags);
 int fsync(int __fd);
 int fdatasync(int __fd);
 
 /* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
 #if defined(__USE_FILE_OFFSET64)
-int truncate(const char* _Nonnull __path, off_t __length) __RENAME(truncate64) __INTRODUCED_IN(21);
+int truncate(const char* _Nonnull __path, off_t __length) __RENAME(truncate64);
 off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
 ssize_t pread(int __fd, void* _Nonnull __buf, size_t __count, off_t __offset) __RENAME(pread64);
 ssize_t pwrite(int __fd, const void* _Nonnull __buf, size_t __count, off_t __offset) __RENAME(pwrite64);
@@ -280,7 +279,7 @@
 int ftruncate(int __fd, off_t __length);
 #endif
 
-int truncate64(const char* _Nonnull __path, off64_t __length) __INTRODUCED_IN(21);
+int truncate64(const char* _Nonnull __path, off64_t __length);
 off64_t lseek64(int __fd, off64_t __offset, int __whence);
 ssize_t pread64(int __fd, void* _Nonnull __buf, size_t __count, off64_t __offset);
 ssize_t pwrite64(int __fd, const void* _Nonnull __buf, size_t __count, off64_t __offset);
@@ -303,7 +302,7 @@
 
 int acct(const char* _Nullable __path);
 
-int getpagesize(void) __INTRODUCED_IN(21);
+int getpagesize(void) __attribute_const__;
 
 long syscall(long __number, ...);
 
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index 39f9374..2671580 100644
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
@@ -57,18 +57,19 @@
 size_t mbrlen(const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps);
 size_t mbrtowc(wchar_t* _Nullable __buf, const char* _Nullable __s, size_t __n, mbstate_t* _Nullable __ps);
 size_t mbsrtowcs(wchar_t* _Nullable __dst, const char* _Nullable * _Nonnull __src, size_t __dst_n, mbstate_t* _Nullable __ps);
-size_t mbsnrtowcs(wchar_t* _Nullable __dst, const char* _Nullable * _Nullable  __src, size_t __src_n, size_t __dst_n, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t mbsrtowcs_l(wchar_t* _Nullable __dst, const char* _Nullable * _Nonnull __src, size_t __dst_n, mbstate_t* _Nullable __ps, locale_t _Nonnull __l) __INTRODUCED_IN(35);
+size_t mbsnrtowcs(wchar_t* _Nullable __dst, const char* _Nullable * _Nullable  __src, size_t __src_n, size_t __dst_n, mbstate_t* _Nullable __ps);
 wint_t putwc(wchar_t __wc, FILE* _Nonnull __fp);
 wint_t putwchar(wchar_t __wc);
 int swprintf(wchar_t* _Nonnull __buf, size_t __n, const wchar_t* _Nonnull __fmt, ...);
 int swscanf(const wchar_t* _Nonnull __s, const wchar_t* _Nonnull __fmt, ...);
 wint_t ungetwc(wint_t __wc, FILE* _Nonnull __fp);
 int vfwprintf(FILE* _Nonnull __fp, const wchar_t* _Nonnull __fmt, va_list __args);
-int vfwscanf(FILE* _Nonnull __fp, const wchar_t* _Nonnull __fmt, va_list __args) __INTRODUCED_IN(21);
+int vfwscanf(FILE* _Nonnull __fp, const wchar_t* _Nonnull __fmt, va_list __args);
 int vswprintf(wchar_t* _Nonnull __buf, size_t __n, const wchar_t* _Nonnull __fmt, va_list __args);
-int vswscanf(const wchar_t* _Nonnull __s, const wchar_t* _Nonnull __fmt, va_list __args) __INTRODUCED_IN(21);
+int vswscanf(const wchar_t* _Nonnull __s, const wchar_t* _Nonnull __fmt, va_list __args);
 int vwprintf(const wchar_t* _Nonnull __fmt, va_list __args);
-int vwscanf(const wchar_t* _Nonnull __fmt, va_list __args) __INTRODUCED_IN(21);
+int vwscanf(const wchar_t* _Nonnull __fmt, va_list __args);
 wchar_t* _Nonnull wcpcpy(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src);
 wchar_t* _Nonnull wcpncpy(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src, size_t __n);
 size_t wcrtomb(char* _Nullable __buf, wchar_t __wc, mbstate_t* _Nullable __ps);
@@ -88,24 +89,25 @@
 wchar_t* _Nonnull wcsncat(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src, size_t __n);
 int wcsncmp(const wchar_t* _Nonnull __lhs, const wchar_t* _Nonnull __rhs, size_t __n);
 wchar_t* _Nonnull wcsncpy(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src, size_t __n);
-size_t wcsnrtombs(char* _Nullable __dst, const wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __src, size_t __src_n, size_t __dst_n, mbstate_t* _Nullable __ps) __INTRODUCED_IN(21);
+size_t wcsnrtombs(char* _Nullable __dst, const wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __src, size_t __src_n, size_t __dst_n, mbstate_t* _Nullable __ps);
 wchar_t* _Nullable wcspbrk(const wchar_t* _Nonnull __s, const wchar_t* _Nonnull __accept);
 wchar_t* _Nullable wcsrchr(const wchar_t* _Nonnull __s, wchar_t __wc);
 size_t wcsrtombs(char* _Nullable __dst, const wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __src, size_t __dst_n, mbstate_t* _Nullable __ps);
+size_t wcsrtombs_l(char* _Nullable __dst, const wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __src, size_t __dst_n, mbstate_t* _Nullable __ps, locale_t _Nonnull __l) __INTRODUCED_IN(35);
 size_t wcsspn(const wchar_t* _Nonnull __s, const wchar_t* _Nonnull __accept);
 wchar_t* _Nullable wcsstr(const wchar_t* _Nonnull __haystack, const wchar_t* _Nonnull __needle);
 double wcstod(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr);
 double wcstod_l(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, locale_t _Nonnull __l) __INTRODUCED_IN(28);
-float wcstof(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr) __INTRODUCED_IN(21);
+float wcstof(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr);
 float wcstof_l(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, locale_t _Nonnull __l) __INTRODUCED_IN(28);
 wchar_t* _Nullable wcstok(wchar_t* _Nullable __s, const wchar_t* _Nonnull __delimiter, wchar_t* _Nonnull * _Nonnull __ptr);
 long wcstol(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base);
 long wcstol_l(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(28);
-long long wcstoll(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
-long double wcstold(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr) __RENAME_LDBL(wcstod, 3, 21);
+long long wcstoll(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base);
+long double wcstold(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr);
 unsigned long wcstoul(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base);
 unsigned long wcstoul_l(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(28);
-unsigned long long wcstoull(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
+unsigned long long wcstoull(const wchar_t* _Nonnull __s, wchar_t* __BIONIC_COMPLICATED_NULLNESS * _Nullable __end_ptr, int __base);
 int wcswidth(const wchar_t* _Nonnull __s, size_t __n);
 size_t wcsxfrm(wchar_t* __BIONIC_COMPLICATED_NULLNESS __dst, const wchar_t* _Nonnull __src, size_t __n);
 int wctob(wint_t __wc);
@@ -121,13 +123,12 @@
 int wprintf(const wchar_t* _Nonnull __fmt, ...);
 int wscanf(const wchar_t* _Nonnull __fmt, ...);
 
-long long wcstoll_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-unsigned long long wcstoull_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-long double wcstold_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+long long wcstoll_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l);
+unsigned long long wcstoull_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l);
+long double wcstold_l(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l);
 
-int wcscoll_l(const wchar_t* _Nonnull __lhs, const wchar_t* _Nonnull __rhs, locale_t _Nonnull __l) __attribute_pure__
-    __INTRODUCED_IN(21);
-size_t wcsxfrm_l(wchar_t* __BIONIC_COMPLICATED_NULLNESS __dst, const wchar_t* _Nonnull __src, size_t __n, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+int wcscoll_l(const wchar_t* _Nonnull __lhs, const wchar_t* _Nonnull __rhs, locale_t _Nonnull __l) __attribute_pure__;
+size_t wcsxfrm_l(wchar_t* __BIONIC_COMPLICATED_NULLNESS __dst, const wchar_t* _Nonnull __src, size_t __n, locale_t _Nonnull __l);
 size_t wcslcat(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src, size_t __n);
 size_t wcslcpy(wchar_t* _Nonnull __dst, const wchar_t* _Nonnull __src, size_t __n);
 
diff --git a/libc/include/wctype.h b/libc/include/wctype.h
index 344343f..4f6f81f 100644
--- a/libc/include/wctype.h
+++ b/libc/include/wctype.h
@@ -35,27 +35,27 @@
 
 __BEGIN_DECLS
 
-int iswalnum_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswalpha_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswblank_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswcntrl_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswdigit_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswgraph_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswlower_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswprint_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswpunct_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswspace_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswupper_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswxdigit_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+int iswalnum_l(wint_t __wc, locale_t _Nonnull __l);
+int iswalpha_l(wint_t __wc, locale_t _Nonnull __l);
+int iswblank_l(wint_t __wc, locale_t _Nonnull __l);
+int iswcntrl_l(wint_t __wc, locale_t _Nonnull __l);
+int iswdigit_l(wint_t __wc, locale_t _Nonnull __l);
+int iswgraph_l(wint_t __wc, locale_t _Nonnull __l);
+int iswlower_l(wint_t __wc, locale_t _Nonnull __l);
+int iswprint_l(wint_t __wc, locale_t _Nonnull __l);
+int iswpunct_l(wint_t __wc, locale_t _Nonnull __l);
+int iswspace_l(wint_t __wc, locale_t _Nonnull __l);
+int iswupper_l(wint_t __wc, locale_t _Nonnull __l);
+int iswxdigit_l(wint_t __wc, locale_t _Nonnull __l);
 
-wint_t towlower_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-wint_t towupper_l(wint_t __wc, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+wint_t towlower_l(wint_t __wc, locale_t _Nonnull __l);
+wint_t towupper_l(wint_t __wc, locale_t _Nonnull __l);
 
 wint_t towctrans_l(wint_t __wc, wctrans_t _Nonnull __transform, locale_t _Nonnull __l) __INTRODUCED_IN(26);
 wctrans_t _Nonnull wctrans_l(const char* _Nonnull __name, locale_t _Nonnull __l) __INTRODUCED_IN(26);
 
-wctype_t wctype_l(const char* _Nonnull __name, locale_t _Nonnull __l) __INTRODUCED_IN(21);
-int iswctype_l(wint_t __wc, wctype_t __transform, locale_t _Nonnull __l) __INTRODUCED_IN(21);
+wctype_t wctype_l(const char* _Nonnull __name, locale_t _Nonnull __l);
+int iswctype_l(wint_t __wc, wctype_t __transform, locale_t _Nonnull __l);
 
 __END_DECLS
 
diff --git a/libc/kernel/tools/update_all.py b/libc/kernel/tools/update_all.py
index abc72a4..ae89a80 100755
--- a/libc/kernel/tools/update_all.py
+++ b/libc/kernel/tools/update_all.py
@@ -92,6 +92,7 @@
                      'kernel/uapi/asm-arm/asm/unistd.h',
                      'kernel/uapi/asm-arm/asm/unistd-eabi.h',
                      'kernel/uapi/asm-arm/asm/unistd-oabi.h',
+                     'kernel/uapi/asm-riscv/asm/unistd.h',
                      'kernel/uapi/asm-x86/asm/unistd_32.h',
                      'kernel/uapi/asm-x86/asm/unistd_64.h',
                      'kernel/uapi/asm-x86/asm/unistd_x32.h']:
diff --git a/libc/kernel/uapi/asm-arm64/asm/hwcap.h b/libc/kernel/uapi/asm-arm64/asm/hwcap.h
index bb592e4..3ec1354 100644
--- a/libc/kernel/uapi/asm-arm64/asm/hwcap.h
+++ b/libc/kernel/uapi/asm-arm64/asm/hwcap.h
@@ -87,4 +87,10 @@
 #define HWCAP2_CSSC (1UL << 34)
 #define HWCAP2_RPRFM (1UL << 35)
 #define HWCAP2_SVE2P1 (1UL << 36)
+#define HWCAP2_SME2 (1UL << 37)
+#define HWCAP2_SME2P1 (1UL << 38)
+#define HWCAP2_SME_I16I32 (1UL << 39)
+#define HWCAP2_SME_BI32I32 (1UL << 40)
+#define HWCAP2_SME_B16B16 (1UL << 41)
+#define HWCAP2_SME_F16F16 (1UL << 42)
 #endif
diff --git a/libc/kernel/uapi/asm-arm64/asm/kvm.h b/libc/kernel/uapi/asm-arm64/asm/kvm.h
index ce0c318..ea690eb 100644
--- a/libc/kernel/uapi/asm-arm64/asm/kvm.h
+++ b/libc/kernel/uapi/asm-arm64/asm/kvm.h
@@ -74,6 +74,7 @@
 #define KVM_ARM_VCPU_SVE 4
 #define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5
 #define KVM_ARM_VCPU_PTRAUTH_GENERIC 6
+#define KVM_ARM_VCPU_HAS_EL2 7
 struct kvm_vcpu_init {
   __u32 target;
   __u32 features[7];
@@ -125,6 +126,10 @@
   __u64 flags;
   __u64 reserved[2];
 };
+struct kvm_arm_counter_offset {
+  __u64 counter_offset;
+  __u64 reserved;
+};
 #define KVM_ARM_TAGS_TO_GUEST 0
 #define KVM_ARM_TAGS_FROM_GUEST 1
 #define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000
@@ -203,6 +208,8 @@
   KVM_REG_ARM_VENDOR_HYP_BIT_FUNC_FEAT = 0,
   KVM_REG_ARM_VENDOR_HYP_BIT_PTP = 1,
 };
+#define KVM_ARM_VM_SMCCC_CTRL 0
+#define KVM_ARM_VM_SMCCC_FILTER 0
 #define KVM_DEV_ARM_VGIC_GRP_ADDR 0
 #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
 #define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2
@@ -236,6 +243,8 @@
 #define KVM_ARM_VCPU_TIMER_CTRL 1
 #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0
 #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1
+#define KVM_ARM_VCPU_TIMER_IRQ_HVTIMER 2
+#define KVM_ARM_VCPU_TIMER_IRQ_HPTIMER 3
 #define KVM_ARM_VCPU_PVTIME_CTRL 2
 #define KVM_ARM_VCPU_PVTIME_IPA 0
 #define KVM_ARM_IRQ_VCPU2_SHIFT 28
@@ -265,5 +274,18 @@
 #define KVM_PSCI_RET_DENIED PSCI_RET_DENIED
 #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0)
 #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0)
+enum kvm_smccc_filter_action {
+  KVM_SMCCC_FILTER_HANDLE = 0,
+  KVM_SMCCC_FILTER_DENY,
+  KVM_SMCCC_FILTER_FWD_TO_USER,
+};
+struct kvm_smccc_filter {
+  __u32 base;
+  __u32 nr_functions;
+  __u8 action;
+  __u8 pad[15];
+};
+#define KVM_HYPERCALL_EXIT_SMC (1U << 0)
+#define KVM_HYPERCALL_EXIT_16BIT (1U << 1)
 #endif
 #endif
diff --git a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h
index 04aa593..84cd16d 100644
--- a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h
+++ b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h
@@ -59,12 +59,23 @@
   __u16 __reserved[2];
 };
 #define SVE_SIG_FLAG_SM 0x1
+#define TPIDR2_MAGIC 0x54504902
+struct tpidr2_context {
+  struct _aarch64_ctx head;
+  __u64 tpidr2;
+};
 #define ZA_MAGIC 0x54366345
 struct za_context {
   struct _aarch64_ctx head;
   __u16 vl;
   __u16 __reserved[3];
 };
+#define ZT_MAGIC 0x5a544e01
+struct zt_context {
+  struct _aarch64_ctx head;
+  __u16 nregs;
+  __u16 __reserved[3];
+};
 #endif
 #include <asm/sve_context.h>
 #define SVE_VQ_BYTES __SVE_VQ_BYTES
@@ -94,4 +105,9 @@
 #define ZA_SIG_REGS_SIZE(vq) ((vq * __SVE_VQ_BYTES) * (vq * __SVE_VQ_BYTES))
 #define ZA_SIG_ZAV_OFFSET(vq,n) (ZA_SIG_REGS_OFFSET + (SVE_SIG_ZREG_SIZE(vq) * n))
 #define ZA_SIG_CONTEXT_SIZE(vq) (ZA_SIG_REGS_OFFSET + ZA_SIG_REGS_SIZE(vq))
+#define ZT_SIG_REG_SIZE 512
+#define ZT_SIG_REG_BYTES (ZT_SIG_REG_SIZE / 8)
+#define ZT_SIG_REGS_OFFSET sizeof(struct zt_context)
+#define ZT_SIG_REGS_SIZE(n) (ZT_SIG_REG_BYTES * n)
+#define ZT_SIG_CONTEXT_SIZE(n) (sizeof(struct zt_context) + ZT_SIG_REGS_SIZE(n))
 #endif
diff --git a/libc/kernel/uapi/asm-generic/fcntl.h b/libc/kernel/uapi/asm-generic/fcntl.h
index ea8c108..84c0481 100644
--- a/libc/kernel/uapi/asm-generic/fcntl.h
+++ b/libc/kernel/uapi/asm-generic/fcntl.h
@@ -78,7 +78,6 @@
 #define __O_TMPFILE 020000000
 #endif
 #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
-#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
 #ifndef O_NDELAY
 #define O_NDELAY O_NONBLOCK
 #endif
diff --git a/libc/kernel/uapi/asm-riscv/asm/hwprobe.h b/libc/kernel/uapi/asm-riscv/asm/hwprobe.h
new file mode 100644
index 0000000..0722805
--- /dev/null
+++ b/libc/kernel/uapi/asm-riscv/asm/hwprobe.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_ASM_HWPROBE_H
+#define _UAPI_ASM_HWPROBE_H
+#include <linux/types.h>
+struct riscv_hwprobe {
+  __s64 key;
+  __u64 value;
+};
+#define RISCV_HWPROBE_KEY_MVENDORID 0
+#define RISCV_HWPROBE_KEY_MARCHID 1
+#define RISCV_HWPROBE_KEY_MIMPID 2
+#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3
+#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA (1 << 0)
+#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
+#define RISCV_HWPROBE_IMA_FD (1 << 0)
+#define RISCV_HWPROBE_IMA_C (1 << 1)
+#define RISCV_HWPROBE_KEY_CPUPERF_0 5
+#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
+#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
+#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0)
+#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0)
+#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0)
+#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0)
+#endif
diff --git a/libc/kernel/uapi/asm-riscv/asm/kvm.h b/libc/kernel/uapi/asm-riscv/asm/kvm.h
index b49e3a0..bc7baef 100644
--- a/libc/kernel/uapi/asm-riscv/asm/kvm.h
+++ b/libc/kernel/uapi/asm-riscv/asm/kvm.h
@@ -20,6 +20,7 @@
 #define __LINUX_KVM_RISCV_H
 #ifndef __ASSEMBLY__
 #include <linux/types.h>
+#include <asm/bitsperlong.h>
 #include <asm/ptrace.h>
 #define __KVM_HAVE_READONLY_MEM
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
@@ -43,6 +44,7 @@
   unsigned long mvendorid;
   unsigned long marchid;
   unsigned long mimpid;
+  unsigned long zicboz_block_size;
 };
 struct kvm_riscv_core {
   struct user_regs_struct regs;
@@ -62,6 +64,15 @@
   unsigned long satp;
   unsigned long scounteren;
 };
+struct kvm_riscv_aia_csr {
+  unsigned long siselect;
+  unsigned long iprio1;
+  unsigned long iprio2;
+  unsigned long sieh;
+  unsigned long siph;
+  unsigned long iprio1h;
+  unsigned long iprio2h;
+};
 struct kvm_riscv_timer {
   __u64 frequency;
   __u64 time;
@@ -81,19 +92,39 @@
   KVM_RISCV_ISA_EXT_SVINVAL,
   KVM_RISCV_ISA_EXT_ZIHINTPAUSE,
   KVM_RISCV_ISA_EXT_ZICBOM,
+  KVM_RISCV_ISA_EXT_ZICBOZ,
+  KVM_RISCV_ISA_EXT_ZBB,
+  KVM_RISCV_ISA_EXT_SSAIA,
   KVM_RISCV_ISA_EXT_MAX,
 };
+enum KVM_RISCV_SBI_EXT_ID {
+  KVM_RISCV_SBI_EXT_V01 = 0,
+  KVM_RISCV_SBI_EXT_TIME,
+  KVM_RISCV_SBI_EXT_IPI,
+  KVM_RISCV_SBI_EXT_RFENCE,
+  KVM_RISCV_SBI_EXT_SRST,
+  KVM_RISCV_SBI_EXT_HSM,
+  KVM_RISCV_SBI_EXT_PMU,
+  KVM_RISCV_SBI_EXT_EXPERIMENTAL,
+  KVM_RISCV_SBI_EXT_VENDOR,
+  KVM_RISCV_SBI_EXT_MAX,
+};
 #define KVM_RISCV_TIMER_STATE_OFF 0
 #define KVM_RISCV_TIMER_STATE_ON 1
 #define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
 #define KVM_REG_RISCV_TYPE_MASK 0x00000000FF000000
 #define KVM_REG_RISCV_TYPE_SHIFT 24
+#define KVM_REG_RISCV_SUBTYPE_MASK 0x0000000000FF0000
+#define KVM_REG_RISCV_SUBTYPE_SHIFT 16
 #define KVM_REG_RISCV_CONFIG (0x01 << KVM_REG_RISCV_TYPE_SHIFT)
 #define KVM_REG_RISCV_CONFIG_REG(name) (offsetof(struct kvm_riscv_config, name) / sizeof(unsigned long))
 #define KVM_REG_RISCV_CORE (0x02 << KVM_REG_RISCV_TYPE_SHIFT)
 #define KVM_REG_RISCV_CORE_REG(name) (offsetof(struct kvm_riscv_core, name) / sizeof(unsigned long))
 #define KVM_REG_RISCV_CSR (0x03 << KVM_REG_RISCV_TYPE_SHIFT)
+#define KVM_REG_RISCV_CSR_GENERAL (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
+#define KVM_REG_RISCV_CSR_AIA (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
 #define KVM_REG_RISCV_CSR_REG(name) (offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long))
+#define KVM_REG_RISCV_CSR_AIA_REG(name) (offsetof(struct kvm_riscv_aia_csr, name) / sizeof(unsigned long))
 #define KVM_REG_RISCV_TIMER (0x04 << KVM_REG_RISCV_TYPE_SHIFT)
 #define KVM_REG_RISCV_TIMER_REG(name) (offsetof(struct kvm_riscv_timer, name) / sizeof(__u64))
 #define KVM_REG_RISCV_FP_F (0x05 << KVM_REG_RISCV_TYPE_SHIFT)
@@ -101,5 +132,12 @@
 #define KVM_REG_RISCV_FP_D (0x06 << KVM_REG_RISCV_TYPE_SHIFT)
 #define KVM_REG_RISCV_FP_D_REG(name) (offsetof(struct __riscv_d_ext_state, name) / sizeof(__u64))
 #define KVM_REG_RISCV_ISA_EXT (0x07 << KVM_REG_RISCV_TYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_EXT (0x08 << KVM_REG_RISCV_TYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_SINGLE (0x0 << KVM_REG_RISCV_SUBTYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_MULTI_EN (0x1 << KVM_REG_RISCV_SUBTYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_MULTI_DIS (0x2 << KVM_REG_RISCV_SUBTYPE_SHIFT)
+#define KVM_REG_RISCV_SBI_MULTI_REG(__ext_id) ((__ext_id) / __BITS_PER_LONG)
+#define KVM_REG_RISCV_SBI_MULTI_MASK(__ext_id) (1UL << ((__ext_id) % __BITS_PER_LONG))
+#define KVM_REG_RISCV_SBI_MULTI_REG_LAST KVM_REG_RISCV_SBI_MULTI_REG(KVM_RISCV_SBI_EXT_MAX - 1)
 #endif
 #endif
diff --git a/libc/kernel/uapi/asm-riscv/asm/setup.h b/libc/kernel/uapi/asm-riscv/asm/setup.h
index 940c4db..faac9a6 100644
--- a/libc/kernel/uapi/asm-riscv/asm/setup.h
+++ b/libc/kernel/uapi/asm-riscv/asm/setup.h
@@ -16,4 +16,7 @@
  ***
  ****************************************************************************
  ****************************************************************************/
-#include <asm-generic/setup.h>
+#ifndef _UAPI_ASM_RISCV_SETUP_H
+#define _UAPI_ASM_RISCV_SETUP_H
+#define COMMAND_LINE_SIZE 1024
+#endif
diff --git a/libc/kernel/uapi/asm-riscv/asm/unistd.h b/libc/kernel/uapi/asm-riscv/asm/unistd.h
index 665b820..b321ead 100644
--- a/libc/kernel/uapi/asm-riscv/asm/unistd.h
+++ b/libc/kernel/uapi/asm-riscv/asm/unistd.h
@@ -27,3 +27,7 @@
 #define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15)
 #endif
 __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache)
+#ifndef __NR_riscv_hwprobe
+#define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14)
+#endif
+__SYSCALL(__NR_riscv_hwprobe, sys_riscv_hwprobe)
diff --git a/libc/kernel/uapi/asm-x86/asm/kvm.h b/libc/kernel/uapi/asm-x86/asm/kvm.h
index 77d35fc..105a8e1 100644
--- a/libc/kernel/uapi/asm-x86/asm/kvm.h
+++ b/libc/kernel/uapi/asm-x86/asm/kvm.h
@@ -20,6 +20,7 @@
 #define _ASM_X86_KVM_H
 #include <linux/types.h>
 #include <linux/ioctl.h>
+#include <linux/stddef.h>
 #define KVM_PIO_PAGE_OFFSET 1
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 2
 #define KVM_DIRTY_LOG_PAGE_OFFSET 64
@@ -395,8 +396,8 @@
     __u8 pad[120];
   } hdr;
   union {
-    struct kvm_vmx_nested_state_data vmx[0];
-    struct kvm_svm_nested_state_data svm[0];
+    __DECLARE_FLEX_ARRAY(struct kvm_vmx_nested_state_data, vmx);
+    __DECLARE_FLEX_ARRAY(struct kvm_svm_nested_state_data, svm);
   } data;
 };
 struct kvm_pmu_event_filter {
@@ -409,6 +410,15 @@
 };
 #define KVM_PMU_EVENT_ALLOW 0
 #define KVM_PMU_EVENT_DENY 1
+#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0)
+#define KVM_PMU_EVENT_FLAGS_VALID_MASK (KVM_PMU_EVENT_FLAG_MASKED_EVENTS)
+#define KVM_PMU_ENCODE_MASKED_ENTRY(event_select,mask,match,exclude) (((event_select) & 0xFFULL) | (((event_select) & 0XF00ULL) << 24) | (((mask) & 0xFFULL) << 56) | (((match) & 0xFFULL) << 8) | ((__u64) (! ! (exclude)) << 55))
+#define KVM_PMU_MASKED_ENTRY_EVENT_SELECT (GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32))
+#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (GENMASK_ULL(63, 56))
+#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (GENMASK_ULL(15, 8))
+#define KVM_PMU_MASKED_ENTRY_EXCLUDE (BIT_ULL(55))
+#define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT (56)
 #define KVM_VCPU_TSC_CTRL 0
 #define KVM_VCPU_TSC_OFFSET 0
+#define KVM_EXIT_HYPERCALL_LONG_MODE BIT(0)
 #endif
diff --git a/libc/kernel/uapi/asm-x86/asm/prctl.h b/libc/kernel/uapi/asm-x86/asm/prctl.h
index c5ba2d6..e2fe9df 100644
--- a/libc/kernel/uapi/asm-x86/asm/prctl.h
+++ b/libc/kernel/uapi/asm-x86/asm/prctl.h
@@ -29,7 +29,13 @@
 #define ARCH_REQ_XCOMP_PERM 0x1023
 #define ARCH_GET_XCOMP_GUEST_PERM 0x1024
 #define ARCH_REQ_XCOMP_GUEST_PERM 0x1025
+#define ARCH_XCOMP_TILECFG 17
+#define ARCH_XCOMP_TILEDATA 18
 #define ARCH_MAP_VDSO_X32 0x2001
 #define ARCH_MAP_VDSO_32 0x2002
 #define ARCH_MAP_VDSO_64 0x2003
+#define ARCH_GET_UNTAG_MASK 0x4001
+#define ARCH_ENABLE_TAGGED_ADDR 0x4002
+#define ARCH_GET_MAX_TAG_BITS 0x4003
+#define ARCH_FORCE_TAGGED_SVA 0x4004
 #endif
diff --git a/libc/kernel/uapi/asm-x86/asm/processor-flags.h b/libc/kernel/uapi/asm-x86/asm/processor-flags.h
index 0a95afd..759b9e3 100644
--- a/libc/kernel/uapi/asm-x86/asm/processor-flags.h
+++ b/libc/kernel/uapi/asm-x86/asm/processor-flags.h
@@ -83,6 +83,10 @@
 #define X86_CR3_PCD _BITUL(X86_CR3_PCD_BIT)
 #define X86_CR3_PCID_BITS 12
 #define X86_CR3_PCID_MASK (_AC((1UL << X86_CR3_PCID_BITS) - 1, UL))
+#define X86_CR3_LAM_U57_BIT 61
+#define X86_CR3_LAM_U57 _BITULL(X86_CR3_LAM_U57_BIT)
+#define X86_CR3_LAM_U48_BIT 62
+#define X86_CR3_LAM_U48 _BITULL(X86_CR3_LAM_U48_BIT)
 #define X86_CR3_PCID_NOFLUSH_BIT 63
 #define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT)
 #define X86_CR4_VME_BIT 0
@@ -129,6 +133,8 @@
 #define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT)
 #define X86_CR4_CET_BIT 23
 #define X86_CR4_CET _BITUL(X86_CR4_CET_BIT)
+#define X86_CR4_LAM_SUP_BIT 28
+#define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT)
 #define X86_CR8_TPR _AC(0x0000000f, UL)
 #define CX86_PCR0 0x20
 #define CX86_GCR 0xb8
diff --git a/libc/kernel/uapi/drm/amdgpu_drm.h b/libc/kernel/uapi/drm/amdgpu_drm.h
index fcd5ab8..8d0d0b0 100644
--- a/libc/kernel/uapi/drm/amdgpu_drm.h
+++ b/libc/kernel/uapi/drm/amdgpu_drm.h
@@ -428,6 +428,7 @@
 #define AMDGPU_IDS_FLAGS_FUSION 0x1
 #define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
 #define AMDGPU_IDS_FLAGS_TMZ 0x4
+#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x8
 #define AMDGPU_INFO_ACCEL_WORKING 0x00
 #define AMDGPU_INFO_CRTC_FROM_ID 0x01
 #define AMDGPU_INFO_HW_IP_INFO 0x02
@@ -486,6 +487,8 @@
 #define AMDGPU_INFO_SENSOR_VDDGFX 0x7
 #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8
 #define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9
+#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_SCLK 0xa
+#define AMDGPU_INFO_SENSOR_PEAK_PSTATE_GFX_MCLK 0xb
 #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E
 #define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F
 #define AMDGPU_INFO_RAS_ENABLED_FEATURES 0x20
@@ -616,7 +619,7 @@
   __u32 enabled_rb_pipes_mask;
   __u32 num_rb_pipes;
   __u32 num_hw_gfx_contexts;
-  __u32 _pad;
+  __u32 pcie_gen;
   __u64 ids_flags;
   __u64 virtual_address_offset;
   __u64 virtual_address_max;
@@ -643,12 +646,22 @@
   __u32 gs_vgt_table_depth;
   __u32 gs_prim_buffer_depth;
   __u32 max_gs_waves_per_vgt;
-  __u32 _pad1;
+  __u32 pcie_num_lanes;
   __u32 cu_ao_bitmap[4][4];
   __u64 high_va_offset;
   __u64 high_va_max;
   __u32 pa_sc_tile_steering_override;
   __u64 tcc_disabled_mask;
+  __u64 min_engine_clock;
+  __u64 min_memory_clock;
+  __u32 tcp_cache_size;
+  __u32 num_sqc_per_wgp;
+  __u32 sqc_data_cache_size;
+  __u32 sqc_inst_cache_size;
+  __u32 gl1c_cache_size;
+  __u32 gl2c_cache_size;
+  __u64 mall_size;
+  __u32 enabled_rb_pipes_mask_hi;
 };
 struct drm_amdgpu_info_hw_ip {
   __u32 hw_ip_version_major;
diff --git a/libc/kernel/uapi/misc/habanalabs.h b/libc/kernel/uapi/drm/habanalabs_accel.h
similarity index 95%
rename from libc/kernel/uapi/misc/habanalabs.h
rename to libc/kernel/uapi/drm/habanalabs_accel.h
index b25c833..75ec293 100644
--- a/libc/kernel/uapi/misc/habanalabs.h
+++ b/libc/kernel/uapi/drm/habanalabs_accel.h
@@ -619,7 +619,8 @@
   HL_SERVER_GAUDI_HLS1H = 2,
   HL_SERVER_GAUDI_TYPE1 = 3,
   HL_SERVER_GAUDI_TYPE2 = 4,
-  HL_SERVER_GAUDI2_HLS2 = 5
+  HL_SERVER_GAUDI2_HLS2 = 5,
+  HL_SERVER_GAUDI2_TYPE1 = 7
 };
 #define HL_NOTIFIER_EVENT_TPC_ASSERT (1ULL << 0)
 #define HL_NOTIFIER_EVENT_UNDEFINED_OPCODE (1ULL << 1)
@@ -630,6 +631,8 @@
 #define HL_NOTIFIER_EVENT_GENERAL_HW_ERR (1ULL << 6)
 #define HL_NOTIFIER_EVENT_RAZWI (1ULL << 7)
 #define HL_NOTIFIER_EVENT_PAGE_FAULT (1ULL << 8)
+#define HL_NOTIFIER_EVENT_CRITICL_HW_ERR (1ULL << 9)
+#define HL_NOTIFIER_EVENT_CRITICL_FW_ERR (1ULL << 10)
 #define HL_INFO_HW_IP_INFO 0
 #define HL_INFO_HW_EVENTS 1
 #define HL_INFO_DRAM_USAGE 2
@@ -662,6 +665,9 @@
 #define HL_INFO_ENGINE_STATUS 32
 #define HL_INFO_PAGE_FAULT_EVENT 33
 #define HL_INFO_USER_MAPPINGS 34
+#define HL_INFO_FW_GENERIC_REQ 35
+#define HL_INFO_HW_ERR_EVENT 36
+#define HL_INFO_FW_ERR_EVENT 37
 #define HL_INFO_VERSION_MAX_LEN 128
 #define HL_INFO_CARD_NAME_MAX_LEN 16
 #define HL_ENGINES_DATA_MAX_SIZE SZ_1M
@@ -691,15 +697,20 @@
   __u64 dram_page_size;
   __u32 edma_enabled_mask;
   __u16 number_of_user_interrupts;
-  __u16 pad2;
-  __u64 reserved4;
+  __u8 reserved1;
+  __u8 reserved2;
+  __u64 reserved3;
   __u64 device_mem_alloc_default_page_size;
+  __u64 reserved4;
   __u64 reserved5;
-  __u64 reserved6;
-  __u32 reserved7;
-  __u8 reserved8;
+  __u32 reserved6;
+  __u8 reserved7;
   __u8 revision_id;
-  __u8 pad[2];
+  __u16 tpc_interrupt_id;
+  __u32 rotator_enabled_mask;
+  __u32 reserved9;
+  __u64 engine_core_interrupt_reg_addr;
+  __u64 reserved_dram_size;
 };
 struct hl_info_dram_usage {
   __u64 dram_free_mem;
@@ -820,6 +831,21 @@
   __u32 engine_id;
   __u32 stream_id;
 };
+struct hl_info_hw_err_event {
+  __s64 timestamp;
+  __u16 event_id;
+  __u16 pad[3];
+};
+enum hl_info_fw_err_type {
+  HL_INFO_FW_HEARTBEAT_ERR,
+  HL_INFO_FW_REPORTED_ERR,
+};
+struct hl_info_fw_err_event {
+  __s64 timestamp;
+  __u16 err_type;
+  __u16 event_id;
+  __u32 pad;
+};
 struct hl_info_dev_memalloc_page_sizes {
   __u64 page_order_bitmask;
 };
@@ -872,6 +898,7 @@
     __u32 user_buffer_actual_size;
     __u32 sec_attest_nonce;
     __u32 array_size;
+    __u32 fw_sub_opcode;
   };
   __u32 pad;
 };
@@ -935,10 +962,17 @@
 #define HL_CS_FLAGS_RESERVE_SIGNALS_ONLY 0x1000
 #define HL_CS_FLAGS_UNRESERVE_SIGNALS_ONLY 0x2000
 #define HL_CS_FLAGS_ENGINE_CORE_COMMAND 0x4000
+#define HL_CS_FLAGS_FLUSH_PCI_HBW_WRITES 0x8000
+#define HL_CS_FLAGS_ENGINES_COMMAND 0x10000
 #define HL_CS_STATUS_SUCCESS 0
 #define HL_MAX_JOBS_PER_CS 512
-#define HL_ENGINE_CORE_HALT (1 << 0)
-#define HL_ENGINE_CORE_RUN (1 << 1)
+enum hl_engine_command {
+  HL_ENGINE_CORE_HALT = 1,
+  HL_ENGINE_CORE_RUN = 2,
+  HL_ENGINE_STALL = 3,
+  HL_ENGINE_RESUME = 4,
+  HL_ENGINE_COMMAND_MAX
+};
 struct hl_cs_in {
   union {
     struct {
@@ -950,6 +984,11 @@
       __u32 num_engine_cores;
       __u32 core_command;
     };
+    struct {
+      __u64 engines;
+      __u32 num_engines;
+      __u32 engine_command;
+    };
   };
   union {
     __u64 seq;
@@ -1072,8 +1111,9 @@
       __u64 device_virt_addr;
     } unmap;
     struct {
-      __u64 handle;
+      __u64 addr;
       __u64 mem_size;
+      __u64 offset;
     } export_dmabuf_fd;
   };
   __u32 op;
diff --git a/libc/kernel/uapi/drm/i810_drm.h b/libc/kernel/uapi/drm/i810_drm.h
deleted file mode 100644
index e33387d..0000000
--- a/libc/kernel/uapi/drm/i810_drm.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _I810_DRM_H_
-#define _I810_DRM_H_
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef _I810_DEFINES_
-#define _I810_DEFINES_
-#define I810_DMA_BUF_ORDER 12
-#define I810_DMA_BUF_SZ (1 << I810_DMA_BUF_ORDER)
-#define I810_DMA_BUF_NR 256
-#define I810_NR_SAREA_CLIPRECTS 8
-#define I810_NR_TEX_REGIONS 64
-#define I810_LOG_MIN_TEX_REGION_SIZE 16
-#endif
-#define I810_UPLOAD_TEX0IMAGE 0x1
-#define I810_UPLOAD_TEX1IMAGE 0x2
-#define I810_UPLOAD_CTX 0x4
-#define I810_UPLOAD_BUFFERS 0x8
-#define I810_UPLOAD_TEX0 0x10
-#define I810_UPLOAD_TEX1 0x20
-#define I810_UPLOAD_CLIPRECTS 0x40
-#define I810_DESTREG_DI0 0
-#define I810_DESTREG_DI1 1
-#define I810_DESTREG_DV0 2
-#define I810_DESTREG_DV1 3
-#define I810_DESTREG_DR0 4
-#define I810_DESTREG_DR1 5
-#define I810_DESTREG_DR2 6
-#define I810_DESTREG_DR3 7
-#define I810_DESTREG_DR4 8
-#define I810_DEST_SETUP_SIZE 10
-#define I810_CTXREG_CF0 0
-#define I810_CTXREG_CF1 1
-#define I810_CTXREG_ST0 2
-#define I810_CTXREG_ST1 3
-#define I810_CTXREG_VF 4
-#define I810_CTXREG_MT 5
-#define I810_CTXREG_MC0 6
-#define I810_CTXREG_MC1 7
-#define I810_CTXREG_MC2 8
-#define I810_CTXREG_MA0 9
-#define I810_CTXREG_MA1 10
-#define I810_CTXREG_MA2 11
-#define I810_CTXREG_SDM 12
-#define I810_CTXREG_FOG 13
-#define I810_CTXREG_B1 14
-#define I810_CTXREG_B2 15
-#define I810_CTXREG_LCS 16
-#define I810_CTXREG_PV 17
-#define I810_CTXREG_ZA 18
-#define I810_CTXREG_AA 19
-#define I810_CTX_SETUP_SIZE 20
-#define I810_TEXREG_MI0 0
-#define I810_TEXREG_MI1 1
-#define I810_TEXREG_MI2 2
-#define I810_TEXREG_MI3 3
-#define I810_TEXREG_MF 4
-#define I810_TEXREG_MLC 5
-#define I810_TEXREG_MLL 6
-#define I810_TEXREG_MCS 7
-#define I810_TEX_SETUP_SIZE 8
-#define I810_FRONT 0x1
-#define I810_BACK 0x2
-#define I810_DEPTH 0x4
-typedef enum _drm_i810_init_func {
-  I810_INIT_DMA = 0x01,
-  I810_CLEANUP_DMA = 0x02,
-  I810_INIT_DMA_1_4 = 0x03
-} drm_i810_init_func_t;
-typedef struct _drm_i810_init {
-  drm_i810_init_func_t func;
-  unsigned int mmio_offset;
-  unsigned int buffers_offset;
-  int sarea_priv_offset;
-  unsigned int ring_start;
-  unsigned int ring_end;
-  unsigned int ring_size;
-  unsigned int front_offset;
-  unsigned int back_offset;
-  unsigned int depth_offset;
-  unsigned int overlay_offset;
-  unsigned int overlay_physical;
-  unsigned int w;
-  unsigned int h;
-  unsigned int pitch;
-  unsigned int pitch_bits;
-} drm_i810_init_t;
-typedef struct _drm_i810_pre12_init {
-  drm_i810_init_func_t func;
-  unsigned int mmio_offset;
-  unsigned int buffers_offset;
-  int sarea_priv_offset;
-  unsigned int ring_start;
-  unsigned int ring_end;
-  unsigned int ring_size;
-  unsigned int front_offset;
-  unsigned int back_offset;
-  unsigned int depth_offset;
-  unsigned int w;
-  unsigned int h;
-  unsigned int pitch;
-  unsigned int pitch_bits;
-} drm_i810_pre12_init_t;
-typedef struct _drm_i810_tex_region {
-  unsigned char next, prev;
-  unsigned char in_use;
-  int age;
-} drm_i810_tex_region_t;
-typedef struct _drm_i810_sarea {
-  unsigned int ContextState[I810_CTX_SETUP_SIZE];
-  unsigned int BufferState[I810_DEST_SETUP_SIZE];
-  unsigned int TexState[2][I810_TEX_SETUP_SIZE];
-  unsigned int dirty;
-  unsigned int nbox;
-  struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];
-  drm_i810_tex_region_t texList[I810_NR_TEX_REGIONS + 1];
-  int texAge;
-  int last_enqueue;
-  int last_dispatch;
-  int last_quiescent;
-  int ctxOwner;
-  int vertex_prim;
-  int pf_enabled;
-  int pf_active;
-  int pf_current_page;
-} drm_i810_sarea_t;
-#define DRM_I810_INIT 0x00
-#define DRM_I810_VERTEX 0x01
-#define DRM_I810_CLEAR 0x02
-#define DRM_I810_FLUSH 0x03
-#define DRM_I810_GETAGE 0x04
-#define DRM_I810_GETBUF 0x05
-#define DRM_I810_SWAP 0x06
-#define DRM_I810_COPY 0x07
-#define DRM_I810_DOCOPY 0x08
-#define DRM_I810_OV0INFO 0x09
-#define DRM_I810_FSTATUS 0x0a
-#define DRM_I810_OV0FLIP 0x0b
-#define DRM_I810_MC 0x0c
-#define DRM_I810_RSTATUS 0x0d
-#define DRM_I810_FLIP 0x0e
-#define DRM_IOCTL_I810_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t)
-#define DRM_IOCTL_I810_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t)
-#define DRM_IOCTL_I810_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t)
-#define DRM_IOCTL_I810_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLUSH)
-#define DRM_IOCTL_I810_GETAGE DRM_IO(DRM_COMMAND_BASE + DRM_I810_GETAGE)
-#define DRM_IOCTL_I810_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t)
-#define DRM_IOCTL_I810_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_I810_SWAP)
-#define DRM_IOCTL_I810_COPY DRM_IOW(DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t)
-#define DRM_IOCTL_I810_DOCOPY DRM_IO(DRM_COMMAND_BASE + DRM_I810_DOCOPY)
-#define DRM_IOCTL_I810_OV0INFO DRM_IOR(DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t)
-#define DRM_IOCTL_I810_FSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_FSTATUS)
-#define DRM_IOCTL_I810_OV0FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_OV0FLIP)
-#define DRM_IOCTL_I810_MC DRM_IOW(DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t)
-#define DRM_IOCTL_I810_RSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_RSTATUS)
-#define DRM_IOCTL_I810_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLIP)
-typedef struct _drm_i810_clear {
-  int clear_color;
-  int clear_depth;
-  int flags;
-} drm_i810_clear_t;
-typedef struct _drm_i810_vertex {
-  int idx;
-  int used;
-  int discard;
-} drm_i810_vertex_t;
-typedef struct _drm_i810_copy_t {
-  int idx;
-  int used;
-  void * address;
-} drm_i810_copy_t;
-#define PR_TRIANGLES (0x0 << 18)
-#define PR_TRISTRIP_0 (0x1 << 18)
-#define PR_TRISTRIP_1 (0x2 << 18)
-#define PR_TRIFAN (0x3 << 18)
-#define PR_POLYGON (0x4 << 18)
-#define PR_LINES (0x5 << 18)
-#define PR_LINESTRIP (0x6 << 18)
-#define PR_RECTS (0x7 << 18)
-#define PR_MASK (0x7 << 18)
-typedef struct drm_i810_dma {
-  void * __linux_virtual;
-  int request_idx;
-  int request_size;
-  int granted;
-} drm_i810_dma_t;
-typedef struct _drm_i810_overlay_t {
-  unsigned int offset;
-  unsigned int physical;
-} drm_i810_overlay_t;
-typedef struct _drm_i810_mc {
-  int idx;
-  int used;
-  int num_blocks;
-  int * length;
-  unsigned int last_render;
-} drm_i810_mc_t;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/drm/i915_drm.h b/libc/kernel/uapi/drm/i915_drm.h
index 794e784..afaa52f 100644
--- a/libc/kernel/uapi/drm/i915_drm.h
+++ b/libc/kernel/uapi/drm/i915_drm.h
@@ -797,7 +797,7 @@
 #define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0
 #define I915_CONTEXT_ENGINES_EXT_BOND 1
 #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2
-  struct i915_engine_class_instance engines[0];
+  struct i915_engine_class_instance engines[];
 } __attribute__((packed));
 #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__,N__) struct { __u64 extensions; struct i915_engine_class_instance engines[N__]; \
 } __attribute__((packed)) name__
@@ -849,6 +849,8 @@
   I915_OA_FORMAT_A32u40_A4u32_B8_C8,
   I915_OAR_FORMAT_A32u40_A4u32_B8_C8,
   I915_OA_FORMAT_A24u40_A14u32_B8_C8,
+  I915_OAM_FORMAT_MPEC8u64_B8_C8,
+  I915_OAM_FORMAT_MPEC8u32_B8_C8,
   I915_OA_FORMAT_MAX
 };
 enum drm_i915_perf_property_id {
@@ -860,6 +862,8 @@
   DRM_I915_PERF_PROP_HOLD_PREEMPTION,
   DRM_I915_PERF_PROP_GLOBAL_SSEU,
   DRM_I915_PERF_PROP_POLL_OA_PERIOD,
+  DRM_I915_PERF_PROP_OA_ENGINE_CLASS,
+  DRM_I915_PERF_PROP_OA_ENGINE_INSTANCE,
   DRM_I915_PERF_PROP_MAX
 };
 struct drm_i915_perf_open_param {
diff --git a/libc/kernel/uapi/drm/ivpu_accel.h b/libc/kernel/uapi/drm/ivpu_accel.h
new file mode 100644
index 0000000..e148a5b
--- /dev/null
+++ b/libc/kernel/uapi/drm/ivpu_accel.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __UAPI_IVPU_DRM_H__
+#define __UAPI_IVPU_DRM_H__
+#include "drm.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define DRM_IVPU_DRIVER_MAJOR 1
+#define DRM_IVPU_DRIVER_MINOR 0
+#define DRM_IVPU_GET_PARAM 0x00
+#define DRM_IVPU_SET_PARAM 0x01
+#define DRM_IVPU_BO_CREATE 0x02
+#define DRM_IVPU_BO_INFO 0x03
+#define DRM_IVPU_SUBMIT 0x05
+#define DRM_IVPU_BO_WAIT 0x06
+#define DRM_IOCTL_IVPU_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_GET_PARAM, struct drm_ivpu_param)
+#define DRM_IOCTL_IVPU_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SET_PARAM, struct drm_ivpu_param)
+#define DRM_IOCTL_IVPU_BO_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_CREATE, struct drm_ivpu_bo_create)
+#define DRM_IOCTL_IVPU_BO_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_INFO, struct drm_ivpu_bo_info)
+#define DRM_IOCTL_IVPU_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_IVPU_SUBMIT, struct drm_ivpu_submit)
+#define DRM_IOCTL_IVPU_BO_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_IVPU_BO_WAIT, struct drm_ivpu_bo_wait)
+#define DRM_IVPU_PARAM_DEVICE_ID 0
+#define DRM_IVPU_PARAM_DEVICE_REVISION 1
+#define DRM_IVPU_PARAM_PLATFORM_TYPE 2
+#define DRM_IVPU_PARAM_CORE_CLOCK_RATE 3
+#define DRM_IVPU_PARAM_NUM_CONTEXTS 4
+#define DRM_IVPU_PARAM_CONTEXT_BASE_ADDRESS 5
+#define DRM_IVPU_PARAM_CONTEXT_PRIORITY 6
+#define DRM_IVPU_PARAM_CONTEXT_ID 7
+#define DRM_IVPU_PARAM_FW_API_VERSION 8
+#define DRM_IVPU_PARAM_ENGINE_HEARTBEAT 9
+#define DRM_IVPU_PARAM_UNIQUE_INFERENCE_ID 10
+#define DRM_IVPU_PARAM_TILE_CONFIG 11
+#define DRM_IVPU_PARAM_SKU 12
+#define DRM_IVPU_PLATFORM_TYPE_SILICON 0
+#define DRM_IVPU_CONTEXT_PRIORITY_IDLE 0
+#define DRM_IVPU_CONTEXT_PRIORITY_NORMAL 1
+#define DRM_IVPU_CONTEXT_PRIORITY_FOCUS 2
+#define DRM_IVPU_CONTEXT_PRIORITY_REALTIME 3
+struct drm_ivpu_param {
+  __u32 param;
+  __u32 index;
+  __u64 value;
+};
+#define DRM_IVPU_BO_HIGH_MEM 0x00000001
+#define DRM_IVPU_BO_MAPPABLE 0x00000002
+#define DRM_IVPU_BO_CACHED 0x00000000
+#define DRM_IVPU_BO_UNCACHED 0x00010000
+#define DRM_IVPU_BO_WC 0x00020000
+#define DRM_IVPU_BO_CACHE_MASK 0x00030000
+#define DRM_IVPU_BO_FLAGS (DRM_IVPU_BO_HIGH_MEM | DRM_IVPU_BO_MAPPABLE | DRM_IVPU_BO_CACHE_MASK)
+struct drm_ivpu_bo_create {
+  __u64 size;
+  __u32 flags;
+  __u32 handle;
+  __u64 vpu_addr;
+};
+struct drm_ivpu_bo_info {
+  __u32 handle;
+  __u32 flags;
+  __u64 vpu_addr;
+  __u64 mmap_offset;
+  __u64 size;
+};
+#define DRM_IVPU_ENGINE_COMPUTE 0
+#define DRM_IVPU_ENGINE_COPY 1
+struct drm_ivpu_submit {
+  __u64 buffers_ptr;
+  __u32 buffer_count;
+  __u32 engine;
+  __u32 flags;
+  __u32 commands_offset;
+};
+#define DRM_IVPU_JOB_STATUS_SUCCESS 0
+struct drm_ivpu_bo_wait {
+  __u32 handle;
+  __u32 flags;
+  __s64 timeout_ns;
+  __u32 job_status;
+  __u32 pad;
+};
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/libc/kernel/uapi/drm/mga_drm.h b/libc/kernel/uapi/drm/mga_drm.h
deleted file mode 100644
index eb55fa7..0000000
--- a/libc/kernel/uapi/drm/mga_drm.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef __MGA_DRM_H__
-#define __MGA_DRM_H__
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef __MGA_SAREA_DEFINES__
-#define __MGA_SAREA_DEFINES__
-#define MGA_F 0x1
-#define MGA_A 0x2
-#define MGA_S 0x4
-#define MGA_T2 0x8
-#define MGA_WARP_TGZ 0
-#define MGA_WARP_TGZF (MGA_F)
-#define MGA_WARP_TGZA (MGA_A)
-#define MGA_WARP_TGZAF (MGA_F | MGA_A)
-#define MGA_WARP_TGZS (MGA_S)
-#define MGA_WARP_TGZSF (MGA_S | MGA_F)
-#define MGA_WARP_TGZSA (MGA_S | MGA_A)
-#define MGA_WARP_TGZSAF (MGA_S | MGA_F | MGA_A)
-#define MGA_WARP_T2GZ (MGA_T2)
-#define MGA_WARP_T2GZF (MGA_T2 | MGA_F)
-#define MGA_WARP_T2GZA (MGA_T2 | MGA_A)
-#define MGA_WARP_T2GZAF (MGA_T2 | MGA_A | MGA_F)
-#define MGA_WARP_T2GZS (MGA_T2 | MGA_S)
-#define MGA_WARP_T2GZSF (MGA_T2 | MGA_S | MGA_F)
-#define MGA_WARP_T2GZSA (MGA_T2 | MGA_S | MGA_A)
-#define MGA_WARP_T2GZSAF (MGA_T2 | MGA_S | MGA_F | MGA_A)
-#define MGA_MAX_G200_PIPES 8
-#define MGA_MAX_G400_PIPES 16
-#define MGA_MAX_WARP_PIPES MGA_MAX_G400_PIPES
-#define MGA_WARP_UCODE_SIZE 32768
-#define MGA_CARD_TYPE_G200 1
-#define MGA_CARD_TYPE_G400 2
-#define MGA_CARD_TYPE_G450 3
-#define MGA_CARD_TYPE_G550 4
-#define MGA_FRONT 0x1
-#define MGA_BACK 0x2
-#define MGA_DEPTH 0x4
-#define MGA_UPLOAD_CONTEXT 0x1
-#define MGA_UPLOAD_TEX0 0x2
-#define MGA_UPLOAD_TEX1 0x4
-#define MGA_UPLOAD_PIPE 0x8
-#define MGA_UPLOAD_TEX0IMAGE 0x10
-#define MGA_UPLOAD_TEX1IMAGE 0x20
-#define MGA_UPLOAD_2D 0x40
-#define MGA_WAIT_AGE 0x80
-#define MGA_UPLOAD_CLIPRECTS 0x100
-#define MGA_BUFFER_SIZE (1 << 16)
-#define MGA_NUM_BUFFERS 128
-#define MGA_NR_SAREA_CLIPRECTS 8
-#define MGA_CARD_HEAP 0
-#define MGA_AGP_HEAP 1
-#define MGA_NR_TEX_HEAPS 2
-#define MGA_NR_TEX_REGIONS 16
-#define MGA_LOG_MIN_TEX_REGION_SIZE 16
-#define DRM_MGA_IDLE_RETRY 2048
-#endif
-typedef struct {
-  unsigned int dstorg;
-  unsigned int maccess;
-  unsigned int plnwt;
-  unsigned int dwgctl;
-  unsigned int alphactrl;
-  unsigned int fogcolor;
-  unsigned int wflag;
-  unsigned int tdualstage0;
-  unsigned int tdualstage1;
-  unsigned int fcol;
-  unsigned int stencil;
-  unsigned int stencilctl;
-} drm_mga_context_regs_t;
-typedef struct {
-  unsigned int pitch;
-} drm_mga_server_regs_t;
-typedef struct {
-  unsigned int texctl;
-  unsigned int texctl2;
-  unsigned int texfilter;
-  unsigned int texbordercol;
-  unsigned int texorg;
-  unsigned int texwidth;
-  unsigned int texheight;
-  unsigned int texorg1;
-  unsigned int texorg2;
-  unsigned int texorg3;
-  unsigned int texorg4;
-} drm_mga_texture_regs_t;
-typedef struct {
-  unsigned int head;
-  unsigned int wrap;
-} drm_mga_age_t;
-typedef struct _drm_mga_sarea {
-  drm_mga_context_regs_t context_state;
-  drm_mga_server_regs_t server_state;
-  drm_mga_texture_regs_t tex_state[2];
-  unsigned int warp_pipe;
-  unsigned int dirty;
-  unsigned int vertsize;
-  struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS];
-  unsigned int nbox;
-  unsigned int req_drawable;
-  unsigned int req_draw_buffer;
-  unsigned int exported_drawable;
-  unsigned int exported_index;
-  unsigned int exported_stamp;
-  unsigned int exported_buffers;
-  unsigned int exported_nfront;
-  unsigned int exported_nback;
-  int exported_back_x, exported_front_x, exported_w;
-  int exported_back_y, exported_front_y, exported_h;
-  struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS];
-  unsigned int status[4];
-  unsigned int last_wrap;
-  drm_mga_age_t last_frame;
-  unsigned int last_enqueue;
-  unsigned int last_dispatch;
-  unsigned int last_quiescent;
-  struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1];
-  unsigned int texAge[MGA_NR_TEX_HEAPS];
-  int ctxOwner;
-} drm_mga_sarea_t;
-#define DRM_MGA_INIT 0x00
-#define DRM_MGA_FLUSH 0x01
-#define DRM_MGA_RESET 0x02
-#define DRM_MGA_SWAP 0x03
-#define DRM_MGA_CLEAR 0x04
-#define DRM_MGA_VERTEX 0x05
-#define DRM_MGA_INDICES 0x06
-#define DRM_MGA_ILOAD 0x07
-#define DRM_MGA_BLIT 0x08
-#define DRM_MGA_GETPARAM 0x09
-#define DRM_MGA_SET_FENCE 0x0a
-#define DRM_MGA_WAIT_FENCE 0x0b
-#define DRM_MGA_DMA_BOOTSTRAP 0x0c
-#define DRM_IOCTL_MGA_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t)
-#define DRM_IOCTL_MGA_FLUSH DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock)
-#define DRM_IOCTL_MGA_RESET DRM_IO(DRM_COMMAND_BASE + DRM_MGA_RESET)
-#define DRM_IOCTL_MGA_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_MGA_SWAP)
-#define DRM_IOCTL_MGA_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t)
-#define DRM_IOCTL_MGA_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_VERTEX, drm_mga_vertex_t)
-#define DRM_IOCTL_MGA_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_INDICES, drm_mga_indices_t)
-#define DRM_IOCTL_MGA_ILOAD DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t)
-#define DRM_IOCTL_MGA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t)
-#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t)
-#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32)
-#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32)
-#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t)
-typedef struct _drm_mga_warp_index {
-  int installed;
-  unsigned long phys_addr;
-  int size;
-} drm_mga_warp_index_t;
-typedef struct drm_mga_init {
-  enum {
-    MGA_INIT_DMA = 0x01,
-    MGA_CLEANUP_DMA = 0x02
-  } func;
-  unsigned long sarea_priv_offset;
-  __struct_group(, always32bit,, int chipset;
-  int sgram;
-  unsigned int maccess;
-  unsigned int fb_cpp;
-  unsigned int front_offset, front_pitch;
-  unsigned int back_offset, back_pitch;
-  unsigned int depth_cpp;
-  unsigned int depth_offset, depth_pitch;
-  unsigned int texture_offset[MGA_NR_TEX_HEAPS];
-  unsigned int texture_size[MGA_NR_TEX_HEAPS];
- );
-  unsigned long fb_offset;
-  unsigned long mmio_offset;
-  unsigned long status_offset;
-  unsigned long warp_offset;
-  unsigned long primary_offset;
-  unsigned long buffers_offset;
-} drm_mga_init_t;
-typedef struct drm_mga_dma_bootstrap {
-  unsigned long texture_handle;
-  __u32 texture_size;
-  __u32 primary_size;
-  __u32 secondary_bin_count;
-  __u32 secondary_bin_size;
-  __u32 agp_mode;
-  __u8 agp_size;
-} drm_mga_dma_bootstrap_t;
-typedef struct drm_mga_clear {
-  unsigned int flags;
-  unsigned int clear_color;
-  unsigned int clear_depth;
-  unsigned int color_mask;
-  unsigned int depth_mask;
-} drm_mga_clear_t;
-typedef struct drm_mga_vertex {
-  int idx;
-  int used;
-  int discard;
-} drm_mga_vertex_t;
-typedef struct drm_mga_indices {
-  int idx;
-  unsigned int start;
-  unsigned int end;
-  int discard;
-} drm_mga_indices_t;
-typedef struct drm_mga_iload {
-  int idx;
-  unsigned int dstorg;
-  unsigned int length;
-} drm_mga_iload_t;
-typedef struct _drm_mga_blit {
-  unsigned int planemask;
-  unsigned int srcorg;
-  unsigned int dstorg;
-  int src_pitch, dst_pitch;
-  int delta_sx, delta_sy;
-  int delta_dx, delta_dy;
-  int height, ydir;
-  int source_pitch, dest_pitch;
-} drm_mga_blit_t;
-#define MGA_PARAM_IRQ_NR 1
-#define MGA_PARAM_CARD_TYPE 2
-typedef struct drm_mga_getparam {
-  int param;
-  void  * value;
-} drm_mga_getparam_t;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/drm/msm_drm.h b/libc/kernel/uapi/drm/msm_drm.h
index ad3a971..317796d 100644
--- a/libc/kernel/uapi/drm/msm_drm.h
+++ b/libc/kernel/uapi/drm/msm_drm.h
@@ -85,7 +85,8 @@
 #define MSM_PREP_READ 0x01
 #define MSM_PREP_WRITE 0x02
 #define MSM_PREP_NOSYNC 0x04
-#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC)
+#define MSM_PREP_BOOST 0x08
+#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC | MSM_PREP_BOOST | 0)
 struct drm_msm_gem_cpu_prep {
   __u32 handle;
   __u32 op;
@@ -96,7 +97,11 @@
 };
 struct drm_msm_gem_submit_reloc {
   __u32 submit_offset;
+#ifdef __cplusplus
+  __u32 _or;
+#else
   __u32 or;
+#endif
   __s32 shift;
   __u32 reloc_idx;
   __u64 reloc_offset;
@@ -116,7 +121,8 @@
 #define MSM_SUBMIT_BO_READ 0x0001
 #define MSM_SUBMIT_BO_WRITE 0x0002
 #define MSM_SUBMIT_BO_DUMP 0x0004
-#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP)
+#define MSM_SUBMIT_BO_NO_IMPLICIT 0x0008
+#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP | MSM_SUBMIT_BO_NO_IMPLICIT)
 struct drm_msm_gem_submit_bo {
   __u32 flags;
   __u32 handle;
@@ -153,9 +159,11 @@
   __u32 syncobj_stride;
   __u32 pad;
 };
+#define MSM_WAIT_FENCE_BOOST 0x00000001
+#define MSM_WAIT_FENCE_FLAGS (MSM_WAIT_FENCE_BOOST | 0)
 struct drm_msm_wait_fence {
   __u32 fence;
-  __u32 pad;
+  __u32 flags;
   struct drm_msm_timespec timeout;
   __u32 queueid;
 };
diff --git a/libc/kernel/uapi/drm/qaic_accel.h b/libc/kernel/uapi/drm/qaic_accel.h
new file mode 100644
index 0000000..d2a43cf
--- /dev/null
+++ b/libc/kernel/uapi/drm/qaic_accel.h
@@ -0,0 +1,204 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef QAIC_ACCEL_H_
+#define QAIC_ACCEL_H_
+#include "drm.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define QAIC_MANAGE_MAX_MSG_LENGTH SZ_4K
+#define QAIC_SEM_INSYNCFENCE 2
+#define QAIC_SEM_OUTSYNCFENCE 1
+#define QAIC_SEM_NOP 0
+#define QAIC_SEM_INIT 1
+#define QAIC_SEM_INC 2
+#define QAIC_SEM_DEC 3
+#define QAIC_SEM_WAIT_EQUAL 4
+#define QAIC_SEM_WAIT_GT_EQ 5
+#define QAIC_SEM_WAIT_GT_0 6
+#define QAIC_TRANS_UNDEFINED 0
+#define QAIC_TRANS_PASSTHROUGH_FROM_USR 1
+#define QAIC_TRANS_PASSTHROUGH_TO_USR 2
+#define QAIC_TRANS_PASSTHROUGH_FROM_DEV 3
+#define QAIC_TRANS_PASSTHROUGH_TO_DEV 4
+#define QAIC_TRANS_DMA_XFER_FROM_USR 5
+#define QAIC_TRANS_DMA_XFER_TO_DEV 6
+#define QAIC_TRANS_ACTIVATE_FROM_USR 7
+#define QAIC_TRANS_ACTIVATE_FROM_DEV 8
+#define QAIC_TRANS_ACTIVATE_TO_DEV 9
+#define QAIC_TRANS_DEACTIVATE_FROM_USR 10
+#define QAIC_TRANS_DEACTIVATE_FROM_DEV 11
+#define QAIC_TRANS_STATUS_FROM_USR 12
+#define QAIC_TRANS_STATUS_TO_USR 13
+#define QAIC_TRANS_STATUS_FROM_DEV 14
+#define QAIC_TRANS_STATUS_TO_DEV 15
+#define QAIC_TRANS_TERMINATE_FROM_DEV 16
+#define QAIC_TRANS_TERMINATE_TO_DEV 17
+#define QAIC_TRANS_DMA_XFER_CONT 18
+#define QAIC_TRANS_VALIDATE_PARTITION_FROM_DEV 19
+#define QAIC_TRANS_VALIDATE_PARTITION_TO_DEV 20
+struct qaic_manage_trans_hdr {
+  __u32 type;
+  __u32 len;
+};
+struct qaic_manage_trans_passthrough {
+  struct qaic_manage_trans_hdr hdr;
+  __u8 data[];
+};
+struct qaic_manage_trans_dma_xfer {
+  struct qaic_manage_trans_hdr hdr;
+  __u32 tag;
+  __u32 pad;
+  __u64 addr;
+  __u64 size;
+};
+struct qaic_manage_trans_activate_to_dev {
+  struct qaic_manage_trans_hdr hdr;
+  __u32 queue_size;
+  __u32 eventfd;
+  __u32 options;
+  __u32 pad;
+};
+struct qaic_manage_trans_activate_from_dev {
+  struct qaic_manage_trans_hdr hdr;
+  __u32 status;
+  __u32 dbc_id;
+  __u64 options;
+};
+struct qaic_manage_trans_deactivate {
+  struct qaic_manage_trans_hdr hdr;
+  __u32 dbc_id;
+  __u32 pad;
+};
+struct qaic_manage_trans_status_to_dev {
+  struct qaic_manage_trans_hdr hdr;
+};
+struct qaic_manage_trans_status_from_dev {
+  struct qaic_manage_trans_hdr hdr;
+  __u16 major;
+  __u16 minor;
+  __u32 status;
+  __u64 status_flags;
+};
+struct qaic_manage_msg {
+  __u32 len;
+  __u32 count;
+  __u64 data;
+};
+struct qaic_create_bo {
+  __u64 size;
+  __u32 handle;
+  __u32 pad;
+};
+struct qaic_mmap_bo {
+  __u32 handle;
+  __u32 pad;
+  __u64 offset;
+};
+struct qaic_sem {
+  __u16 val;
+  __u8 index;
+  __u8 presync;
+  __u8 cmd;
+  __u8 flags;
+  __u16 pad;
+};
+struct qaic_attach_slice_entry {
+  __u64 size;
+  struct qaic_sem sem0;
+  struct qaic_sem sem1;
+  struct qaic_sem sem2;
+  struct qaic_sem sem3;
+  __u64 dev_addr;
+  __u64 db_addr;
+  __u32 db_data;
+  __u32 db_len;
+  __u64 offset;
+};
+struct qaic_attach_slice_hdr {
+  __u32 count;
+  __u32 dbc_id;
+  __u32 handle;
+  __u32 dir;
+  __u64 size;
+};
+struct qaic_attach_slice {
+  struct qaic_attach_slice_hdr hdr;
+  __u64 data;
+};
+struct qaic_execute_entry {
+  __u32 handle;
+  __u32 dir;
+};
+struct qaic_partial_execute_entry {
+  __u32 handle;
+  __u32 dir;
+  __u64 resize;
+};
+struct qaic_execute_hdr {
+  __u32 count;
+  __u32 dbc_id;
+};
+struct qaic_execute {
+  struct qaic_execute_hdr hdr;
+  __u64 data;
+};
+struct qaic_wait {
+  __u32 handle;
+  __u32 timeout;
+  __u32 dbc_id;
+  __u32 pad;
+};
+struct qaic_perf_stats_hdr {
+  __u16 count;
+  __u16 pad;
+  __u32 dbc_id;
+};
+struct qaic_perf_stats {
+  struct qaic_perf_stats_hdr hdr;
+  __u64 data;
+};
+struct qaic_perf_stats_entry {
+  __u32 handle;
+  __u32 queue_level_before;
+  __u32 num_queue_element;
+  __u32 submit_latency_us;
+  __u32 device_latency_us;
+  __u32 pad;
+};
+#define DRM_QAIC_MANAGE 0x00
+#define DRM_QAIC_CREATE_BO 0x01
+#define DRM_QAIC_MMAP_BO 0x02
+#define DRM_QAIC_ATTACH_SLICE_BO 0x03
+#define DRM_QAIC_EXECUTE_BO 0x04
+#define DRM_QAIC_PARTIAL_EXECUTE_BO 0x05
+#define DRM_QAIC_WAIT_BO 0x06
+#define DRM_QAIC_PERF_STATS_BO 0x07
+#define DRM_IOCTL_QAIC_MANAGE DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MANAGE, struct qaic_manage_msg)
+#define DRM_IOCTL_QAIC_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_CREATE_BO, struct qaic_create_bo)
+#define DRM_IOCTL_QAIC_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_MMAP_BO, struct qaic_mmap_bo)
+#define DRM_IOCTL_QAIC_ATTACH_SLICE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_ATTACH_SLICE_BO, struct qaic_attach_slice)
+#define DRM_IOCTL_QAIC_EXECUTE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_EXECUTE_BO, struct qaic_execute)
+#define DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_PARTIAL_EXECUTE_BO, struct qaic_execute)
+#define DRM_IOCTL_QAIC_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_QAIC_WAIT_BO, struct qaic_wait)
+#define DRM_IOCTL_QAIC_PERF_STATS_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_QAIC_PERF_STATS_BO, struct qaic_perf_stats)
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/libc/kernel/uapi/drm/r128_drm.h b/libc/kernel/uapi/drm/r128_drm.h
deleted file mode 100644
index 3e013b1..0000000
--- a/libc/kernel/uapi/drm/r128_drm.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef __R128_DRM_H__
-#define __R128_DRM_H__
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef __R128_SAREA_DEFINES__
-#define __R128_SAREA_DEFINES__
-#define R128_UPLOAD_CONTEXT 0x001
-#define R128_UPLOAD_SETUP 0x002
-#define R128_UPLOAD_TEX0 0x004
-#define R128_UPLOAD_TEX1 0x008
-#define R128_UPLOAD_TEX0IMAGES 0x010
-#define R128_UPLOAD_TEX1IMAGES 0x020
-#define R128_UPLOAD_CORE 0x040
-#define R128_UPLOAD_MASKS 0x080
-#define R128_UPLOAD_WINDOW 0x100
-#define R128_UPLOAD_CLIPRECTS 0x200
-#define R128_REQUIRE_QUIESCENCE 0x400
-#define R128_UPLOAD_ALL 0x7ff
-#define R128_FRONT 0x1
-#define R128_BACK 0x2
-#define R128_DEPTH 0x4
-#define R128_POINTS 0x1
-#define R128_LINES 0x2
-#define R128_LINE_STRIP 0x3
-#define R128_TRIANGLES 0x4
-#define R128_TRIANGLE_FAN 0x5
-#define R128_TRIANGLE_STRIP 0x6
-#define R128_BUFFER_SIZE 16384
-#define R128_INDEX_PRIM_OFFSET 20
-#define R128_HOSTDATA_BLIT_OFFSET 32
-#define R128_NR_SAREA_CLIPRECTS 12
-#define R128_LOCAL_TEX_HEAP 0
-#define R128_AGP_TEX_HEAP 1
-#define R128_NR_TEX_HEAPS 2
-#define R128_NR_TEX_REGIONS 64
-#define R128_LOG_TEX_GRANULARITY 16
-#define R128_NR_CONTEXT_REGS 12
-#define R128_MAX_TEXTURE_LEVELS 11
-#define R128_MAX_TEXTURE_UNITS 2
-#endif
-typedef struct {
-  unsigned int dst_pitch_offset_c;
-  unsigned int dp_gui_master_cntl_c;
-  unsigned int sc_top_left_c;
-  unsigned int sc_bottom_right_c;
-  unsigned int z_offset_c;
-  unsigned int z_pitch_c;
-  unsigned int z_sten_cntl_c;
-  unsigned int tex_cntl_c;
-  unsigned int misc_3d_state_cntl_reg;
-  unsigned int texture_clr_cmp_clr_c;
-  unsigned int texture_clr_cmp_msk_c;
-  unsigned int fog_color_c;
-  unsigned int tex_size_pitch_c;
-  unsigned int constant_color_c;
-  unsigned int pm4_vc_fpu_setup;
-  unsigned int setup_cntl;
-  unsigned int dp_write_mask;
-  unsigned int sten_ref_mask_c;
-  unsigned int plane_3d_mask_c;
-  unsigned int window_xy_offset;
-  unsigned int scale_3d_cntl;
-} drm_r128_context_regs_t;
-typedef struct {
-  unsigned int tex_cntl;
-  unsigned int tex_combine_cntl;
-  unsigned int tex_size_pitch;
-  unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS];
-  unsigned int tex_border_color;
-} drm_r128_texture_regs_t;
-typedef struct drm_r128_sarea {
-  drm_r128_context_regs_t context_state;
-  drm_r128_texture_regs_t tex_state[R128_MAX_TEXTURE_UNITS];
-  unsigned int dirty;
-  unsigned int vertsize;
-  unsigned int vc_format;
-  struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS];
-  unsigned int nbox;
-  unsigned int last_frame;
-  unsigned int last_dispatch;
-  struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1];
-  unsigned int tex_age[R128_NR_TEX_HEAPS];
-  int ctx_owner;
-  int pfAllowPageFlip;
-  int pfCurrentPage;
-} drm_r128_sarea_t;
-#define DRM_R128_INIT 0x00
-#define DRM_R128_CCE_START 0x01
-#define DRM_R128_CCE_STOP 0x02
-#define DRM_R128_CCE_RESET 0x03
-#define DRM_R128_CCE_IDLE 0x04
-#define DRM_R128_RESET 0x06
-#define DRM_R128_SWAP 0x07
-#define DRM_R128_CLEAR 0x08
-#define DRM_R128_VERTEX 0x09
-#define DRM_R128_INDICES 0x0a
-#define DRM_R128_BLIT 0x0b
-#define DRM_R128_DEPTH 0x0c
-#define DRM_R128_STIPPLE 0x0d
-#define DRM_R128_INDIRECT 0x0f
-#define DRM_R128_FULLSCREEN 0x10
-#define DRM_R128_CLEAR2 0x11
-#define DRM_R128_GETPARAM 0x12
-#define DRM_R128_FLIP 0x13
-#define DRM_IOCTL_R128_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_R128_INIT, drm_r128_init_t)
-#define DRM_IOCTL_R128_CCE_START DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_START)
-#define DRM_IOCTL_R128_CCE_STOP DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CCE_STOP, drm_r128_cce_stop_t)
-#define DRM_IOCTL_R128_CCE_RESET DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_RESET)
-#define DRM_IOCTL_R128_CCE_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_IDLE)
-#define DRM_IOCTL_R128_RESET DRM_IO(DRM_COMMAND_BASE + DRM_R128_RESET)
-#define DRM_IOCTL_R128_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_R128_SWAP)
-#define DRM_IOCTL_R128_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CLEAR, drm_r128_clear_t)
-#define DRM_IOCTL_R128_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_R128_VERTEX, drm_r128_vertex_t)
-#define DRM_IOCTL_R128_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_R128_INDICES, drm_r128_indices_t)
-#define DRM_IOCTL_R128_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_R128_BLIT, drm_r128_blit_t)
-#define DRM_IOCTL_R128_DEPTH DRM_IOW(DRM_COMMAND_BASE + DRM_R128_DEPTH, drm_r128_depth_t)
-#define DRM_IOCTL_R128_STIPPLE DRM_IOW(DRM_COMMAND_BASE + DRM_R128_STIPPLE, drm_r128_stipple_t)
-#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_INDIRECT, drm_r128_indirect_t)
-#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW(DRM_COMMAND_BASE + DRM_R128_FULLSCREEN, drm_r128_fullscreen_t)
-#define DRM_IOCTL_R128_CLEAR2 DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CLEAR2, drm_r128_clear2_t)
-#define DRM_IOCTL_R128_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_GETPARAM, drm_r128_getparam_t)
-#define DRM_IOCTL_R128_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_R128_FLIP)
-typedef struct drm_r128_init {
-  enum {
-    R128_INIT_CCE = 0x01,
-    R128_CLEANUP_CCE = 0x02
-  } func;
-  unsigned long sarea_priv_offset;
-  int is_pci;
-  int cce_mode;
-  int cce_secure;
-  int ring_size;
-  int usec_timeout;
-  unsigned int fb_bpp;
-  unsigned int front_offset, front_pitch;
-  unsigned int back_offset, back_pitch;
-  unsigned int depth_bpp;
-  unsigned int depth_offset, depth_pitch;
-  unsigned int span_offset;
-  unsigned long fb_offset;
-  unsigned long mmio_offset;
-  unsigned long ring_offset;
-  unsigned long ring_rptr_offset;
-  unsigned long buffers_offset;
-  unsigned long agp_textures_offset;
-} drm_r128_init_t;
-typedef struct drm_r128_cce_stop {
-  int flush;
-  int idle;
-} drm_r128_cce_stop_t;
-typedef struct drm_r128_clear {
-  unsigned int flags;
-  unsigned int clear_color;
-  unsigned int clear_depth;
-  unsigned int color_mask;
-  unsigned int depth_mask;
-} drm_r128_clear_t;
-typedef struct drm_r128_vertex {
-  int prim;
-  int idx;
-  int count;
-  int discard;
-} drm_r128_vertex_t;
-typedef struct drm_r128_indices {
-  int prim;
-  int idx;
-  int start;
-  int end;
-  int discard;
-} drm_r128_indices_t;
-typedef struct drm_r128_blit {
-  int idx;
-  int pitch;
-  int offset;
-  int format;
-  unsigned short x, y;
-  unsigned short width, height;
-} drm_r128_blit_t;
-typedef struct drm_r128_depth {
-  enum {
-    R128_WRITE_SPAN = 0x01,
-    R128_WRITE_PIXELS = 0x02,
-    R128_READ_SPAN = 0x03,
-    R128_READ_PIXELS = 0x04
-  } func;
-  int n;
-  int  * x;
-  int  * y;
-  unsigned int  * buffer;
-  unsigned char  * mask;
-} drm_r128_depth_t;
-typedef struct drm_r128_stipple {
-  unsigned int  * mask;
-} drm_r128_stipple_t;
-typedef struct drm_r128_indirect {
-  int idx;
-  int start;
-  int end;
-  int discard;
-} drm_r128_indirect_t;
-typedef struct drm_r128_fullscreen {
-  enum {
-    R128_INIT_FULLSCREEN = 0x01,
-    R128_CLEANUP_FULLSCREEN = 0x02
-  } func;
-} drm_r128_fullscreen_t;
-#define R128_PARAM_IRQ_NR 1
-typedef struct drm_r128_getparam {
-  int param;
-  void  * value;
-} drm_r128_getparam_t;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/drm/savage_drm.h b/libc/kernel/uapi/drm/savage_drm.h
deleted file mode 100644
index efc0ae6..0000000
--- a/libc/kernel/uapi/drm/savage_drm.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef __SAVAGE_DRM_H__
-#define __SAVAGE_DRM_H__
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef __SAVAGE_SAREA_DEFINES__
-#define __SAVAGE_SAREA_DEFINES__
-#define SAVAGE_CARD_HEAP 0
-#define SAVAGE_AGP_HEAP 1
-#define SAVAGE_NR_TEX_HEAPS 2
-#define SAVAGE_NR_TEX_REGIONS 16
-#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16
-#endif
-typedef struct _drm_savage_sarea {
-  struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 1];
-  unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
-  int ctxOwner;
-} drm_savage_sarea_t, * drm_savage_sarea_ptr;
-#define DRM_SAVAGE_BCI_INIT 0x00
-#define DRM_SAVAGE_BCI_CMDBUF 0x01
-#define DRM_SAVAGE_BCI_EVENT_EMIT 0x02
-#define DRM_SAVAGE_BCI_EVENT_WAIT 0x03
-#define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t)
-#define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t)
-#define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t)
-#define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t)
-#define SAVAGE_DMA_PCI 1
-#define SAVAGE_DMA_AGP 3
-typedef struct drm_savage_init {
-  enum {
-    SAVAGE_INIT_BCI = 1,
-    SAVAGE_CLEANUP_BCI = 2
-  } func;
-  unsigned int sarea_priv_offset;
-  unsigned int cob_size;
-  unsigned int bci_threshold_lo, bci_threshold_hi;
-  unsigned int dma_type;
-  unsigned int fb_bpp;
-  unsigned int front_offset, front_pitch;
-  unsigned int back_offset, back_pitch;
-  unsigned int depth_bpp;
-  unsigned int depth_offset, depth_pitch;
-  unsigned int texture_offset;
-  unsigned int texture_size;
-  unsigned long status_offset;
-  unsigned long buffers_offset;
-  unsigned long agp_textures_offset;
-  unsigned long cmd_dma_offset;
-} drm_savage_init_t;
-typedef union drm_savage_cmd_header drm_savage_cmd_header_t;
-typedef struct drm_savage_cmdbuf {
-  drm_savage_cmd_header_t  * cmd_addr;
-  unsigned int size;
-  unsigned int dma_idx;
-  int discard;
-  unsigned int  * vb_addr;
-  unsigned int vb_size;
-  unsigned int vb_stride;
-  struct drm_clip_rect  * box_addr;
-  unsigned int nbox;
-} drm_savage_cmdbuf_t;
-#define SAVAGE_WAIT_2D 0x1
-#define SAVAGE_WAIT_3D 0x2
-#define SAVAGE_WAIT_IRQ 0x4
-typedef struct drm_savage_event {
-  unsigned int count;
-  unsigned int flags;
-} drm_savage_event_emit_t, drm_savage_event_wait_t;
-#define SAVAGE_CMD_STATE 0
-#define SAVAGE_CMD_DMA_PRIM 1
-#define SAVAGE_CMD_VB_PRIM 2
-#define SAVAGE_CMD_DMA_IDX 3
-#define SAVAGE_CMD_VB_IDX 4
-#define SAVAGE_CMD_CLEAR 5
-#define SAVAGE_CMD_SWAP 6
-#define SAVAGE_PRIM_TRILIST 0
-#define SAVAGE_PRIM_TRISTRIP 1
-#define SAVAGE_PRIM_TRIFAN 2
-#define SAVAGE_PRIM_TRILIST_201 3
-#define SAVAGE_SKIP_Z 0x01
-#define SAVAGE_SKIP_W 0x02
-#define SAVAGE_SKIP_C0 0x04
-#define SAVAGE_SKIP_C1 0x08
-#define SAVAGE_SKIP_S0 0x10
-#define SAVAGE_SKIP_T0 0x20
-#define SAVAGE_SKIP_ST0 0x30
-#define SAVAGE_SKIP_S1 0x40
-#define SAVAGE_SKIP_T1 0x80
-#define SAVAGE_SKIP_ST1 0xc0
-#define SAVAGE_SKIP_ALL_S3D 0x3f
-#define SAVAGE_SKIP_ALL_S4 0xff
-#define SAVAGE_FRONT 0x1
-#define SAVAGE_BACK 0x2
-#define SAVAGE_DEPTH 0x4
-union drm_savage_cmd_header {
-  struct {
-    unsigned char cmd;
-    unsigned char pad0;
-    unsigned short pad1;
-    unsigned short pad2;
-    unsigned short pad3;
-  } cmd;
-  struct {
-    unsigned char cmd;
-    unsigned char global;
-    unsigned short count;
-    unsigned short start;
-    unsigned short pad3;
-  } state;
-  struct {
-    unsigned char cmd;
-    unsigned char prim;
-    unsigned short skip;
-    unsigned short count;
-    unsigned short start;
-  } prim;
-  struct {
-    unsigned char cmd;
-    unsigned char prim;
-    unsigned short skip;
-    unsigned short count;
-    unsigned short pad3;
-  } idx;
-  struct {
-    unsigned char cmd;
-    unsigned char pad0;
-    unsigned short pad1;
-    unsigned int flags;
-  } clear0;
-  struct {
-    unsigned int mask;
-    unsigned int value;
-  } clear1;
-};
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/drm/sis_drm.h b/libc/kernel/uapi/drm/sis_drm.h
deleted file mode 100644
index 1606a85..0000000
--- a/libc/kernel/uapi/drm/sis_drm.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef __SIS_DRM_H__
-#define __SIS_DRM_H__
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define NOT_USED_0_3
-#define DRM_SIS_FB_ALLOC 0x04
-#define DRM_SIS_FB_FREE 0x05
-#define NOT_USED_6_12
-#define DRM_SIS_AGP_INIT 0x13
-#define DRM_SIS_AGP_ALLOC 0x14
-#define DRM_SIS_AGP_FREE 0x15
-#define DRM_SIS_FB_INIT 0x16
-#define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t)
-#define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_AGP_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t)
-#define DRM_IOCTL_SIS_FB_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t)
-typedef struct {
-  int context;
-  unsigned long offset;
-  unsigned long size;
-  unsigned long free;
-} drm_sis_mem_t;
-typedef struct {
-  unsigned long offset, size;
-} drm_sis_agp_t;
-typedef struct {
-  unsigned long offset, size;
-} drm_sis_fb_t;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/drm/via_drm.h b/libc/kernel/uapi/drm/via_drm.h
deleted file mode 100644
index 95a149b..0000000
--- a/libc/kernel/uapi/drm/via_drm.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _VIA_DRM_H_
-#define _VIA_DRM_H_
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef _VIA_DEFINES_
-#define _VIA_DEFINES_
-#define VIA_NR_SAREA_CLIPRECTS 8
-#define VIA_NR_XVMC_PORTS 10
-#define VIA_NR_XVMC_LOCKS 5
-#define VIA_MAX_CACHELINE_SIZE 64
-#define XVMCLOCKPTR(saPriv,lockNo) ((volatile struct drm_hw_lock *) (((((unsigned long) (saPriv)->XvMCLockArea) + (VIA_MAX_CACHELINE_SIZE - 1)) & ~(VIA_MAX_CACHELINE_SIZE - 1)) + VIA_MAX_CACHELINE_SIZE * (lockNo)))
-#define VIA_NR_TEX_REGIONS 64
-#define VIA_LOG_MIN_TEX_REGION_SIZE 16
-#endif
-#define VIA_UPLOAD_TEX0IMAGE 0x1
-#define VIA_UPLOAD_TEX1IMAGE 0x2
-#define VIA_UPLOAD_CTX 0x4
-#define VIA_UPLOAD_BUFFERS 0x8
-#define VIA_UPLOAD_TEX0 0x10
-#define VIA_UPLOAD_TEX1 0x20
-#define VIA_UPLOAD_CLIPRECTS 0x40
-#define VIA_UPLOAD_ALL 0xff
-#define DRM_VIA_ALLOCMEM 0x00
-#define DRM_VIA_FREEMEM 0x01
-#define DRM_VIA_AGP_INIT 0x02
-#define DRM_VIA_FB_INIT 0x03
-#define DRM_VIA_MAP_INIT 0x04
-#define DRM_VIA_DEC_FUTEX 0x05
-#define NOT_USED
-#define DRM_VIA_DMA_INIT 0x07
-#define DRM_VIA_CMDBUFFER 0x08
-#define DRM_VIA_FLUSH 0x09
-#define DRM_VIA_PCICMD 0x0a
-#define DRM_VIA_CMDBUF_SIZE 0x0b
-#define NOT_USED
-#define DRM_VIA_WAIT_IRQ 0x0d
-#define DRM_VIA_DMA_BLIT 0x0e
-#define DRM_VIA_BLIT_SYNC 0x0f
-#define DRM_IOCTL_VIA_ALLOCMEM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_ALLOCMEM, drm_via_mem_t)
-#define DRM_IOCTL_VIA_FREEMEM DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_FREEMEM, drm_via_mem_t)
-#define DRM_IOCTL_VIA_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_AGP_INIT, drm_via_agp_t)
-#define DRM_IOCTL_VIA_FB_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_FB_INIT, drm_via_fb_t)
-#define DRM_IOCTL_VIA_MAP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_MAP_INIT, drm_via_init_t)
-#define DRM_IOCTL_VIA_DEC_FUTEX DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DEC_FUTEX, drm_via_futex_t)
-#define DRM_IOCTL_VIA_DMA_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_DMA_INIT, drm_via_dma_init_t)
-#define DRM_IOCTL_VIA_CMDBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_CMDBUFFER, drm_via_cmdbuffer_t)
-#define DRM_IOCTL_VIA_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_VIA_FLUSH)
-#define DRM_IOCTL_VIA_PCICMD DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_PCICMD, drm_via_cmdbuffer_t)
-#define DRM_IOCTL_VIA_CMDBUF_SIZE DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_CMDBUF_SIZE, drm_via_cmdbuf_size_t)
-#define DRM_IOCTL_VIA_WAIT_IRQ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_WAIT_IRQ, drm_via_irqwait_t)
-#define DRM_IOCTL_VIA_DMA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DMA_BLIT, drm_via_dmablit_t)
-#define DRM_IOCTL_VIA_BLIT_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_BLIT_SYNC, drm_via_blitsync_t)
-#define VIA_TEX_SETUP_SIZE 8
-#define VIA_FRONT 0x1
-#define VIA_BACK 0x2
-#define VIA_DEPTH 0x4
-#define VIA_STENCIL 0x8
-#define VIA_MEM_VIDEO 0
-#define VIA_MEM_AGP 1
-#define VIA_MEM_SYSTEM 2
-#define VIA_MEM_MIXED 3
-#define VIA_MEM_UNKNOWN 4
-typedef struct {
-  __u32 offset;
-  __u32 size;
-} drm_via_agp_t;
-typedef struct {
-  __u32 offset;
-  __u32 size;
-} drm_via_fb_t;
-typedef struct {
-  __u32 context;
-  __u32 type;
-  __u32 size;
-  unsigned long index;
-  unsigned long offset;
-} drm_via_mem_t;
-typedef struct _drm_via_init {
-  enum {
-    VIA_INIT_MAP = 0x01,
-    VIA_CLEANUP_MAP = 0x02
-  } func;
-  unsigned long sarea_priv_offset;
-  unsigned long fb_offset;
-  unsigned long mmio_offset;
-  unsigned long agpAddr;
-} drm_via_init_t;
-typedef struct _drm_via_futex {
-  enum {
-    VIA_FUTEX_WAIT = 0x00,
-    VIA_FUTEX_WAKE = 0X01
-  } func;
-  __u32 ms;
-  __u32 lock;
-  __u32 val;
-} drm_via_futex_t;
-typedef struct _drm_via_dma_init {
-  enum {
-    VIA_INIT_DMA = 0x01,
-    VIA_CLEANUP_DMA = 0x02,
-    VIA_DMA_INITIALIZED = 0x03
-  } func;
-  unsigned long offset;
-  unsigned long size;
-  unsigned long reg_pause_addr;
-} drm_via_dma_init_t;
-typedef struct _drm_via_cmdbuffer {
-  char  * buf;
-  unsigned long size;
-} drm_via_cmdbuffer_t;
-typedef struct _drm_via_tex_region {
-  unsigned char next, prev;
-  unsigned char inUse;
-  int age;
-} drm_via_tex_region_t;
-typedef struct _drm_via_sarea {
-  unsigned int dirty;
-  unsigned int nbox;
-  struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS];
-  drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1];
-  int texAge;
-  int ctxOwner;
-  int vertexPrim;
-  char XvMCLockArea[VIA_MAX_CACHELINE_SIZE * (VIA_NR_XVMC_LOCKS + 1)];
-  unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS];
-  unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS];
-  unsigned int XvMCCtxNoGrabbed;
-  unsigned int pfCurrentOffset;
-} drm_via_sarea_t;
-typedef struct _drm_via_cmdbuf_size {
-  enum {
-    VIA_CMDBUF_SPACE = 0x01,
-    VIA_CMDBUF_LAG = 0x02
-  } func;
-  int wait;
-  __u32 size;
-} drm_via_cmdbuf_size_t;
-typedef enum {
-  VIA_IRQ_ABSOLUTE = 0x0,
-  VIA_IRQ_RELATIVE = 0x1,
-  VIA_IRQ_SIGNAL = 0x10000000,
-  VIA_IRQ_FORCE_SEQUENCE = 0x20000000
-} via_irq_seq_type_t;
-#define VIA_IRQ_FLAGS_MASK 0xF0000000
-enum drm_via_irqs {
-  drm_via_irq_hqv0 = 0,
-  drm_via_irq_hqv1,
-  drm_via_irq_dma0_dd,
-  drm_via_irq_dma0_td,
-  drm_via_irq_dma1_dd,
-  drm_via_irq_dma1_td,
-  drm_via_irq_num
-};
-struct drm_via_wait_irq_request {
-  unsigned irq;
-  via_irq_seq_type_t type;
-  __u32 sequence;
-  __u32 signal;
-};
-typedef union drm_via_irqwait {
-  struct drm_via_wait_irq_request request;
-  struct drm_wait_vblank_reply reply;
-} drm_via_irqwait_t;
-typedef struct drm_via_blitsync {
-  __u32 sync_handle;
-  unsigned engine;
-} drm_via_blitsync_t;
-typedef struct drm_via_dmablit {
-  __u32 num_lines;
-  __u32 line_length;
-  __u32 fb_addr;
-  __u32 fb_stride;
-  unsigned char * mem_addr;
-  __u32 mem_stride;
-  __u32 flags;
-  int to_fb;
-  drm_via_blitsync_t sync;
-} drm_via_dmablit_t;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libc/kernel/uapi/linux/android/binder.h b/libc/kernel/uapi/linux/android/binder.h
index 52f4c6b..0d1f83d 100644
--- a/libc/kernel/uapi/linux/android/binder.h
+++ b/libc/kernel/uapi/linux/android/binder.h
@@ -221,6 +221,7 @@
   BR_FAILED_REPLY = _IO('r', 17),
   BR_FROZEN_REPLY = _IO('r', 18),
   BR_ONEWAY_SPAM_SUSPECT = _IO('r', 19),
+  BR_TRANSACTION_PENDING_FROZEN = _IO('r', 20),
 };
 enum binder_driver_command_protocol {
   BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data),
diff --git a/libc/kernel/uapi/linux/auxvec.h b/libc/kernel/uapi/linux/auxvec.h
index c80c170..3ca56fc 100644
--- a/libc/kernel/uapi/linux/auxvec.h
+++ b/libc/kernel/uapi/linux/auxvec.h
@@ -41,6 +41,8 @@
 #define AT_BASE_PLATFORM 24
 #define AT_RANDOM 25
 #define AT_HWCAP2 26
+#define AT_RSEQ_FEATURE_SIZE 27
+#define AT_RSEQ_ALIGN 28
 #define AT_EXECFN 31
 #ifndef AT_MINSIGSTKSZ
 #define AT_MINSIGSTKSZ 51
diff --git a/libc/kernel/uapi/linux/batadv_packet.h b/libc/kernel/uapi/linux/batadv_packet.h
index ede53cf..9daed82 100644
--- a/libc/kernel/uapi/linux/batadv_packet.h
+++ b/libc/kernel/uapi/linux/batadv_packet.h
@@ -28,6 +28,7 @@
   BATADV_CODED = 0x02,
   BATADV_ELP = 0x03,
   BATADV_OGM2 = 0x04,
+  BATADV_MCAST = 0x05,
 #define BATADV_UNICAST_MIN 0x40
   BATADV_UNICAST = 0x40,
   BATADV_UNICAST_FRAG = 0x41,
diff --git a/libc/kernel/uapi/linux/bpf.h b/libc/kernel/uapi/linux/bpf.h
index 163dd1e..ff84aea 100644
--- a/libc/kernel/uapi/linux/bpf.h
+++ b/libc/kernel/uapi/linux/bpf.h
@@ -204,6 +204,7 @@
   BPF_PROG_TYPE_LSM,
   BPF_PROG_TYPE_SK_LOOKUP,
   BPF_PROG_TYPE_SYSCALL,
+  BPF_PROG_TYPE_NETFILTER,
 };
 enum bpf_attach_type {
   BPF_CGROUP_INET_INGRESS,
@@ -250,6 +251,8 @@
   BPF_PERF_EVENT,
   BPF_TRACE_KPROBE_MULTI,
   BPF_LSM_CGROUP,
+  BPF_STRUCT_OPS,
+  BPF_NETFILTER,
   __MAX_BPF_ATTACH_TYPE
 };
 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
@@ -264,6 +267,7 @@
   BPF_LINK_TYPE_PERF_EVENT = 7,
   BPF_LINK_TYPE_KPROBE_MULTI = 8,
   BPF_LINK_TYPE_STRUCT_OPS = 9,
+  BPF_LINK_TYPE_NETFILTER = 10,
   MAX_BPF_LINK_TYPE,
 };
 #define BPF_F_ALLOW_OVERRIDE (1U << 0)
@@ -275,6 +279,7 @@
 #define BPF_F_TEST_STATE_FREQ (1U << 3)
 #define BPF_F_SLEEPABLE (1U << 4)
 #define BPF_F_XDP_HAS_FRAGS (1U << 5)
+#define BPF_F_XDP_DEV_BOUND_ONLY (1U << 6)
 #define BPF_F_KPROBE_MULTI_RETURN (1U << 0)
 #define BPF_PSEUDO_MAP_FD 1
 #define BPF_PSEUDO_MAP_IDX 5
@@ -304,6 +309,7 @@
   BPF_F_MMAPABLE = (1U << 10),
   BPF_F_PRESERVE_ELEMS = (1U << 11),
   BPF_F_INNER_MAP = (1U << 12),
+  BPF_F_LINK = (1U << 13),
 };
 #define BPF_F_QUERY_EFFECTIVE (1U << 0)
 #define BPF_F_TEST_RUN_ON_CPU (1U << 0)
@@ -391,6 +397,7 @@
     __aligned_u64 fd_array;
     __aligned_u64 core_relos;
     __u32 core_relo_rec_size;
+    __u32 log_true_size;
   };
   struct {
     __aligned_u64 pathname;
@@ -456,6 +463,7 @@
     __u32 btf_size;
     __u32 btf_log_size;
     __u32 btf_log_level;
+    __u32 btf_log_true_size;
   };
   struct {
     __u32 pid;
@@ -469,7 +477,10 @@
     __u64 probe_addr;
   } task_fd_query;
   struct {
-    __u32 prog_fd;
+    union {
+      __u32 prog_fd;
+      __u32 map_fd;
+    };
     union {
       __u32 target_fd;
       __u32 target_ifindex;
@@ -496,13 +507,25 @@
         __u32 target_btf_id;
         __u64 cookie;
       } tracing;
+      struct {
+        __u32 pf;
+        __u32 hooknum;
+        __s32 priority;
+        __u32 flags;
+      } netfilter;
     };
   } link_create;
   struct {
     __u32 link_fd;
-    __u32 new_prog_fd;
+    union {
+      __u32 new_prog_fd;
+      __u32 new_map_fd;
+    };
     __u32 flags;
-    __u32 old_prog_fd;
+    union {
+      __u32 old_prog_fd;
+      __u32 old_map_fd;
+    };
   } link_update;
   struct {
     __u32 link_fd;
@@ -557,6 +580,7 @@
   BPF_F_ZERO_CSUM_TX = (1ULL << 1),
   BPF_F_DONT_FRAGMENT = (1ULL << 2),
   BPF_F_SEQ_NUMBER = (1ULL << 3),
+  BPF_F_NO_TUNNEL_KEY = (1ULL << 4),
 };
 enum {
   BPF_F_TUNINFO_FLAGS = (1ULL << 4),
@@ -583,6 +607,8 @@
   BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
   BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
   BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
+  BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = (1ULL << 7),
+  BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = (1ULL << 8),
 };
 enum {
   BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff,
@@ -950,6 +976,15 @@
     struct {
       __u32 ifindex;
     } xdp;
+    struct {
+      __u32 map_id;
+    } struct_ops;
+    struct {
+      __u32 pf;
+      __u32 hooknum;
+      __s32 priority;
+      __u32 flags;
+    } netfilter;
   };
 } __attribute__((aligned(8)));
 struct bpf_sock_addr {
@@ -1095,6 +1130,7 @@
 enum {
   BPF_FIB_LOOKUP_DIRECT = (1U << 0),
   BPF_FIB_LOOKUP_OUTPUT = (1U << 1),
+  BPF_FIB_LOOKUP_SKIP_NEIGH = (1U << 2),
 };
 enum {
   BPF_FIB_LKUP_RET_SUCCESS,
@@ -1218,6 +1254,18 @@
   __u64 : 64;
   __u64 : 64;
 } __attribute__((aligned(8)));
+struct bpf_rb_root {
+  __u64 : 64;
+  __u64 : 64;
+} __attribute__((aligned(8)));
+struct bpf_rb_node {
+  __u64 : 64;
+  __u64 : 64;
+  __u64 : 64;
+} __attribute__((aligned(8)));
+struct bpf_refcount {
+  __u32 : 32;
+} __attribute__((aligned(4)));
 struct bpf_sysctl {
   __u32 write;
   __u32 file_pos;
@@ -1283,4 +1331,10 @@
   __u32 access_str_off;
   enum bpf_core_relo_kind kind;
 };
+enum {
+  BPF_F_TIMER_ABS = (1ULL << 0),
+};
+struct bpf_iter_num {
+  __u64 __opaque[1];
+} __attribute__((aligned(8)));
 #endif
diff --git a/libc/kernel/uapi/linux/btrfs.h b/libc/kernel/uapi/linux/btrfs.h
index 0fdac66..9a7a6fa 100644
--- a/libc/kernel/uapi/linux/btrfs.h
+++ b/libc/kernel/uapi/linux/btrfs.h
@@ -107,6 +107,7 @@
   __u64 unverified_errors;
 };
 #define BTRFS_SCRUB_READONLY 1
+#define BTRFS_SCRUB_SUPPORTED_FLAGS (BTRFS_SCRUB_READONLY)
 struct btrfs_ioctl_scrub_args {
   __u64 devid;
   __u64 start;
@@ -157,7 +158,8 @@
   __u8 uuid[BTRFS_UUID_SIZE];
   __u64 bytes_used;
   __u64 total_bytes;
-  __u64 unused[379];
+  __u8 fsid[BTRFS_UUID_SIZE];
+  __u64 unused[377];
   __u8 path[BTRFS_DEVICE_PATH_NAME_MAX];
 };
 #define BTRFS_FS_INFO_FLAG_CSUM_INFO (1 << 0)
diff --git a/libc/kernel/uapi/linux/cm4000_cs.h b/libc/kernel/uapi/linux/cm4000_cs.h
deleted file mode 100644
index 41b7aa7..0000000
--- a/libc/kernel/uapi/linux/cm4000_cs.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _UAPI_CM4000_H_
-#define _UAPI_CM4000_H_
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#define MAX_ATR 33
-#define CM4000_MAX_DEV 4
-typedef struct atreq {
-  __s32 atr_len;
-  unsigned char atr[64];
-  __s32 power_act;
-  unsigned char bIFSD;
-  unsigned char bIFSC;
-} atreq_t;
-typedef struct ptsreq {
-  __u32 protocol;
-  unsigned char flags;
-  unsigned char pts1;
-  unsigned char pts2;
-  unsigned char pts3;
-} ptsreq_t;
-#define CM_IOC_MAGIC 'c'
-#define CM_IOC_MAXNR 255
-#define CM_IOCGSTATUS _IOR(CM_IOC_MAGIC, 0, unsigned char *)
-#define CM_IOCGATR _IOWR(CM_IOC_MAGIC, 1, atreq_t *)
-#define CM_IOCSPTS _IOW(CM_IOC_MAGIC, 2, ptsreq_t *)
-#define CM_IOCSRDR _IO(CM_IOC_MAGIC, 3)
-#define CM_IOCARDOFF _IO(CM_IOC_MAGIC, 4)
-#define CM_IOSDBGLVL _IOW(CM_IOC_MAGIC, 250, int *)
-#define CM_CARD_INSERTED 0x01
-#define CM_CARD_POWERED 0x02
-#define CM_ATR_PRESENT 0x04
-#define CM_ATR_VALID 0x08
-#define CM_STATE_VALID 0x0f
-#define CM_NO_READER 0x10
-#define CM_BAD_CARD 0x20
-#endif
diff --git a/libc/kernel/uapi/linux/const.h b/libc/kernel/uapi/linux/const.h
index c62a702..d83caad 100644
--- a/libc/kernel/uapi/linux/const.h
+++ b/libc/kernel/uapi/linux/const.h
@@ -30,7 +30,7 @@
 #define _ULL(x) (_AC(x, ULL))
 #define _BITUL(x) (_UL(1) << (x))
 #define _BITULL(x) (_ULL(1) << (x))
-#define __ALIGN_KERNEL(x,a) __ALIGN_KERNEL_MASK(x, (typeof(x)) (a) - 1)
+#define __ALIGN_KERNEL(x,a) __ALIGN_KERNEL_MASK(x, (__typeof__(x)) (a) - 1)
 #define __ALIGN_KERNEL_MASK(x,mask) (((x) + (mask)) & ~(mask))
 #define __KERNEL_DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
 #endif
diff --git a/libc/kernel/uapi/linux/cxl_mem.h b/libc/kernel/uapi/linux/cxl_mem.h
index c94af87..a45ab14 100644
--- a/libc/kernel/uapi/linux/cxl_mem.h
+++ b/libc/kernel/uapi/linux/cxl_mem.h
@@ -21,23 +21,33 @@
 #include <linux/types.h>
 #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands)
 #define CXL_MEM_SEND_COMMAND _IOWR(0xCE, 2, struct cxl_send_command)
-#define CXL_CMDS ___C(INVALID, "Invalid Command"), ___C(IDENTIFY, "Identify Command"), ___C(RAW, "Raw device command"), ___C(GET_SUPPORTED_LOGS, "Get Supported Logs"), ___C(GET_FW_INFO, "Get FW Info"), ___C(GET_PARTITION_INFO, "Get Partition Information"), ___C(GET_LSA, "Get Label Storage Area"), ___C(GET_HEALTH_INFO, "Get Health Info"), ___C(GET_LOG, "Get Log"), ___C(SET_PARTITION_INFO, "Set Partition Information"), ___C(SET_LSA, "Set Label Storage Area"), ___C(GET_ALERT_CONFIG, "Get Alert Configuration"), ___C(SET_ALERT_CONFIG, "Set Alert Configuration"), ___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), ___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), ___C(GET_POISON, "Get Poison List"), ___C(INJECT_POISON, "Inject Poison"), ___C(CLEAR_POISON, "Clear Poison"), ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), ___C(SCAN_MEDIA, "Scan Media"), ___C(GET_SCAN_MEDIA, "Get Scan Media Results"), ___C(MAX, "invalid / last command")
+#define CXL_CMDS ___C(INVALID, "Invalid Command"), ___C(IDENTIFY, "Identify Command"), ___C(RAW, "Raw device command"), ___C(GET_SUPPORTED_LOGS, "Get Supported Logs"), ___C(GET_FW_INFO, "Get FW Info"), ___C(GET_PARTITION_INFO, "Get Partition Information"), ___C(GET_LSA, "Get Label Storage Area"), ___C(GET_HEALTH_INFO, "Get Health Info"), ___C(GET_LOG, "Get Log"), ___C(SET_PARTITION_INFO, "Set Partition Information"), ___C(SET_LSA, "Set Label Storage Area"), ___C(GET_ALERT_CONFIG, "Get Alert Configuration"), ___C(SET_ALERT_CONFIG, "Set Alert Configuration"), ___C(GET_SHUTDOWN_STATE, "Get Shutdown State"), ___C(SET_SHUTDOWN_STATE, "Set Shutdown State"), ___DEPRECATED(GET_POISON, "Get Poison List"), ___DEPRECATED(INJECT_POISON, "Inject Poison"), ___DEPRECATED(CLEAR_POISON, "Clear Poison"), ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), ___DEPRECATED(SCAN_MEDIA, "Scan Media"), ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), ___C(MAX, "invalid / last command")
 #define ___C(a,b) CXL_MEM_COMMAND_ID_ ##a
+#define ___DEPRECATED(a,b) CXL_MEM_DEPRECATED_ID_ ##a
 enum {
   CXL_CMDS
 };
 #undef ___C
+#undef ___DEPRECATED
 #define ___C(a,b) { b }
+#define ___DEPRECATED(a,b) { "Deprecated " b }
 static const struct {
   const char * name;
 } cxl_command_names[] __attribute__((__unused__)) = {
   CXL_CMDS
 };
 #undef ___C
+#undef ___DEPRECATED
+#define ___C(a,b) (0)
+#define ___DEPRECATED(a,b) (1)
+#undef ___C
+#undef ___DEPRECATED
 struct cxl_command_info {
   __u32 id;
   __u32 flags;
-#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(0, 0)
+#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(1, 0)
+#define CXL_MEM_COMMAND_FLAG_ENABLED BIT(0)
+#define CXL_MEM_COMMAND_FLAG_EXCLUSIVE BIT(1)
   __u32 size_in;
   __u32 size_out;
 };
diff --git a/libc/kernel/uapi/linux/dcbnl.h b/libc/kernel/uapi/linux/dcbnl.h
index bc88387..b2fec7b 100644
--- a/libc/kernel/uapi/linux/dcbnl.h
+++ b/libc/kernel/uapi/linux/dcbnl.h
@@ -181,6 +181,7 @@
   DCB_ATTR_IEEE_QCN_STATS,
   DCB_ATTR_DCB_BUFFER,
   DCB_ATTR_DCB_APP_TRUST_TABLE,
+  DCB_ATTR_DCB_REWR_TABLE,
   __DCB_ATTR_IEEE_MAX
 };
 #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
diff --git a/libc/kernel/uapi/linux/dlm_netlink.h b/libc/kernel/uapi/linux/dlm_netlink.h
deleted file mode 100644
index 0c655fa..0000000
--- a/libc/kernel/uapi/linux/dlm_netlink.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _DLM_NETLINK_H
-#define _DLM_NETLINK_H
-#include <linux/types.h>
-#include <linux/dlmconstants.h>
-enum {
-  DLM_STATUS_WAITING = 1,
-  DLM_STATUS_GRANTED = 2,
-  DLM_STATUS_CONVERT = 3,
-};
-#define DLM_LOCK_DATA_VERSION 1
-struct dlm_lock_data {
-  __u16 version;
-  __u32 lockspace_id;
-  int nodeid;
-  int ownpid;
-  __u32 id;
-  __u32 remid;
-  __u64 xid;
-  __s8 status;
-  __s8 grmode;
-  __s8 rqmode;
-  unsigned long timestamp;
-  int resource_namelen;
-  char resource_name[DLM_RESNAME_MAXLEN];
-};
-enum {
-  DLM_CMD_UNSPEC = 0,
-  DLM_CMD_HELLO,
-  DLM_CMD_TIMEOUT,
-  __DLM_CMD_MAX,
-};
-#define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
-enum {
-  DLM_TYPE_UNSPEC = 0,
-  DLM_TYPE_LOCK,
-  __DLM_TYPE_MAX,
-};
-#define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
-#define DLM_GENL_VERSION 0x1
-#define DLM_GENL_NAME "DLM"
-#endif
diff --git a/libc/kernel/uapi/linux/dm-ioctl.h b/libc/kernel/uapi/linux/dm-ioctl.h
index f0ff78c..76e331f 100644
--- a/libc/kernel/uapi/linux/dm-ioctl.h
+++ b/libc/kernel/uapi/linux/dm-ioctl.h
@@ -106,9 +106,9 @@
 #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
 #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
 #define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 47
+#define DM_VERSION_MINOR 48
 #define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl(2022-07-28)"
+#define DM_VERSION_EXTRA "-ioctl(2023-03-01)"
 #define DM_READONLY_FLAG (1 << 0)
 #define DM_SUSPEND_FLAG (1 << 1)
 #define DM_PERSISTENT_DEV_FLAG (1 << 3)
diff --git a/libc/kernel/uapi/linux/elf.h b/libc/kernel/uapi/linux/elf.h
index 28c8426..e4901d1 100644
--- a/libc/kernel/uapi/linux/elf.h
+++ b/libc/kernel/uapi/linux/elf.h
@@ -366,6 +366,7 @@
 #define NT_ARM_PAC_ENABLED_KEYS 0x40a
 #define NT_ARM_SSVE 0x40b
 #define NT_ARM_ZA 0x40c
+#define NT_ARM_ZT 0x40d
 #define NT_ARC_V2 0x600
 #define NT_VMCOREDD 0x700
 #define NT_MIPS_DSP 0x800
@@ -376,6 +377,8 @@
 #define NT_LOONGARCH_LSX 0xa02
 #define NT_LOONGARCH_LASX 0xa03
 #define NT_LOONGARCH_LBT 0xa04
+#define NT_LOONGARCH_HW_BREAK 0xa05
+#define NT_LOONGARCH_HW_WATCH 0xa06
 #define NT_GNU_PROPERTY_TYPE_0 5
 typedef struct elf32_note {
   Elf32_Word n_namesz;
diff --git a/libc/kernel/uapi/linux/ethtool.h b/libc/kernel/uapi/linux/ethtool.h
index a58be6f..eec750d 100644
--- a/libc/kernel/uapi/linux/ethtool.h
+++ b/libc/kernel/uapi/linux/ethtool.h
@@ -269,6 +269,11 @@
   ETH_SS_STATS_RMON,
   ETH_SS_COUNT
 };
+enum ethtool_mac_stats_src {
+  ETHTOOL_MAC_STATS_SRC_AGGREGATE,
+  ETHTOOL_MAC_STATS_SRC_EMAC,
+  ETHTOOL_MAC_STATS_SRC_PMAC,
+};
 enum ethtool_module_power_mode_policy {
   ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH = 1,
   ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO,
@@ -291,6 +296,14 @@
   ETHTOOL_PODL_PSE_PW_D_STATUS_IDLE,
   ETHTOOL_PODL_PSE_PW_D_STATUS_ERROR,
 };
+enum ethtool_mm_verify_status {
+  ETHTOOL_MM_VERIFY_STATUS_UNKNOWN,
+  ETHTOOL_MM_VERIFY_STATUS_INITIAL,
+  ETHTOOL_MM_VERIFY_STATUS_VERIFYING,
+  ETHTOOL_MM_VERIFY_STATUS_SUCCEEDED,
+  ETHTOOL_MM_VERIFY_STATUS_FAILED,
+  ETHTOOL_MM_VERIFY_STATUS_DISABLED,
+};
 struct ethtool_gstrings {
   __u32 cmd;
   __u32 string_set;
@@ -419,7 +432,7 @@
     __u32 rule_cnt;
     __u32 rss_context;
   };
-  __u32 rule_locs[0];
+  __u32 rule_locs[];
 };
 struct ethtool_rxfh_indir {
   __u32 cmd;
@@ -725,6 +738,9 @@
   ETHTOOL_LINK_MODE_800000baseDR8_2_Full_BIT = 96,
   ETHTOOL_LINK_MODE_800000baseSR8_Full_BIT = 97,
   ETHTOOL_LINK_MODE_800000baseVR8_Full_BIT = 98,
+  ETHTOOL_LINK_MODE_10baseT1S_Full_BIT = 99,
+  ETHTOOL_LINK_MODE_10baseT1S_Half_BIT = 100,
+  ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT = 101,
   __ETHTOOL_LINK_MODE_MASK_NBITS
 };
 #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) (1UL << (ETHTOOL_LINK_MODE_ ##base_name ##_BIT))
diff --git a/libc/kernel/uapi/linux/ethtool_netlink.h b/libc/kernel/uapi/linux/ethtool_netlink.h
index cc9c53c..246ab8a 100644
--- a/libc/kernel/uapi/linux/ethtool_netlink.h
+++ b/libc/kernel/uapi/linux/ethtool_netlink.h
@@ -59,6 +59,11 @@
   ETHTOOL_MSG_PSE_GET,
   ETHTOOL_MSG_PSE_SET,
   ETHTOOL_MSG_RSS_GET,
+  ETHTOOL_MSG_PLCA_GET_CFG,
+  ETHTOOL_MSG_PLCA_SET_CFG,
+  ETHTOOL_MSG_PLCA_GET_STATUS,
+  ETHTOOL_MSG_MM_GET,
+  ETHTOOL_MSG_MM_SET,
   __ETHTOOL_MSG_USER_CNT,
   ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1
 };
@@ -102,6 +107,11 @@
   ETHTOOL_MSG_MODULE_NTF,
   ETHTOOL_MSG_PSE_GET_REPLY,
   ETHTOOL_MSG_RSS_GET_REPLY,
+  ETHTOOL_MSG_PLCA_GET_CFG_REPLY,
+  ETHTOOL_MSG_PLCA_GET_STATUS_REPLY,
+  ETHTOOL_MSG_PLCA_NTF,
+  ETHTOOL_MSG_MM_GET_REPLY,
+  ETHTOOL_MSG_MM_NTF,
   __ETHTOOL_MSG_KERNEL_CNT,
   ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1
 };
@@ -266,6 +276,9 @@
   ETHTOOL_A_RINGS_TCP_DATA_SPLIT,
   ETHTOOL_A_RINGS_CQE_SIZE,
   ETHTOOL_A_RINGS_TX_PUSH,
+  ETHTOOL_A_RINGS_RX_PUSH,
+  ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN,
+  ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX,
   __ETHTOOL_A_RINGS_CNT,
   ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1)
 };
@@ -310,6 +323,9 @@
   ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL,
   ETHTOOL_A_COALESCE_USE_CQE_MODE_TX,
   ETHTOOL_A_COALESCE_USE_CQE_MODE_RX,
+  ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES,
+  ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES,
+  ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS,
   __ETHTOOL_A_COALESCE_CNT,
   ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1)
 };
@@ -320,6 +336,7 @@
   ETHTOOL_A_PAUSE_RX,
   ETHTOOL_A_PAUSE_TX,
   ETHTOOL_A_PAUSE_STATS,
+  ETHTOOL_A_PAUSE_STATS_SRC,
   __ETHTOOL_A_PAUSE_CNT,
   ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
 };
@@ -538,6 +555,7 @@
   ETHTOOL_A_STATS_HEADER,
   ETHTOOL_A_STATS_GROUPS,
   ETHTOOL_A_STATS_GRP,
+  ETHTOOL_A_STATS_SRC,
   __ETHTOOL_A_STATS_CNT,
   ETHTOOL_A_STATS_MAX = (__ETHTOOL_A_STATS_CNT - 1)
 };
@@ -560,7 +578,7 @@
   ETHTOOL_A_STATS_GRP_HIST_BKT_HI,
   ETHTOOL_A_STATS_GRP_HIST_VAL,
   __ETHTOOL_A_STATS_GRP_CNT,
-  ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1)
+  ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1)
 };
 enum {
   ETHTOOL_A_STATS_ETH_PHY_5_SYM_ERR,
@@ -635,6 +653,48 @@
   __ETHTOOL_A_RSS_CNT,
   ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1),
 };
+enum {
+  ETHTOOL_A_PLCA_UNSPEC,
+  ETHTOOL_A_PLCA_HEADER,
+  ETHTOOL_A_PLCA_VERSION,
+  ETHTOOL_A_PLCA_ENABLED,
+  ETHTOOL_A_PLCA_STATUS,
+  ETHTOOL_A_PLCA_NODE_CNT,
+  ETHTOOL_A_PLCA_NODE_ID,
+  ETHTOOL_A_PLCA_TO_TMR,
+  ETHTOOL_A_PLCA_BURST_CNT,
+  ETHTOOL_A_PLCA_BURST_TMR,
+  __ETHTOOL_A_PLCA_CNT,
+  ETHTOOL_A_PLCA_MAX = (__ETHTOOL_A_PLCA_CNT - 1)
+};
+enum {
+  ETHTOOL_A_MM_STAT_UNSPEC,
+  ETHTOOL_A_MM_STAT_PAD,
+  ETHTOOL_A_MM_STAT_REASSEMBLY_ERRORS,
+  ETHTOOL_A_MM_STAT_SMD_ERRORS,
+  ETHTOOL_A_MM_STAT_REASSEMBLY_OK,
+  ETHTOOL_A_MM_STAT_RX_FRAG_COUNT,
+  ETHTOOL_A_MM_STAT_TX_FRAG_COUNT,
+  ETHTOOL_A_MM_STAT_HOLD_COUNT,
+  __ETHTOOL_A_MM_STAT_CNT,
+  ETHTOOL_A_MM_STAT_MAX = (__ETHTOOL_A_MM_STAT_CNT - 1)
+};
+enum {
+  ETHTOOL_A_MM_UNSPEC,
+  ETHTOOL_A_MM_HEADER,
+  ETHTOOL_A_MM_PMAC_ENABLED,
+  ETHTOOL_A_MM_TX_ENABLED,
+  ETHTOOL_A_MM_TX_ACTIVE,
+  ETHTOOL_A_MM_TX_MIN_FRAG_SIZE,
+  ETHTOOL_A_MM_RX_MIN_FRAG_SIZE,
+  ETHTOOL_A_MM_VERIFY_ENABLED,
+  ETHTOOL_A_MM_VERIFY_STATUS,
+  ETHTOOL_A_MM_VERIFY_TIME,
+  ETHTOOL_A_MM_MAX_VERIFY_TIME,
+  ETHTOOL_A_MM_STATS,
+  __ETHTOOL_A_MM_CNT,
+  ETHTOOL_A_MM_MAX = (__ETHTOOL_A_MM_CNT - 1)
+};
 #define ETHTOOL_GENL_NAME "ethtool"
 #define ETHTOOL_GENL_VERSION 1
 #define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
diff --git a/libc/kernel/uapi/linux/ext4.h b/libc/kernel/uapi/linux/ext4.h
new file mode 100644
index 0000000..70a3b1a
--- /dev/null
+++ b/libc/kernel/uapi/linux/ext4.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_EXT4_H
+#define _UAPI_LINUX_EXT4_H
+#include <linux/fiemap.h>
+#include <linux/fs.h>
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#define EXT4_IOC_GETVERSION _IOR('f', 3, long)
+#define EXT4_IOC_SETVERSION _IOW('f', 4, long)
+#define EXT4_IOC_GETVERSION_OLD FS_IOC_GETVERSION
+#define EXT4_IOC_SETVERSION_OLD FS_IOC_SETVERSION
+#define EXT4_IOC_GETRSVSZ _IOR('f', 5, long)
+#define EXT4_IOC_SETRSVSZ _IOW('f', 6, long)
+#define EXT4_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
+#define EXT4_IOC_GROUP_ADD _IOW('f', 8, struct ext4_new_group_input)
+#define EXT4_IOC_MIGRATE _IO('f', 9)
+#define EXT4_IOC_ALLOC_DA_BLKS _IO('f', 12)
+#define EXT4_IOC_MOVE_EXT _IOWR('f', 15, struct move_extent)
+#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
+#define EXT4_IOC_SWAP_BOOT _IO('f', 17)
+#define EXT4_IOC_PRECACHE_EXTENTS _IO('f', 18)
+#define EXT4_IOC_CLEAR_ES_CACHE _IO('f', 40)
+#define EXT4_IOC_GETSTATE _IOW('f', 41, __u32)
+#define EXT4_IOC_GET_ES_CACHE _IOWR('f', 42, struct fiemap)
+#define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32)
+#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)
+#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)
+#define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)
+#define EXT4_IOC32_GETVERSION _IOR('f', 3, int)
+#define EXT4_IOC32_SETVERSION _IOW('f', 4, int)
+#define EXT4_IOC32_GETRSVSZ _IOR('f', 5, int)
+#define EXT4_IOC32_SETRSVSZ _IOW('f', 6, int)
+#define EXT4_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int)
+#define EXT4_IOC32_GROUP_ADD _IOW('f', 8, struct compat_ext4_new_group_input)
+#define EXT4_IOC32_GETVERSION_OLD FS_IOC32_GETVERSION
+#define EXT4_IOC32_SETVERSION_OLD FS_IOC32_SETVERSION
+#define EXT4_STATE_FLAG_EXT_PRECACHED 0x00000001
+#define EXT4_STATE_FLAG_NEW 0x00000002
+#define EXT4_STATE_FLAG_NEWENTRY 0x00000004
+#define EXT4_STATE_FLAG_DA_ALLOC_CLOSE 0x00000008
+#define EXT4_IOC_CHECKPOINT_FLAG_DISCARD 0x1
+#define EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT 0x2
+#define EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN 0x4
+#define EXT4_IOC_CHECKPOINT_FLAG_VALID (EXT4_IOC_CHECKPOINT_FLAG_DISCARD | EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT | EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN)
+struct fsuuid {
+  __u32 fsu_len;
+  __u32 fsu_flags;
+  __u8 fsu_uuid[];
+};
+struct move_extent {
+  __u32 reserved;
+  __u32 donor_fd;
+  __u64 orig_start;
+  __u64 donor_start;
+  __u64 len;
+  __u64 moved_len;
+};
+#define EXT4_GOING_FLAGS_DEFAULT 0x0
+#define EXT4_GOING_FLAGS_LOGFLUSH 0x1
+#define EXT4_GOING_FLAGS_NOLOGFLUSH 0x2
+struct ext4_new_group_input {
+  __u32 group;
+  __u64 block_bitmap;
+  __u64 inode_bitmap;
+  __u64 inode_table;
+  __u32 blocks_count;
+  __u16 reserved_blocks;
+  __u16 unused;
+};
+#define EXT4_FIEMAP_EXTENT_HOLE 0x08000000
+#endif
diff --git a/libc/kernel/uapi/linux/fanotify.h b/libc/kernel/uapi/linux/fanotify.h
index 9815a64..f9551a8 100644
--- a/libc/kernel/uapi/linux/fanotify.h
+++ b/libc/kernel/uapi/linux/fanotify.h
@@ -113,13 +113,27 @@
   __s32 error;
   __u32 error_count;
 };
+#define FAN_RESPONSE_INFO_NONE 0
+#define FAN_RESPONSE_INFO_AUDIT_RULE 1
 struct fanotify_response {
   __s32 fd;
   __u32 response;
 };
+struct fanotify_response_info_header {
+  __u8 type;
+  __u8 pad;
+  __u16 len;
+};
+struct fanotify_response_info_audit_rule {
+  struct fanotify_response_info_header hdr;
+  __u32 rule_number;
+  __u32 subj_trust;
+  __u32 obj_trust;
+};
 #define FAN_ALLOW 0x01
 #define FAN_DENY 0x02
 #define FAN_AUDIT 0x10
+#define FAN_INFO 0x20
 #define FAN_NOFD - 1
 #define FAN_NOPIDFD FAN_NOFD
 #define FAN_EPIDFD - 2
diff --git a/libc/kernel/uapi/linux/fcntl.h b/libc/kernel/uapi/linux/fcntl.h
index a46726b..05393d5 100644
--- a/libc/kernel/uapi/linux/fcntl.h
+++ b/libc/kernel/uapi/linux/fcntl.h
@@ -34,6 +34,7 @@
 #define F_SEAL_GROW 0x0004
 #define F_SEAL_WRITE 0x0008
 #define F_SEAL_FUTURE_WRITE 0x0010
+#define F_SEAL_EXEC 0x0020
 #define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11)
 #define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12)
 #define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13)
diff --git a/libc/kernel/uapi/linux/fou.h b/libc/kernel/uapi/linux/fou.h
index a16b8c6..7b06cff 100644
--- a/libc/kernel/uapi/linux/fou.h
+++ b/libc/kernel/uapi/linux/fou.h
@@ -19,7 +19,12 @@
 #ifndef _UAPI_LINUX_FOU_H
 #define _UAPI_LINUX_FOU_H
 #define FOU_GENL_NAME "fou"
-#define FOU_GENL_VERSION 0x1
+#define FOU_GENL_VERSION 1
+enum {
+  FOU_ENCAP_UNSPEC,
+  FOU_ENCAP_DIRECT,
+  FOU_ENCAP_GUE,
+};
 enum {
   FOU_ATTR_UNSPEC,
   FOU_ATTR_PORT,
@@ -33,7 +38,7 @@
   FOU_ATTR_PEER_V6,
   FOU_ATTR_PEER_PORT,
   FOU_ATTR_IFINDEX,
-  __FOU_ATTR_MAX,
+  __FOU_ATTR_MAX
 };
 #define FOU_ATTR_MAX (__FOU_ATTR_MAX - 1)
 enum {
@@ -41,12 +46,7 @@
   FOU_CMD_ADD,
   FOU_CMD_DEL,
   FOU_CMD_GET,
-  __FOU_CMD_MAX,
-};
-enum {
-  FOU_ENCAP_UNSPEC,
-  FOU_ENCAP_DIRECT,
-  FOU_ENCAP_GUE,
+  __FOU_CMD_MAX
 };
 #define FOU_CMD_MAX (__FOU_CMD_MAX - 1)
 #endif
diff --git a/libc/kernel/uapi/linux/fuse.h b/libc/kernel/uapi/linux/fuse.h
index f1eec4d..c3668e7 100644
--- a/libc/kernel/uapi/linux/fuse.h
+++ b/libc/kernel/uapi/linux/fuse.h
@@ -111,6 +111,7 @@
 #define FUSE_INIT_RESERVED (1 << 31)
 #define FUSE_SECURITY_CTX (1ULL << 32)
 #define FUSE_HAS_INODE_DAX (1ULL << 33)
+#define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
 #if FUSE_KERNEL_VERSION > 7 || FUSE_KERNEL_VERSION == 7 && FUSE_KERNEL_MINOR_VERSION >= 36
 #define FUSE_PASSTHROUGH (1ULL << 63)
 #else
@@ -140,6 +141,10 @@
 #define FUSE_OPEN_KILL_SUIDGID (1 << 0)
 #define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
 #define FUSE_EXPIRE_ONLY (1 << 0)
+enum fuse_ext_type {
+  FUSE_MAX_NR_SECCTX = 31,
+  FUSE_EXT_GROUPS = 32,
+};
 enum fuse_opcode {
   FUSE_LOOKUP = 1,
   FUSE_FORGET = 2,
@@ -465,7 +470,8 @@
   uint32_t uid;
   uint32_t gid;
   uint32_t pid;
-  uint32_t padding;
+  uint16_t total_extlen;
+  uint16_t padding;
 };
 struct fuse_out_header {
   uint32_t len;
@@ -575,4 +581,12 @@
   uint32_t size;
   uint32_t nr_secctx;
 };
+struct fuse_ext_header {
+  uint32_t size;
+  uint32_t type;
+};
+struct fuse_supp_groups {
+  uint32_t nr_groups;
+  uint32_t groups[];
+};
 #endif
diff --git a/libc/kernel/uapi/linux/gsmmux.h b/libc/kernel/uapi/linux/gsmmux.h
index 4e6920a..8ff29fd 100644
--- a/libc/kernel/uapi/linux/gsmmux.h
+++ b/libc/kernel/uapi/linux/gsmmux.h
@@ -47,4 +47,22 @@
 #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig)
 #define GSMIOC_DISABLE_NET _IO('G', 3)
 #define GSMIOC_GETFIRST _IOR('G', 4, __u32)
+struct gsm_config_ext {
+  __u32 keep_alive;
+  __u32 wait_config;
+  __u32 reserved[6];
+};
+#define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)
+#define GSMIOC_SETCONF_EXT _IOW('G', 6, struct gsm_config_ext)
+struct gsm_dlci_config {
+  __u32 channel;
+  __u32 adaption;
+  __u32 mtu;
+  __u32 priority;
+  __u32 i;
+  __u32 k;
+  __u32 reserved[8];
+};
+#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)
+#define GSMIOC_SETCONF_DLCI _IOW('G', 8, struct gsm_dlci_config)
 #endif
diff --git a/libc/kernel/uapi/linux/handshake.h b/libc/kernel/uapi/linux/handshake.h
new file mode 100644
index 0000000..e9923ae
--- /dev/null
+++ b/libc/kernel/uapi/linux/handshake.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_HANDSHAKE_H
+#define _UAPI_LINUX_HANDSHAKE_H
+#define HANDSHAKE_FAMILY_NAME "handshake"
+#define HANDSHAKE_FAMILY_VERSION 1
+enum handshake_handler_class {
+  HANDSHAKE_HANDLER_CLASS_NONE,
+  HANDSHAKE_HANDLER_CLASS_TLSHD,
+  HANDSHAKE_HANDLER_CLASS_MAX,
+};
+enum handshake_msg_type {
+  HANDSHAKE_MSG_TYPE_UNSPEC,
+  HANDSHAKE_MSG_TYPE_CLIENTHELLO,
+  HANDSHAKE_MSG_TYPE_SERVERHELLO,
+};
+enum handshake_auth {
+  HANDSHAKE_AUTH_UNSPEC,
+  HANDSHAKE_AUTH_UNAUTH,
+  HANDSHAKE_AUTH_PSK,
+  HANDSHAKE_AUTH_X509,
+};
+enum {
+  HANDSHAKE_A_X509_CERT = 1,
+  HANDSHAKE_A_X509_PRIVKEY,
+  __HANDSHAKE_A_X509_MAX,
+  HANDSHAKE_A_X509_MAX = (__HANDSHAKE_A_X509_MAX - 1)
+};
+enum {
+  HANDSHAKE_A_ACCEPT_SOCKFD = 1,
+  HANDSHAKE_A_ACCEPT_HANDLER_CLASS,
+  HANDSHAKE_A_ACCEPT_MESSAGE_TYPE,
+  HANDSHAKE_A_ACCEPT_TIMEOUT,
+  HANDSHAKE_A_ACCEPT_AUTH_MODE,
+  HANDSHAKE_A_ACCEPT_PEER_IDENTITY,
+  HANDSHAKE_A_ACCEPT_CERTIFICATE,
+  HANDSHAKE_A_ACCEPT_PEERNAME,
+  __HANDSHAKE_A_ACCEPT_MAX,
+  HANDSHAKE_A_ACCEPT_MAX = (__HANDSHAKE_A_ACCEPT_MAX - 1)
+};
+enum {
+  HANDSHAKE_A_DONE_STATUS = 1,
+  HANDSHAKE_A_DONE_SOCKFD,
+  HANDSHAKE_A_DONE_REMOTE_AUTH,
+  __HANDSHAKE_A_DONE_MAX,
+  HANDSHAKE_A_DONE_MAX = (__HANDSHAKE_A_DONE_MAX - 1)
+};
+enum {
+  HANDSHAKE_CMD_READY = 1,
+  HANDSHAKE_CMD_ACCEPT,
+  HANDSHAKE_CMD_DONE,
+  __HANDSHAKE_CMD_MAX,
+  HANDSHAKE_CMD_MAX = (__HANDSHAKE_CMD_MAX - 1)
+};
+#define HANDSHAKE_MCGRP_NONE "none"
+#define HANDSHAKE_MCGRP_TLSHD "tlshd"
+#endif
diff --git a/libc/kernel/uapi/linux/hw_breakpoint.h b/libc/kernel/uapi/linux/hw_breakpoint.h
index 74acd53..416d746 100644
--- a/libc/kernel/uapi/linux/hw_breakpoint.h
+++ b/libc/kernel/uapi/linux/hw_breakpoint.h
@@ -36,9 +36,4 @@
   HW_BREAKPOINT_X = 4,
   HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
 };
-enum bp_type_idx {
-  TYPE_INST = 0,
-  TYPE_DATA = 1,
-  TYPE_MAX
-};
 #endif
diff --git a/libc/kernel/uapi/linux/idxd.h b/libc/kernel/uapi/linux/idxd.h
index 01c62f2..f8cfc11 100644
--- a/libc/kernel/uapi/linux/idxd.h
+++ b/libc/kernel/uapi/linux/idxd.h
@@ -39,6 +39,7 @@
   IDXD_SCMD_WQ_NO_PRIV = 0x800f0000,
   IDXD_SCMD_WQ_IRQ_ERR = 0x80100000,
   IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000,
+  IDXD_SCMD_DEV_EVL_ERR = 0x80120000,
 };
 #define IDXD_SCMD_SOFTERR_MASK 0x80000000
 #define IDXD_SCMD_SOFTERR_SHIFT 16
@@ -74,12 +75,14 @@
   DSA_OPCODE_CR_DELTA,
   DSA_OPCODE_AP_DELTA,
   DSA_OPCODE_DUALCAST,
+  DSA_OPCODE_TRANSL_FETCH,
   DSA_OPCODE_CRCGEN = 0x10,
   DSA_OPCODE_COPY_CRC,
   DSA_OPCODE_DIF_CHECK,
   DSA_OPCODE_DIF_INS,
   DSA_OPCODE_DIF_STRP,
   DSA_OPCODE_DIF_UPDT,
+  DSA_OPCODE_DIX_GEN = 0x17,
   DSA_OPCODE_CFLUSH = 0x20,
 };
 enum iax_opcode {
@@ -131,6 +134,8 @@
   DSA_COMP_HW_ERR1,
   DSA_COMP_HW_ERR_DRB,
   DSA_COMP_TRANSLATION_FAIL,
+  DSA_COMP_DRAIN_EVL = 0x26,
+  DSA_COMP_BATCH_EVL_ERR,
 };
 enum iax_completion_status {
   IAX_COMP_NONE = 0,
@@ -164,6 +169,7 @@
 };
 #define DSA_COMP_STATUS_MASK 0x7f
 #define DSA_COMP_STATUS_WRITE 0x80
+#define DSA_COMP_STATUS(status) ((status) & DSA_COMP_STATUS_MASK)
 struct dsa_hw_desc {
   uint32_t pasid : 20;
   uint32_t rsvd : 11;
@@ -176,6 +182,8 @@
     uint64_t rdback_addr;
     uint64_t pattern;
     uint64_t desc_list_addr;
+    uint64_t pattern_lower;
+    uint64_t transl_fetch_addr;
   };
   union {
     uint64_t dst_addr;
@@ -186,6 +194,7 @@
   union {
     uint32_t xfer_size;
     uint32_t desc_count;
+    uint32_t region_size;
   };
   uint16_t int_handle;
   uint16_t rsvd1;
@@ -234,6 +243,20 @@
       uint16_t dest_app_tag_mask;
       uint16_t dest_app_tag_seed;
     };
+    uint64_t pattern_upper;
+    struct {
+      uint64_t transl_fetch_res;
+      uint32_t region_stride;
+    };
+    struct {
+      uint8_t dix_gen_res;
+      uint8_t dest_dif_flags;
+      uint8_t dif_flags;
+      uint8_t dix_gen_res2[13];
+      uint32_t ref_tag_seed;
+      uint16_t app_tag_mask;
+      uint16_t app_tag_seed;
+    };
     uint8_t op_specific[24];
   };
 } __attribute__((packed));
@@ -267,8 +290,12 @@
     uint8_t result;
     uint8_t dif_status;
   };
-  uint16_t rsvd;
-  uint32_t bytes_completed;
+  uint8_t fault_info;
+  uint8_t rsvd;
+  union {
+    uint32_t bytes_completed;
+    uint32_t descs_completed;
+  };
   uint64_t fault_addr;
   union {
     struct {
@@ -296,6 +323,12 @@
       uint16_t dif_upd_dest_app_tag_mask;
       uint16_t dif_upd_dest_app_tag;
     };
+    struct {
+      uint64_t dix_gen_res;
+      uint32_t dix_ref_tag;
+      uint16_t dix_app_tag_mask;
+      uint16_t dix_app_tag;
+    };
     uint8_t op_specific[16];
   };
 } __attribute__((packed));
@@ -305,7 +338,8 @@
 struct iax_completion_record {
   volatile uint8_t status;
   uint8_t error_code;
-  uint16_t rsvd;
+  uint8_t fault_info;
+  uint8_t rsvd;
   uint32_t bytes_completed;
   uint64_t fault_addr;
   uint32_t invalid_flags;
diff --git a/libc/kernel/uapi/linux/if_bridge.h b/libc/kernel/uapi/linux/if_bridge.h
index 702363e..1f90580 100644
--- a/libc/kernel/uapi/linux/if_bridge.h
+++ b/libc/kernel/uapi/linux/if_bridge.h
@@ -435,6 +435,9 @@
   BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
   BRIDGE_VLANDB_ENTRY_STATS,
   BRIDGE_VLANDB_ENTRY_MCAST_ROUTER,
+  BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
+  BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
+  BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,
   __BRIDGE_VLANDB_ENTRY_MAX,
 };
 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
@@ -504,6 +507,11 @@
   MDBA_MDB_EATTR_GROUP_MODE,
   MDBA_MDB_EATTR_SOURCE,
   MDBA_MDB_EATTR_RTPROT,
+  MDBA_MDB_EATTR_DST,
+  MDBA_MDB_EATTR_DST_PORT,
+  MDBA_MDB_EATTR_VNI,
+  MDBA_MDB_EATTR_IFINDEX,
+  MDBA_MDB_EATTR_SRC_VNI,
   __MDBA_MDB_EATTR_MAX
 };
 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
@@ -579,6 +587,11 @@
   MDBE_ATTR_SRC_LIST,
   MDBE_ATTR_GROUP_MODE,
   MDBE_ATTR_RTPROT,
+  MDBE_ATTR_DST,
+  MDBE_ATTR_DST_PORT,
+  MDBE_ATTR_VNI,
+  MDBE_ATTR_IFINDEX,
+  MDBE_ATTR_SRC_VNI,
   __MDBE_ATTR_MAX,
 };
 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
diff --git a/libc/kernel/uapi/linux/if_link.h b/libc/kernel/uapi/linux/if_link.h
index 19c6346..5b1d66a 100644
--- a/libc/kernel/uapi/linux/if_link.h
+++ b/libc/kernel/uapi/linux/if_link.h
@@ -167,6 +167,8 @@
   IFLA_TSO_MAX_SEGS,
   IFLA_ALLMULTI,
   IFLA_DEVLINK_PORT,
+  IFLA_GSO_IPV4_MAX_SIZE,
+  IFLA_GRO_IPV4_MAX_SIZE,
   __IFLA_MAX
 };
 #define IFLA_MAX (__IFLA_MAX - 1)
@@ -307,6 +309,9 @@
   IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
   IFLA_BRPORT_LOCKED,
   IFLA_BRPORT_MAB,
+  IFLA_BRPORT_MCAST_N_GROUPS,
+  IFLA_BRPORT_MCAST_MAX_GROUPS,
+  IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
   __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -360,6 +365,7 @@
   IFLA_MACVLAN_MACADDR_COUNT,
   IFLA_MACVLAN_BC_QUEUE_LEN,
   IFLA_MACVLAN_BC_QUEUE_LEN_USED,
+  IFLA_MACVLAN_BC_CUTOFF,
   __IFLA_MACVLAN_MAX,
 };
 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
diff --git a/libc/kernel/uapi/linux/if_packet.h b/libc/kernel/uapi/linux/if_packet.h
index 340b2ee..1fe897a 100644
--- a/libc/kernel/uapi/linux/if_packet.h
+++ b/libc/kernel/uapi/linux/if_packet.h
@@ -65,6 +65,7 @@
 #define PACKET_ROLLOVER_STATS 21
 #define PACKET_FANOUT_DATA 22
 #define PACKET_IGNORE_OUTGOING 23
+#define PACKET_VNET_HDR_SZ 24
 #define PACKET_FANOUT_HASH 0
 #define PACKET_FANOUT_LB 1
 #define PACKET_FANOUT_CPU 2
@@ -113,6 +114,7 @@
 #define TP_STATUS_BLK_TMO (1 << 5)
 #define TP_STATUS_VLAN_TPID_VALID (1 << 6)
 #define TP_STATUS_CSUM_VALID (1 << 7)
+#define TP_STATUS_GSO_TCP (1 << 8)
 #define TP_STATUS_AVAILABLE 0
 #define TP_STATUS_SEND_REQUEST (1 << 0)
 #define TP_STATUS_SENDING (1 << 1)
diff --git a/libc/kernel/uapi/linux/in.h b/libc/kernel/uapi/linux/in.h
index 53d3074..3e98b79 100644
--- a/libc/kernel/uapi/linux/in.h
+++ b/libc/kernel/uapi/linux/in.h
@@ -141,6 +141,8 @@
 #define MCAST_MSFILTER 48
 #define IP_MULTICAST_ALL 49
 #define IP_UNICAST_IF 50
+#define IP_LOCAL_PORT_RANGE 51
+#define IP_PROTOCOL 52
 #define MCAST_EXCLUDE 0
 #define MCAST_INCLUDE 1
 #define IP_DEFAULT_MULTICAST_TTL 1
diff --git a/libc/kernel/uapi/linux/io_uring.h b/libc/kernel/uapi/linux/io_uring.h
index 5561448..b6c396f 100644
--- a/libc/kernel/uapi/linux/io_uring.h
+++ b/libc/kernel/uapi/linux/io_uring.h
@@ -178,6 +178,7 @@
 #define IORING_TIMEOUT_REALTIME (1U << 3)
 #define IORING_LINK_TIMEOUT_UPDATE (1U << 4)
 #define IORING_TIMEOUT_ETIME_SUCCESS (1U << 5)
+#define IORING_TIMEOUT_MULTISHOT (1U << 6)
 #define IORING_TIMEOUT_CLOCK_MASK (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)
 #define IORING_TIMEOUT_UPDATE_MASK (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE)
 #define SPLICE_F_FD_IN_FIXED (1U << 31)
@@ -200,6 +201,7 @@
   IORING_MSG_SEND_FD,
 };
 #define IORING_MSG_RING_CQE_SKIP (1U << 0)
+#define IORING_MSG_RING_FLAGS_PASS (1U << 1)
 struct io_uring_cqe {
   __u64 user_data;
   __s32 res;
@@ -216,6 +218,9 @@
 #define IORING_OFF_SQ_RING 0ULL
 #define IORING_OFF_CQ_RING 0x8000000ULL
 #define IORING_OFF_SQES 0x10000000ULL
+#define IORING_OFF_PBUF_RING 0x80000000ULL
+#define IORING_OFF_PBUF_SHIFT 16
+#define IORING_OFF_MMAP_MASK 0xf8000000ULL
 struct io_sqring_offsets {
   __u32 head;
   __u32 tail;
@@ -272,6 +277,7 @@
 #define IORING_FEAT_RSRC_TAGS (1U << 10)
 #define IORING_FEAT_CQE_SKIP (1U << 11)
 #define IORING_FEAT_LINKED_FILE (1U << 12)
+#define IORING_FEAT_REG_REG_RING (1U << 13)
 enum {
   IORING_REGISTER_BUFFERS = 0,
   IORING_UNREGISTER_BUFFERS = 1,
@@ -299,7 +305,8 @@
   IORING_UNREGISTER_PBUF_RING = 23,
   IORING_REGISTER_SYNC_CANCEL = 24,
   IORING_REGISTER_FILE_ALLOC_RANGE = 25,
-  IORING_REGISTER_LAST
+  IORING_REGISTER_LAST,
+  IORING_REGISTER_USE_REGISTERED_RING = 1U << 31
 };
 enum {
   IO_WQ_BOUND,
@@ -331,17 +338,6 @@
   __u32 nr;
   __u32 resv2;
 };
-struct io_uring_notification_slot {
-  __u64 tag;
-  __u64 resv[3];
-};
-struct io_uring_notification_register {
-  __u32 nr_slots;
-  __u32 resv;
-  __u64 resv2;
-  __u64 data;
-  __u64 resv3;
-};
 #define IORING_REGISTER_FILES_SKIP (- 2)
 #define IO_URING_OP_SUPPORTED (1U << 0)
 struct io_uring_probe_op {
@@ -381,14 +377,17 @@
       __u16 resv3;
       __u16 tail;
     };
-    struct io_uring_buf bufs[0];
+    __DECLARE_FLEX_ARRAY(struct io_uring_buf, bufs);
   };
 };
+enum {
+  IOU_PBUF_RING_MMAP = 1,
+};
 struct io_uring_buf_reg {
   __u64 ring_addr;
   __u32 ring_entries;
   __u16 bgid;
-  __u16 pad;
+  __u16 flags;
   __u64 resv[3];
 };
 enum {
diff --git a/libc/kernel/uapi/linux/ioam6.h b/libc/kernel/uapi/linux/ioam6.h
index e32c8e9..8d2a25b 100644
--- a/libc/kernel/uapi/linux/ioam6.h
+++ b/libc/kernel/uapi/linux/ioam6.h
@@ -58,6 +58,6 @@
 #error "Please fix <asm/byteorder.h>"
 #endif
 #define IOAM6_TRACE_DATA_SIZE_MAX 244
-  __u8 data[0];
+  __u8 data[];
 } __attribute__((packed));
 #endif
diff --git a/libc/kernel/uapi/linux/ipv6.h b/libc/kernel/uapi/linux/ipv6.h
index d62d269..d8fe3cd 100644
--- a/libc/kernel/uapi/linux/ipv6.h
+++ b/libc/kernel/uapi/linux/ipv6.h
@@ -62,7 +62,7 @@
 struct rt0_hdr {
   struct ipv6_rt_hdr rt_hdr;
   __u32 reserved;
-  struct in6_addr addr[0];
+  struct in6_addr addr[];
 #define rt0_type rt_hdr.type
 };
 struct rt2_hdr {
diff --git a/libc/kernel/uapi/linux/isst_if.h b/libc/kernel/uapi/linux/isst_if.h
index 322f70d..9d03b7a 100644
--- a/libc/kernel/uapi/linux/isst_if.h
+++ b/libc/kernel/uapi/linux/isst_if.h
@@ -67,10 +67,136 @@
   __u32 cmd_count;
   struct isst_if_msr_cmd msr_cmd[1];
 };
+struct isst_core_power {
+  __u8 get_set;
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 enable;
+  __u8 supported;
+  __u8 priority_type;
+};
+struct isst_clos_param {
+  __u8 get_set;
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 clos;
+  __u16 min_freq_mhz;
+  __u16 max_freq_mhz;
+  __u8 prop_prio;
+};
+struct isst_if_clos_assoc {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u16 logical_cpu;
+  __u16 clos;
+};
+struct isst_if_clos_assoc_cmds {
+  __u16 cmd_count;
+  __u16 get_set;
+  __u16 punit_cpu_map;
+  struct isst_if_clos_assoc assoc_info[1];
+};
+struct isst_tpmi_instance_count {
+  __u8 socket_id;
+  __u8 count;
+  __u16 valid_mask;
+};
+struct isst_perf_level_info {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 max_level;
+  __u8 feature_rev;
+  __u8 level_mask;
+  __u8 current_level;
+  __u8 feature_state;
+  __u8 locked;
+  __u8 enabled;
+  __u8 sst_tf_support;
+  __u8 sst_bf_support;
+};
+struct isst_perf_level_control {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 level;
+};
+struct isst_perf_feature_control {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 feature;
+};
+#define TRL_MAX_BUCKETS 8
+#define TRL_MAX_LEVELS 6
+struct isst_perf_level_data_info {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u16 level;
+  __u16 tdp_ratio;
+  __u16 base_freq_mhz;
+  __u16 base_freq_avx2_mhz;
+  __u16 base_freq_avx512_mhz;
+  __u16 base_freq_amx_mhz;
+  __u16 thermal_design_power_w;
+  __u16 tjunction_max_c;
+  __u16 max_memory_freq_mhz;
+  __u16 cooling_type;
+  __u16 p0_freq_mhz;
+  __u16 p1_freq_mhz;
+  __u16 pn_freq_mhz;
+  __u16 pm_freq_mhz;
+  __u16 p0_fabric_freq_mhz;
+  __u16 p1_fabric_freq_mhz;
+  __u16 pn_fabric_freq_mhz;
+  __u16 pm_fabric_freq_mhz;
+  __u16 max_buckets;
+  __u16 max_trl_levels;
+  __u16 bucket_core_counts[TRL_MAX_BUCKETS];
+  __u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS];
+};
+struct isst_perf_level_cpu_mask {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u8 level;
+  __u8 punit_cpu_map;
+  __u64 mask;
+  __u16 cpu_buffer_size;
+  __s8 cpu_buffer[1];
+};
+struct isst_base_freq_info {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u16 level;
+  __u16 high_base_freq_mhz;
+  __u16 low_base_freq_mhz;
+  __u16 tjunction_max_c;
+  __u16 thermal_design_power_w;
+};
+struct isst_turbo_freq_info {
+  __u8 socket_id;
+  __u8 power_domain_id;
+  __u16 level;
+  __u16 max_clip_freqs;
+  __u16 max_buckets;
+  __u16 max_trl_levels;
+  __u16 lp_clip_freq_mhz[TRL_MAX_LEVELS];
+  __u16 bucket_core_counts[TRL_MAX_BUCKETS];
+  __u16 trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS];
+};
 #define ISST_IF_MAGIC 0xFE
 #define ISST_IF_GET_PLATFORM_INFO _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *)
 #define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *)
 #define ISST_IF_IO_CMD _IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *)
 #define ISST_IF_MBOX_COMMAND _IOWR(ISST_IF_MAGIC, 3, struct isst_if_mbox_cmds *)
 #define ISST_IF_MSR_COMMAND _IOWR(ISST_IF_MAGIC, 4, struct isst_if_msr_cmds *)
+#define ISST_IF_COUNT_TPMI_INSTANCES _IOR(ISST_IF_MAGIC, 5, struct isst_tpmi_instance_count *)
+#define ISST_IF_CORE_POWER_STATE _IOWR(ISST_IF_MAGIC, 6, struct isst_core_power *)
+#define ISST_IF_CLOS_PARAM _IOWR(ISST_IF_MAGIC, 7, struct isst_clos_param *)
+#define ISST_IF_CLOS_ASSOC _IOWR(ISST_IF_MAGIC, 8, struct isst_if_clos_assoc_cmds *)
+#define ISST_IF_PERF_LEVELS _IOWR(ISST_IF_MAGIC, 9, struct isst_perf_level_info *)
+#define ISST_IF_PERF_SET_LEVEL _IOW(ISST_IF_MAGIC, 10, struct isst_perf_level_control *)
+#define ISST_IF_PERF_SET_FEATURE _IOW(ISST_IF_MAGIC, 11, struct isst_perf_feature_control *)
+#define ISST_IF_GET_PERF_LEVEL_INFO _IOR(ISST_IF_MAGIC, 12, struct isst_perf_level_data_info *)
+#define ISST_IF_GET_PERF_LEVEL_CPU_MASK _IOR(ISST_IF_MAGIC, 13, struct isst_perf_level_cpu_mask *)
+#define ISST_IF_GET_BASE_FREQ_INFO _IOR(ISST_IF_MAGIC, 14, struct isst_base_freq_info *)
+#define ISST_IF_GET_BASE_FREQ_CPU_MASK _IOR(ISST_IF_MAGIC, 15, struct isst_perf_level_cpu_mask *)
+#define ISST_IF_GET_TURBO_FREQ_INFO _IOR(ISST_IF_MAGIC, 16, struct isst_turbo_freq_info *)
 #endif
diff --git a/libc/kernel/uapi/linux/kd.h b/libc/kernel/uapi/linux/kd.h
index 903681b..a14cab6 100644
--- a/libc/kernel/uapi/linux/kd.h
+++ b/libc/kernel/uapi/linux/kd.h
@@ -158,5 +158,7 @@
 #define KD_FONT_OP_GET 1
 #define KD_FONT_OP_SET_DEFAULT 2
 #define KD_FONT_OP_COPY 3
+#define KD_FONT_OP_SET_TALL 4
+#define KD_FONT_OP_GET_TALL 5
 #define KD_FONT_FLAG_DONT_RECALC 1
 #endif
diff --git a/libc/kernel/uapi/linux/kfd_ioctl.h b/libc/kernel/uapi/linux/kfd_ioctl.h
index d21e0fc..9fd0420 100644
--- a/libc/kernel/uapi/linux/kfd_ioctl.h
+++ b/libc/kernel/uapi/linux/kfd_ioctl.h
@@ -21,7 +21,7 @@
 #include <drm/drm.h>
 #include <linux/ioctl.h>
 #define KFD_IOCTL_MAJOR_VERSION 1
-#define KFD_IOCTL_MINOR_VERSION 11
+#define KFD_IOCTL_MINOR_VERSION 12
 struct kfd_ioctl_get_version_args {
   __u32 major_version;
   __u32 minor_version;
@@ -294,6 +294,11 @@
   __u32 gpu_id;
   __u32 dmabuf_fd;
 };
+struct kfd_ioctl_export_dmabuf_args {
+  __u64 handle;
+  __u32 flags;
+  __u32 dmabuf_fd;
+};
 enum kfd_smi_event {
   KFD_SMI_EVENT_NONE = 0,
   KFD_SMI_EVENT_VMFAULT = 1,
@@ -451,6 +456,7 @@
 #define AMDKFD_IOC_SET_XNACK_MODE AMDKFD_IOWR(0x21, struct kfd_ioctl_set_xnack_mode_args)
 #define AMDKFD_IOC_CRIU_OP AMDKFD_IOWR(0x22, struct kfd_ioctl_criu_args)
 #define AMDKFD_IOC_AVAILABLE_MEMORY AMDKFD_IOWR(0x23, struct kfd_ioctl_get_available_memory_args)
+#define AMDKFD_IOC_EXPORT_DMABUF AMDKFD_IOWR(0x24, struct kfd_ioctl_export_dmabuf_args)
 #define AMDKFD_COMMAND_START 0x01
-#define AMDKFD_COMMAND_END 0x24
+#define AMDKFD_COMMAND_END 0x25
 #endif
diff --git a/libc/kernel/uapi/linux/kvm.h b/libc/kernel/uapi/linux/kvm.h
index 9d33399..4101587 100644
--- a/libc/kernel/uapi/linux/kvm.h
+++ b/libc/kernel/uapi/linux/kvm.h
@@ -265,8 +265,10 @@
       __u64 nr;
       __u64 args[6];
       __u64 ret;
-      __u32 longmode;
-      __u32 pad;
+      union {
+        __u32 longmode;
+        __u64 flags;
+      };
     } hypercall;
     struct {
       __u64 rip;
@@ -436,6 +438,8 @@
     struct {
       __u8 ar;
       __u8 key;
+      __u8 pad1[6];
+      __u64 old_addr;
     };
     __u32 sida_offset;
     __u8 reserved[32];
@@ -447,9 +451,12 @@
 #define KVM_S390_MEMOP_SIDA_WRITE 3
 #define KVM_S390_MEMOP_ABSOLUTE_READ 4
 #define KVM_S390_MEMOP_ABSOLUTE_WRITE 5
+#define KVM_S390_MEMOP_ABSOLUTE_CMPXCHG 6
 #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
 #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
 #define KVM_S390_MEMOP_F_SKEY_PROTECTION (1ULL << 2)
+#define KVM_S390_MEMOP_EXTENSION_CAP_BASE (1 << 0)
+#define KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG (1 << 1)
 struct kvm_interrupt {
   __u32 irq;
 };
@@ -926,6 +933,8 @@
 #define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223
 #define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224
 #define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225
+#define KVM_CAP_PMU_EVENT_MASKED_EVENTS 226
+#define KVM_CAP_COUNTER_OFFSET 227
 #ifdef KVM_CAP_IRQ_ROUTING
 struct kvm_irq_routing_irqchip {
   __u32 irqchip;
@@ -1192,6 +1201,7 @@
 #define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter)
 #define KVM_PPC_SVM_OFF _IO(KVMIO, 0xb3)
 #define KVM_ARM_MTE_COPY_TAGS _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags)
+#define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset)
 #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
 #define KVM_SET_DEVICE_ATTR _IOW(KVMIO, 0xe1, struct kvm_device_attr)
 #define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr)
diff --git a/libc/kernel/uapi/linux/mdio.h b/libc/kernel/uapi/linux/mdio.h
index 7a2c9af..725eb1a 100644
--- a/libc/kernel/uapi/linux/mdio.h
+++ b/libc/kernel/uapi/linux/mdio.h
@@ -78,6 +78,8 @@
 #define MDIO_AN_T1_LP_L 517
 #define MDIO_AN_T1_LP_M 518
 #define MDIO_AN_T1_LP_H 519
+#define MDIO_AN_10BT1_AN_CTRL 526
+#define MDIO_AN_10BT1_AN_STAT 527
 #define MDIO_PMA_PMD_BT1_CTRL 2100
 #define MDIO_PMA_LASI_RXCTRL 0x9000
 #define MDIO_PMA_LASI_TXCTRL 0x9001
@@ -270,6 +272,8 @@
 #define MDIO_AN_T1_LP_M_B10L 0x4000
 #define MDIO_AN_T1_LP_H_10L_TX_HI_REQ 0x1000
 #define MDIO_AN_T1_LP_H_10L_TX_HI 0x2000
+#define MDIO_AN_10BT1_AN_CTRL_ADV_EEE_T1L 0x4000
+#define MDIO_AN_10BT1_AN_STAT_LPA_EEE_T1L 0x4000
 #define MDIO_PMA_PMD_BT1_CTRL_CFG_MST 0x4000
 #define MDIO_AN_EEE_ADV_100TX 0x0002
 #define MDIO_AN_EEE_ADV_1000T 0x0004
diff --git a/libc/kernel/uapi/linux/media-bus-format.h b/libc/kernel/uapi/linux/media-bus-format.h
index 87614cf..79d4cd5 100644
--- a/libc/kernel/uapi/linux/media-bus-format.h
+++ b/libc/kernel/uapi/linux/media-bus-format.h
@@ -30,8 +30,11 @@
 #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
 #define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
 #define MEDIA_BUS_FMT_RGB666_1X18 0x1009
+#define MEDIA_BUS_FMT_BGR666_1X18 0x1023
 #define MEDIA_BUS_FMT_RBG888_1X24 0x100e
 #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
+#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI 0x1024
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022
 #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
 #define MEDIA_BUS_FMT_BGR888_1X24 0x1013
 #define MEDIA_BUS_FMT_BGR888_3X8 0x101b
diff --git a/libc/kernel/uapi/linux/mei.h b/libc/kernel/uapi/linux/mei.h
index ed37abd..3d4ae66 100644
--- a/libc/kernel/uapi/linux/mei.h
+++ b/libc/kernel/uapi/linux/mei.h
@@ -18,7 +18,7 @@
  ****************************************************************************/
 #ifndef _LINUX_MEI_H
 #define _LINUX_MEI_H
-#include <linux/uuid.h>
+#include <linux/mei_uuid.h>
 #define IOCTL_MEI_CONNECT_CLIENT _IOWR('H', 0x01, struct mei_connect_client_data)
 struct mei_client {
   __u32 max_msg_length;
diff --git a/libc/kernel/uapi/linux/mei_uuid.h b/libc/kernel/uapi/linux/mei_uuid.h
new file mode 100644
index 0000000..17f6e55
--- /dev/null
+++ b/libc/kernel/uapi/linux/mei_uuid.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_MEI_UUID_H_
+#define _UAPI_LINUX_MEI_UUID_H_
+#include <linux/types.h>
+typedef struct {
+  __u8 b[16];
+} uuid_le;
+#define UUID_LE(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
+((uuid_le) \
+{ { (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, (b) & 0xff, ((b) >> 8) & 0xff, (c) & 0xff, ((c) >> 8) & 0xff, (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } })
+#define NULL_UUID_LE UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
+#endif
diff --git a/libc/kernel/uapi/linux/membarrier.h b/libc/kernel/uapi/linux/membarrier.h
index 43c103b..94dd797 100644
--- a/libc/kernel/uapi/linux/membarrier.h
+++ b/libc/kernel/uapi/linux/membarrier.h
@@ -29,6 +29,7 @@
   MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = (1 << 6),
   MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = (1 << 7),
   MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = (1 << 8),
+  MEMBARRIER_CMD_GET_REGISTRATIONS = (1 << 9),
   MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL,
 };
 enum membarrier_cmd_flag {
diff --git a/libc/kernel/uapi/linux/memfd.h b/libc/kernel/uapi/linux/memfd.h
index 914c076..28228df 100644
--- a/libc/kernel/uapi/linux/memfd.h
+++ b/libc/kernel/uapi/linux/memfd.h
@@ -22,6 +22,8 @@
 #define MFD_CLOEXEC 0x0001U
 #define MFD_ALLOW_SEALING 0x0002U
 #define MFD_HUGETLB 0x0004U
+#define MFD_NOEXEC_SEAL 0x0008U
+#define MFD_EXEC 0x0010U
 #define MFD_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
 #define MFD_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK
 #define MFD_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB
diff --git a/libc/kernel/uapi/linux/meye.h b/libc/kernel/uapi/linux/meye.h
deleted file mode 100644
index a1112c4..0000000
--- a/libc/kernel/uapi/linux/meye.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   This header was automatically generated from a Linux kernel header
- ***   of the same name, to make information necessary for userspace to
- ***   call into the kernel available to libc.  It contains only constants,
- ***   structures, and macros generated from the original header, and thus,
- ***   contains no copyrightable information.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _MEYE_H_
-#define _MEYE_H_
-struct meye_params {
-  unsigned char subsample;
-  unsigned char quality;
-  unsigned char sharpness;
-  unsigned char agc;
-  unsigned char picture;
-  unsigned char framerate;
-};
-#define MEYEIOC_G_PARAMS _IOR('v', BASE_VIDIOC_PRIVATE + 0, struct meye_params)
-#define MEYEIOC_S_PARAMS _IOW('v', BASE_VIDIOC_PRIVATE + 1, struct meye_params)
-#define MEYEIOC_QBUF_CAPT _IOW('v', BASE_VIDIOC_PRIVATE + 2, int)
-#define MEYEIOC_SYNC _IOWR('v', BASE_VIDIOC_PRIVATE + 3, int)
-#define MEYEIOC_STILLCAPT _IO('v', BASE_VIDIOC_PRIVATE + 4)
-#define MEYEIOC_STILLJCAPT _IOR('v', BASE_VIDIOC_PRIVATE + 5, int)
-#define V4L2_CID_MEYE_AGC (V4L2_CID_USER_MEYE_BASE + 0)
-#define V4L2_CID_MEYE_PICTURE (V4L2_CID_USER_MEYE_BASE + 1)
-#define V4L2_CID_MEYE_FRAMERATE (V4L2_CID_USER_MEYE_BASE + 2)
-#endif
diff --git a/libc/kernel/uapi/linux/nbd.h b/libc/kernel/uapi/linux/nbd.h
index 3b74393..fee4b74 100644
--- a/libc/kernel/uapi/linux/nbd.h
+++ b/libc/kernel/uapi/linux/nbd.h
@@ -51,13 +51,19 @@
 struct nbd_request {
   __be32 magic;
   __be32 type;
-  char handle[8];
+  union {
+    __be64 cookie;
+    char handle[8];
+  };
   __be64 from;
   __be32 len;
 } __attribute__((packed));
 struct nbd_reply {
   __be32 magic;
   __be32 error;
-  char handle[8];
+  union {
+    __be64 cookie;
+    char handle[8];
+  };
 };
 #endif
diff --git a/libc/kernel/uapi/linux/netdev.h b/libc/kernel/uapi/linux/netdev.h
new file mode 100644
index 0000000..53a237b
--- /dev/null
+++ b/libc/kernel/uapi/linux/netdev.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_NETDEV_H
+#define _UAPI_LINUX_NETDEV_H
+#define NETDEV_FAMILY_NAME "netdev"
+#define NETDEV_FAMILY_VERSION 1
+enum netdev_xdp_act {
+  NETDEV_XDP_ACT_BASIC = 1,
+  NETDEV_XDP_ACT_REDIRECT = 2,
+  NETDEV_XDP_ACT_NDO_XMIT = 4,
+  NETDEV_XDP_ACT_XSK_ZEROCOPY = 8,
+  NETDEV_XDP_ACT_HW_OFFLOAD = 16,
+  NETDEV_XDP_ACT_RX_SG = 32,
+  NETDEV_XDP_ACT_NDO_XMIT_SG = 64,
+  NETDEV_XDP_ACT_MASK = 127,
+};
+enum {
+  NETDEV_A_DEV_IFINDEX = 1,
+  NETDEV_A_DEV_PAD,
+  NETDEV_A_DEV_XDP_FEATURES,
+  __NETDEV_A_DEV_MAX,
+  NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1)
+};
+enum {
+  NETDEV_CMD_DEV_GET = 1,
+  NETDEV_CMD_DEV_ADD_NTF,
+  NETDEV_CMD_DEV_DEL_NTF,
+  NETDEV_CMD_DEV_CHANGE_NTF,
+  __NETDEV_CMD_MAX,
+  NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)
+};
+#define NETDEV_MCGRP_MGMT "mgmt"
+#endif
diff --git a/libc/kernel/uapi/linux/netfilter/nf_tables.h b/libc/kernel/uapi/linux/netfilter/nf_tables.h
index f07d7c7..1feec33 100644
--- a/libc/kernel/uapi/linux/netfilter/nf_tables.h
+++ b/libc/kernel/uapi/linux/netfilter/nf_tables.h
@@ -87,6 +87,13 @@
   NFT_MSG_GETFLOWTABLE,
   NFT_MSG_DELFLOWTABLE,
   NFT_MSG_GETRULE_RESET,
+  NFT_MSG_DESTROYTABLE,
+  NFT_MSG_DESTROYCHAIN,
+  NFT_MSG_DESTROYRULE,
+  NFT_MSG_DESTROYSET,
+  NFT_MSG_DESTROYSETELEM,
+  NFT_MSG_DESTROYOBJ,
+  NFT_MSG_DESTROYFLOWTABLE,
   NFT_MSG_MAX,
 };
 enum nft_list_attributes {
@@ -493,6 +500,7 @@
   NFT_META_TIME_HOUR,
   NFT_META_SDIF,
   NFT_META_SDIFNAME,
+  NFT_META_BRI_BROUTE,
   __NFT_META_IIFTYPE,
 };
 enum nft_rt_keys {
diff --git a/libc/kernel/uapi/linux/netfilter/nfnetlink_hook.h b/libc/kernel/uapi/linux/netfilter/nfnetlink_hook.h
index ce1692c..702917d 100644
--- a/libc/kernel/uapi/linux/netfilter/nfnetlink_hook.h
+++ b/libc/kernel/uapi/linux/netfilter/nfnetlink_hook.h
@@ -50,5 +50,12 @@
 #define NFNLA_CHAIN_MAX (__NFNLA_CHAIN_MAX - 1)
 enum nfnl_hook_chaintype {
   NFNL_HOOK_TYPE_NFTABLES = 0x1,
+  NFNL_HOOK_TYPE_BPF,
 };
+enum nfnl_hook_bpf_attributes {
+  NFNLA_HOOK_BPF_UNSPEC,
+  NFNLA_HOOK_BPF_ID,
+  __NFNLA_HOOK_BPF_MAX,
+};
+#define NFNLA_HOOK_BPF_MAX (__NFNLA_HOOK_BPF_MAX - 1)
 #endif
diff --git a/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h b/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h
index d100dec..c2d62ba 100644
--- a/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h
+++ b/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h
@@ -71,6 +71,7 @@
   NFQA_VLAN,
   NFQA_L2HDR,
   NFQA_PRIORITY,
+  NFQA_CGROUP_CLASSID,
   __NFQA_MAX
 };
 #define NFQA_MAX (__NFQA_MAX - 1)
diff --git a/libc/kernel/uapi/linux/nfsd/export.h b/libc/kernel/uapi/linux/nfsd/export.h
index 4716fb1..63ccedc 100644
--- a/libc/kernel/uapi/linux/nfsd/export.h
+++ b/libc/kernel/uapi/linux/nfsd/export.h
@@ -41,4 +41,9 @@
 #define NFSEXP_PNFS 0x20000
 #define NFSEXP_ALLFLAGS 0x3FEFF
 #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH | NFSEXP_ALLSQUASH | NFSEXP_INSECURE_PORT)
+#define NFSEXP_XPRTSEC_NONE 0x0001
+#define NFSEXP_XPRTSEC_TLS 0x0002
+#define NFSEXP_XPRTSEC_MTLS 0x0004
+#define NFSEXP_XPRTSEC_NUM (3)
+#define NFSEXP_XPRTSEC_ALL (NFSEXP_XPRTSEC_NONE | NFSEXP_XPRTSEC_TLS | NFSEXP_XPRTSEC_MTLS)
 #endif
diff --git a/libc/kernel/uapi/linux/nl80211.h b/libc/kernel/uapi/linux/nl80211.h
index 83fe597..32ec521 100644
--- a/libc/kernel/uapi/linux/nl80211.h
+++ b/libc/kernel/uapi/linux/nl80211.h
@@ -190,6 +190,7 @@
   NL80211_CMD_ADD_LINK_STA,
   NL80211_CMD_MODIFY_LINK_STA,
   NL80211_CMD_REMOVE_LINK_STA,
+  NL80211_CMD_SET_HW_TIMESTAMP,
   __NL80211_CMD_AFTER_LAST,
   NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
 };
@@ -528,6 +529,10 @@
   NL80211_ATTR_TX_HW_TIMESTAMP,
   NL80211_ATTR_RX_HW_TIMESTAMP,
   NL80211_ATTR_TD_BITMAP,
+  NL80211_ATTR_PUNCT_BITMAP,
+  NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS,
+  NL80211_ATTR_HW_TIMESTAMP_ENABLED,
+  NL80211_ATTR_EMA_RNR_ELEMS,
   __NL80211_ATTR_AFTER_LAST,
   NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
   NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
@@ -821,6 +826,8 @@
   NL80211_BAND_ATTR_IFTYPE_DATA,
   NL80211_BAND_ATTR_EDMG_CHANNELS,
   NL80211_BAND_ATTR_EDMG_BW_CONFIG,
+  NL80211_BAND_ATTR_S1G_MCS_NSS_SET,
+  NL80211_BAND_ATTR_S1G_CAPA,
   __NL80211_BAND_ATTR_AFTER_LAST,
   NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
 };
@@ -1396,6 +1403,7 @@
 #define NL80211_KEK_LEN 16
 #define NL80211_KCK_EXT_LEN 24
 #define NL80211_KEK_EXT_LEN 32
+#define NL80211_KCK_EXT_LEN_32 32
 #define NL80211_REPLAY_CTR_LEN 8
 enum nl80211_rekey_data {
   __NL80211_REKEY_DATA_INVALID,
@@ -1533,6 +1541,9 @@
   NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
   NL80211_EXT_FEATURE_RADAR_BACKGROUND,
   NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
+  NL80211_EXT_FEATURE_PUNCT,
+  NL80211_EXT_FEATURE_SECURE_NAN,
+  NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA,
   NUM_NL80211_EXT_FEATURES,
   MAX_NL80211_EXT_FEATURES = NUM_NL80211_EXT_FEATURES - 1
 };
diff --git a/libc/kernel/uapi/linux/parport.h b/libc/kernel/uapi/linux/parport.h
index 8152224..611775f 100644
--- a/libc/kernel/uapi/linux/parport.h
+++ b/libc/kernel/uapi/linux/parport.h
@@ -75,4 +75,7 @@
 #define IEEE1284_DATA 0
 #define PARPORT_EPP_FAST (1 << 0)
 #define PARPORT_W91284PIC (1 << 1)
+#define PARPORT_EPP_FAST_32 PARPORT_EPP_FAST
+#define PARPORT_EPP_FAST_16 (1 << 2)
+#define PARPORT_EPP_FAST_8 (1 << 3)
 #endif
diff --git a/libc/kernel/uapi/linux/pci_regs.h b/libc/kernel/uapi/linux/pci_regs.h
index f932c18..44b0613 100644
--- a/libc/kernel/uapi/linux/pci_regs.h
+++ b/libc/kernel/uapi/linux/pci_regs.h
@@ -594,6 +594,7 @@
 #define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380
 #define PCI_EXP_LNKCTL2_HASD 0x0020
 #define PCI_EXP_LNKSTA2 0x32
+#define PCI_EXP_LNKSTA2_FLIT 0x0400
 #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32
 #define PCI_EXP_SLTCAP2 0x34
 #define PCI_EXP_SLTCAP2_IBPD 0x00000001
diff --git a/libc/kernel/uapi/linux/perf_event.h b/libc/kernel/uapi/linux/perf_event.h
index 8f081ed..9223bd7 100644
--- a/libc/kernel/uapi/linux/perf_event.h
+++ b/libc/kernel/uapi/linux/perf_event.h
@@ -237,6 +237,7 @@
 #define PERF_ATTR_SIZE_VER5 112
 #define PERF_ATTR_SIZE_VER6 120
 #define PERF_ATTR_SIZE_VER7 128
+#define PERF_ATTR_SIZE_VER8 136
 struct perf_event_attr {
   __u32 type;
   __u32 size;
@@ -276,6 +277,7 @@
   __u32 aux_sample_size;
   __u32 __reserved_3;
   __u64 sig_data;
+  __u64 config3;
 };
 struct perf_event_query_bpf {
   __u32 ids_len;
diff --git a/libc/kernel/uapi/linux/pkt_sched.h b/libc/kernel/uapi/linux/pkt_sched.h
index c31b8bb..8d561a4 100644
--- a/libc/kernel/uapi/linux/pkt_sched.h
+++ b/libc/kernel/uapi/linux/pkt_sched.h
@@ -532,6 +532,10 @@
   __TC_MQPRIO_SHAPER_MAX
 };
 #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1)
+enum {
+  TC_FP_EXPRESS = 1,
+  TC_FP_PREEMPTIBLE = 2,
+};
 struct tc_mqprio_qopt {
   __u8 num_tc;
   __u8 prio_tc_map[TC_QOPT_BITMASK + 1];
@@ -544,11 +548,19 @@
 #define TC_MQPRIO_F_MIN_RATE 0x4
 #define TC_MQPRIO_F_MAX_RATE 0x8
 enum {
+  TCA_MQPRIO_TC_ENTRY_UNSPEC,
+  TCA_MQPRIO_TC_ENTRY_INDEX,
+  TCA_MQPRIO_TC_ENTRY_FP,
+  __TCA_MQPRIO_TC_ENTRY_CNT,
+  TCA_MQPRIO_TC_ENTRY_MAX = (__TCA_MQPRIO_TC_ENTRY_CNT - 1)
+};
+enum {
   TCA_MQPRIO_UNSPEC,
   TCA_MQPRIO_MODE,
   TCA_MQPRIO_SHAPER,
   TCA_MQPRIO_MIN_RATE64,
   TCA_MQPRIO_MAX_RATE64,
+  TCA_MQPRIO_TC_ENTRY,
   __TCA_MQPRIO_MAX,
 };
 #define TCA_MQPRIO_MAX (__TCA_MQPRIO_MAX - 1)
@@ -927,6 +939,7 @@
   TCA_TAPRIO_TC_ENTRY_UNSPEC,
   TCA_TAPRIO_TC_ENTRY_INDEX,
   TCA_TAPRIO_TC_ENTRY_MAX_SDU,
+  TCA_TAPRIO_TC_ENTRY_FP,
   __TCA_TAPRIO_TC_ENTRY_CNT,
   TCA_TAPRIO_TC_ENTRY_MAX = (__TCA_TAPRIO_TC_ENTRY_CNT - 1)
 };
diff --git a/libc/kernel/uapi/linux/pktcdvd.h b/libc/kernel/uapi/linux/pktcdvd.h
index eed22f8..c2414d1 100644
--- a/libc/kernel/uapi/linux/pktcdvd.h
+++ b/libc/kernel/uapi/linux/pktcdvd.h
@@ -23,7 +23,6 @@
 #define MAX_WRITERS 8
 #define PKT_RB_POOL_SIZE 512
 #define PACKET_WAIT_TIME (HZ * 5 / 1000)
-#define USE_WCACHING 0
 #define PACKET_CDR 1
 #define PACKET_CDRW 2
 #define PACKET_DVDR 3
diff --git a/libc/kernel/uapi/linux/prctl.h b/libc/kernel/uapi/linux/prctl.h
index 1dac726..ccab000 100644
--- a/libc/kernel/uapi/linux/prctl.h
+++ b/libc/kernel/uapi/linux/prctl.h
@@ -184,6 +184,12 @@
 #define PR_SME_GET_VL 64
 #define PR_SME_VL_LEN_MASK 0xffff
 #define PR_SME_VL_INHERIT (1 << 17)
+#define PR_SET_MDWE 65
+#define PR_MDWE_REFUSE_EXEC_GAIN 1
+#define PR_GET_MDWE 66
 #define PR_SET_VMA 0x53564d41
 #define PR_SET_VMA_ANON_NAME 0
+#define PR_GET_AUXV 0x41555856
+#define PR_SET_MEMORY_MERGE 67
+#define PR_GET_MEMORY_MERGE 68
 #endif
diff --git a/libc/kernel/uapi/linux/psp-sev.h b/libc/kernel/uapi/linux/psp-sev.h
index 8c9ec80..5aefc1c 100644
--- a/libc/kernel/uapi/linux/psp-sev.h
+++ b/libc/kernel/uapi/linux/psp-sev.h
@@ -32,6 +32,7 @@
   SEV_MAX,
 };
 typedef enum {
+  SEV_RET_NO_FW_CALL = - 1,
   SEV_RET_SUCCESS = 0,
   SEV_RET_INVALID_PLATFORM_STATE,
   SEV_RET_INVALID_GUEST_STATE,
diff --git a/libc/kernel/uapi/linux/ptrace.h b/libc/kernel/uapi/linux/ptrace.h
index 4bfa59a..56a350b 100644
--- a/libc/kernel/uapi/linux/ptrace.h
+++ b/libc/kernel/uapi/linux/ptrace.h
@@ -90,6 +90,14 @@
   __u32 flags;
   __u32 pad;
 };
+#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG 0x4210
+#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG 0x4211
+struct ptrace_sud_config {
+  __u64 mode;
+  __u64 selector;
+  __u64 offset;
+  __u64 len;
+};
 #define PTRACE_EVENTMSG_SYSCALL_ENTRY 1
 #define PTRACE_EVENTMSG_SYSCALL_EXIT 2
 #define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
diff --git a/libc/kernel/uapi/linux/rpl.h b/libc/kernel/uapi/linux/rpl.h
index 3648bfc..4226297 100644
--- a/libc/kernel/uapi/linux/rpl.h
+++ b/libc/kernel/uapi/linux/rpl.h
@@ -34,8 +34,8 @@
 #error "Please fix <asm/byteorder.h>"
 #endif
   union {
-    struct in6_addr addr[0];
-    __u8 data[0];
+    __DECLARE_FLEX_ARRAY(struct in6_addr, addr);
+    __DECLARE_FLEX_ARRAY(__u8, data);
   } segments;
 } __attribute__((packed));
 #define rpl_segaddr segments.addr
diff --git a/libc/kernel/uapi/linux/rseq.h b/libc/kernel/uapi/linux/rseq.h
index 29a9457..f837720 100644
--- a/libc/kernel/uapi/linux/rseq.h
+++ b/libc/kernel/uapi/linux/rseq.h
@@ -49,5 +49,8 @@
   __u32 cpu_id;
   __u64 rseq_cs;
   __u32 flags;
+  __u32 node_id;
+  __u32 mm_cid;
+  char end[];
 } __attribute__((aligned(4 * sizeof(__u64))));
 #endif
diff --git a/libc/kernel/uapi/linux/rtnetlink.h b/libc/kernel/uapi/linux/rtnetlink.h
index 7201827..335a19a 100644
--- a/libc/kernel/uapi/linux/rtnetlink.h
+++ b/libc/kernel/uapi/linux/rtnetlink.h
@@ -463,6 +463,7 @@
   TCA_INGRESS_BLOCK,
   TCA_EGRESS_BLOCK,
   TCA_DUMP_FLAGS,
+  TCA_EXT_WARN_MSG,
   __TCA_MAX
 };
 #define TCA_MAX (__TCA_MAX - 1)
@@ -589,6 +590,7 @@
   TCA_ROOT_FLAGS,
   TCA_ROOT_COUNT,
   TCA_ROOT_TIME_DELTA,
+  TCA_ROOT_EXT_WARN_MSG,
   __TCA_ROOT_MAX,
 #define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
 };
diff --git a/libc/kernel/uapi/linux/sctp.h b/libc/kernel/uapi/linux/sctp.h
index 4bf2412..b1a571c 100644
--- a/libc/kernel/uapi/linux/sctp.h
+++ b/libc/kernel/uapi/linux/sctp.h
@@ -709,7 +709,9 @@
   SCTP_SS_DEFAULT = SCTP_SS_FCFS,
   SCTP_SS_PRIO,
   SCTP_SS_RR,
-  SCTP_SS_MAX = SCTP_SS_RR
+  SCTP_SS_FC,
+  SCTP_SS_WFQ,
+  SCTP_SS_MAX = SCTP_SS_WFQ
 };
 struct sctp_probeinterval {
   sctp_assoc_t spi_assoc_id;
diff --git a/libc/kernel/uapi/linux/sed-opal.h b/libc/kernel/uapi/linux/sed-opal.h
index 4c66231..fa1d7ed 100644
--- a/libc/kernel/uapi/linux/sed-opal.h
+++ b/libc/kernel/uapi/linux/sed-opal.h
@@ -74,6 +74,15 @@
   __u32 WLE;
   struct opal_session_info session;
 };
+struct opal_lr_status {
+  struct opal_session_info session;
+  __u64 range_start;
+  __u64 range_length;
+  __u32 RLE;
+  __u32 WLE;
+  __u32 l_state;
+  __u8 align[4];
+};
 struct opal_lock_unlock {
   struct opal_session_info session;
   __u32 l_state;
@@ -122,10 +131,18 @@
 #define OPAL_FL_LOCKED 0x00000008
 #define OPAL_FL_MBR_ENABLED 0x00000010
 #define OPAL_FL_MBR_DONE 0x00000020
+#define OPAL_FL_SUM_SUPPORTED 0x00000040
 struct opal_status {
   __u32 flags;
   __u32 reserved;
 };
+struct opal_geometry {
+  __u8 align;
+  __u32 logical_block_size;
+  __u64 alignment_granularity;
+  __u64 lowest_aligned_lba;
+  __u8 __align[3];
+};
 #define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
 #define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
 #define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -143,4 +160,6 @@
 #define IOC_OPAL_WRITE_SHADOW_MBR _IOW('p', 234, struct opal_shadow_mbr)
 #define IOC_OPAL_GENERIC_TABLE_RW _IOW('p', 235, struct opal_read_write_table)
 #define IOC_OPAL_GET_STATUS _IOR('p', 236, struct opal_status)
+#define IOC_OPAL_GET_LR_STATUS _IOW('p', 237, struct opal_lr_status)
+#define IOC_OPAL_GET_GEOMETRY _IOR('p', 238, struct opal_geometry)
 #endif
diff --git a/libc/kernel/uapi/linux/serial_core.h b/libc/kernel/uapi/linux/serial_core.h
index 1e04429..ecd395c 100644
--- a/libc/kernel/uapi/linux/serial_core.h
+++ b/libc/kernel/uapi/linux/serial_core.h
@@ -99,6 +99,7 @@
 #define PORT_VT8500 97
 #define PORT_XUARTPS 98
 #define PORT_AR933X 99
+#define PORT_MCHP16550A 100
 #define PORT_ARC 101
 #define PORT_RP2 102
 #define PORT_LPUART 103
diff --git a/libc/kernel/uapi/linux/serial_reg.h b/libc/kernel/uapi/linux/serial_reg.h
index e41e649..36d778d 100644
--- a/libc/kernel/uapi/linux/serial_reg.h
+++ b/libc/kernel/uapi/linux/serial_reg.h
@@ -37,6 +37,11 @@
 #define UART_IIR_RX_TIMEOUT 0x0c
 #define UART_IIR_XOFF 0x10
 #define UART_IIR_CTS_RTS_DSR 0x20
+#define UART_IIR_64BYTE_FIFO 0x20
+#define UART_IIR_FIFO_ENABLED 0xc0
+#define UART_IIR_FIFO_ENABLED_8250 0x00
+#define UART_IIR_FIFO_ENABLED_16550 0x80
+#define UART_IIR_FIFO_ENABLED_16550A 0xc0
 #define UART_FCR 2
 #define UART_FCR_ENABLE_FIFO 0x01
 #define UART_FCR_CLEAR_RCVR 0x02
diff --git a/libc/kernel/uapi/linux/sev-guest.h b/libc/kernel/uapi/linux/sev-guest.h
index 796479a..3e8c0bf 100644
--- a/libc/kernel/uapi/linux/sev-guest.h
+++ b/libc/kernel/uapi/linux/sev-guest.h
@@ -42,7 +42,13 @@
   __u8 msg_version;
   __u64 req_data;
   __u64 resp_data;
-  __u64 fw_err;
+  union {
+    __u64 exitinfo2;
+    struct {
+      __u32 fw_error;
+      __u32 vmm_error;
+    };
+  };
 };
 struct snp_ext_report_req {
   struct snp_report_req data;
@@ -53,4 +59,9 @@
 #define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl)
 #define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl)
 #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl)
+#define SNP_GUEST_FW_ERR_MASK GENMASK_ULL(31, 0)
+#define SNP_GUEST_VMM_ERR_SHIFT 32
+#define SNP_GUEST_VMM_ERR(x) (((u64) x) << SNP_GUEST_VMM_ERR_SHIFT)
+#define SNP_GUEST_VMM_ERR_INVALID_LEN 1
+#define SNP_GUEST_VMM_ERR_BUSY 2
 #endif
diff --git a/libc/kernel/uapi/linux/snmp.h b/libc/kernel/uapi/linux/snmp.h
index e3d6ee3..ea3f058 100644
--- a/libc/kernel/uapi/linux/snmp.h
+++ b/libc/kernel/uapi/linux/snmp.h
@@ -87,6 +87,8 @@
   ICMP_MIB_OUTADDRMASKS,
   ICMP_MIB_OUTADDRMASKREPS,
   ICMP_MIB_CSUMERRORS,
+  ICMP_MIB_RATELIMITGLOBAL,
+  ICMP_MIB_RATELIMITHOST,
   __ICMP_MIB_MAX
 };
 #define __ICMPMSG_MIB_MAX 512
@@ -97,6 +99,7 @@
   ICMP6_MIB_OUTMSGS,
   ICMP6_MIB_OUTERRORS,
   ICMP6_MIB_CSUMERRORS,
+  ICMP6_MIB_RATELIMITHOST,
   __ICMP6_MIB_MAX
 };
 #define __ICMP6MSG_MIB_MAX 512
diff --git a/libc/kernel/uapi/linux/target_core_user.h b/libc/kernel/uapi/linux/target_core_user.h
index 83e155e..84af2d2 100644
--- a/libc/kernel/uapi/linux/target_core_user.h
+++ b/libc/kernel/uapi/linux/target_core_user.h
@@ -61,7 +61,7 @@
       __u64 cdb_off;
       __u64 __pad1;
       __u64 __pad2;
-      struct iovec iov[0];
+      __DECLARE_FLEX_ARRAY(struct iovec, iov);
     } req;
     struct {
       __u8 scsi_status;
diff --git a/libc/kernel/uapi/linux/taskstats.h b/libc/kernel/uapi/linux/taskstats.h
index c1cda52..4f1637e 100644
--- a/libc/kernel/uapi/linux/taskstats.h
+++ b/libc/kernel/uapi/linux/taskstats.h
@@ -19,7 +19,7 @@
 #ifndef _LINUX_TASKSTATS_H
 #define _LINUX_TASKSTATS_H
 #include <linux/types.h>
-#define TASKSTATS_VERSION 13
+#define TASKSTATS_VERSION 14
 #define TS_COMM_LEN 32
 struct taskstats {
   __u16 version;
@@ -77,6 +77,8 @@
   __u64 ac_exe_inode;
   __u64 wpcopy_count;
   __u64 wpcopy_delay_total;
+  __u64 irq_count;
+  __u64 irq_delay_total;
 };
 enum {
   TASKSTATS_CMD_UNSPEC = 0,
diff --git a/libc/kernel/uapi/linux/tc_act/tc_tunnel_key.h b/libc/kernel/uapi/linux/tc_act/tc_tunnel_key.h
index e137ae8..7eb61e8 100644
--- a/libc/kernel/uapi/linux/tc_act/tc_tunnel_key.h
+++ b/libc/kernel/uapi/linux/tc_act/tc_tunnel_key.h
@@ -40,6 +40,7 @@
   TCA_TUNNEL_KEY_ENC_OPTS,
   TCA_TUNNEL_KEY_ENC_TOS,
   TCA_TUNNEL_KEY_ENC_TTL,
+  TCA_TUNNEL_KEY_NO_FRAG,
   __TCA_TUNNEL_KEY_MAX,
 };
 #define TCA_TUNNEL_KEY_MAX (__TCA_TUNNEL_KEY_MAX - 1)
diff --git a/libc/kernel/uapi/linux/ublk_cmd.h b/libc/kernel/uapi/linux/ublk_cmd.h
index 8c9cbeb..2d4f422 100644
--- a/libc/kernel/uapi/linux/ublk_cmd.h
+++ b/libc/kernel/uapi/linux/ublk_cmd.h
@@ -29,9 +29,24 @@
 #define UBLK_CMD_GET_PARAMS 0x09
 #define UBLK_CMD_START_USER_RECOVERY 0x10
 #define UBLK_CMD_END_USER_RECOVERY 0x11
+#define UBLK_CMD_GET_DEV_INFO2 0x12
+#define UBLK_U_CMD_GET_QUEUE_AFFINITY _IOR('u', UBLK_CMD_GET_QUEUE_AFFINITY, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_GET_DEV_INFO _IOR('u', UBLK_CMD_GET_DEV_INFO, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_ADD_DEV _IOWR('u', UBLK_CMD_ADD_DEV, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_DEL_DEV _IOWR('u', UBLK_CMD_DEL_DEV, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_START_DEV _IOWR('u', UBLK_CMD_START_DEV, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_STOP_DEV _IOWR('u', UBLK_CMD_STOP_DEV, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_SET_PARAMS _IOWR('u', UBLK_CMD_SET_PARAMS, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_GET_PARAMS _IOR('u', UBLK_CMD_GET_PARAMS, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_START_USER_RECOVERY _IOWR('u', UBLK_CMD_START_USER_RECOVERY, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_END_USER_RECOVERY _IOWR('u', UBLK_CMD_END_USER_RECOVERY, struct ublksrv_ctrl_cmd)
+#define UBLK_U_CMD_GET_DEV_INFO2 _IOR('u', UBLK_CMD_GET_DEV_INFO2, struct ublksrv_ctrl_cmd)
 #define UBLK_IO_FETCH_REQ 0x20
 #define UBLK_IO_COMMIT_AND_FETCH_REQ 0x21
 #define UBLK_IO_NEED_GET_DATA 0x22
+#define UBLK_U_IO_FETCH_REQ _IOWR('u', UBLK_IO_FETCH_REQ, struct ublksrv_io_cmd)
+#define UBLK_U_IO_COMMIT_AND_FETCH_REQ _IOWR('u', UBLK_IO_COMMIT_AND_FETCH_REQ, struct ublksrv_io_cmd)
+#define UBLK_U_IO_NEED_GET_DATA _IOWR('u', UBLK_IO_NEED_GET_DATA, struct ublksrv_io_cmd)
 #define UBLK_IO_RES_OK 0
 #define UBLK_IO_RES_NEED_GET_DATA 1
 #define UBLK_IO_RES_ABORT (- ENODEV)
@@ -43,6 +58,8 @@
 #define UBLK_F_NEED_GET_DATA (1UL << 2)
 #define UBLK_F_USER_RECOVERY (1UL << 3)
 #define UBLK_F_USER_RECOVERY_REISSUE (1UL << 4)
+#define UBLK_F_UNPRIVILEGED_DEV (1UL << 5)
+#define UBLK_F_CMD_IOCTL_ENCODE (1UL << 6)
 #define UBLK_S_DEV_DEAD 0
 #define UBLK_S_DEV_LIVE 1
 #define UBLK_S_DEV_QUIESCED 2
@@ -51,7 +68,10 @@
   __u16 queue_id;
   __u16 len;
   __u64 addr;
-  __u64 data[2];
+  __u64 data[1];
+  __u16 dev_path_len;
+  __u16 pad;
+  __u32 reserved;
 };
 struct ublksrv_ctrl_dev_info {
   __u16 nr_hw_queues;
@@ -64,7 +84,8 @@
   __u32 pad1;
   __u64 flags;
   __u64 ublksrv_flags;
-  __u64 reserved0;
+  __u32 owner_uid;
+  __u32 owner_gid;
   __u64 reserved1;
   __u64 reserved2;
 };
@@ -116,12 +137,20 @@
   __u16 max_discard_segments;
   __u16 reserved0;
 };
+struct ublk_param_devt {
+  __u32 char_major;
+  __u32 char_minor;
+  __u32 disk_major;
+  __u32 disk_minor;
+};
 struct ublk_params {
   __u32 len;
 #define UBLK_PARAM_TYPE_BASIC (1 << 0)
 #define UBLK_PARAM_TYPE_DISCARD (1 << 1)
+#define UBLK_PARAM_TYPE_DEVT (1 << 2)
   __u32 types;
   struct ublk_param_basic basic;
   struct ublk_param_discard discard;
+  struct ublk_param_devt devt;
 };
 #endif
diff --git a/libc/kernel/uapi/linux/usb/ch9.h b/libc/kernel/uapi/linux/usb/ch9.h
index 49eb5fa..9ddc640 100644
--- a/libc/kernel/uapi/linux/usb/ch9.h
+++ b/libc/kernel/uapi/linux/usb/ch9.h
@@ -417,6 +417,16 @@
   __u8 ContainerID[16];
 } __attribute__((packed));
 #define USB_DT_USB_SS_CONTN_ID_SIZE 20
+#define USB_PLAT_DEV_CAP_TYPE 5
+struct usb_plat_dev_cap_descriptor {
+  __u8 bLength;
+  __u8 bDescriptorType;
+  __u8 bDevCapabilityType;
+  __u8 bReserved;
+  __u8 UUID[16];
+  __u8 CapabilityData[];
+} __attribute__((packed));
+#define USB_DT_USB_PLAT_DEV_CAP_SIZE(capability_data_size) (20 + capability_data_size)
 #define USB_SSP_CAP_TYPE 0xa
 struct usb_ssp_cap_descriptor {
   __u8 bLength;
diff --git a/libc/kernel/uapi/linux/usb/video.h b/libc/kernel/uapi/linux/usb/video.h
index c3d360a..0ceabe7 100644
--- a/libc/kernel/uapi/linux/usb/video.h
+++ b/libc/kernel/uapi/linux/usb/video.h
@@ -139,6 +139,32 @@
 #define UVC_CONTROL_CAP_DISABLED (1 << 2)
 #define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3)
 #define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4)
+enum uvc_color_primaries_values {
+  UVC_COLOR_PRIMARIES_UNSPECIFIED,
+  UVC_COLOR_PRIMARIES_BT_709_SRGB,
+  UVC_COLOR_PRIMARIES_BT_470_2_M,
+  UVC_COLOR_PRIMARIES_BT_470_2_B_G,
+  UVC_COLOR_PRIMARIES_SMPTE_170M,
+  UVC_COLOR_PRIMARIES_SMPTE_240M,
+};
+enum uvc_transfer_characteristics_values {
+  UVC_TRANSFER_CHARACTERISTICS_UNSPECIFIED,
+  UVC_TRANSFER_CHARACTERISTICS_BT_709,
+  UVC_TRANSFER_CHARACTERISTICS_BT_470_2_M,
+  UVC_TRANSFER_CHARACTERISTICS_BT_470_2_B_G,
+  UVC_TRANSFER_CHARACTERISTICS_SMPTE_170M,
+  UVC_TRANSFER_CHARACTERISTICS_SMPTE_240M,
+  UVC_TRANSFER_CHARACTERISTICS_LINEAR,
+  UVC_TRANSFER_CHARACTERISTICS_SRGB,
+};
+enum uvc_matrix_coefficients {
+  UVC_MATRIX_COEFFICIENTS_UNSPECIFIED,
+  UVC_MATRIX_COEFFICIENTS_BT_709,
+  UVC_MATRIX_COEFFICIENTS_FCC,
+  UVC_MATRIX_COEFFICIENTS_BT_470_2_B_G,
+  UVC_MATRIX_COEFFICIENTS_SMPTE_170M,
+  UVC_MATRIX_COEFFICIENTS_SMPTE_240M,
+};
 struct uvc_descriptor_header {
   __u8 bLength;
   __u8 bDescriptorType;
diff --git a/libc/kernel/uapi/linux/user_events.h b/libc/kernel/uapi/linux/user_events.h
new file mode 100644
index 0000000..f26519e
--- /dev/null
+++ b/libc/kernel/uapi/linux/user_events.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_USER_EVENTS_H
+#define _UAPI_LINUX_USER_EVENTS_H
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#define USER_EVENTS_SYSTEM "user_events"
+#define USER_EVENTS_PREFIX "u:"
+#define DYN_LOC(offset,size) ((size) << 16 | (offset))
+struct user_reg {
+  __u32 size;
+  __u8 enable_bit;
+  __u8 enable_size;
+  __u16 flags;
+  __u64 enable_addr;
+  __u64 name_args;
+  __u32 write_index;
+} __attribute__((__packed__));
+struct user_unreg {
+  __u32 size;
+  __u8 disable_bit;
+  __u8 __reserved;
+  __u16 __reserved2;
+  __u64 disable_addr;
+} __attribute__((__packed__));
+#define DIAG_IOC_MAGIC '*'
+#define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *)
+#define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *)
+#define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg *)
+#endif
diff --git a/libc/kernel/uapi/linux/userfaultfd.h b/libc/kernel/uapi/linux/userfaultfd.h
index 09e0d80..816198f 100644
--- a/libc/kernel/uapi/linux/userfaultfd.h
+++ b/libc/kernel/uapi/linux/userfaultfd.h
@@ -23,7 +23,7 @@
 #define USERFAULTFD_IOC_NEW _IO(USERFAULTFD_IOC, 0x00)
 #define UFFD_API ((__u64) 0xAA)
 #define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | UFFDIO_REGISTER_MODE_WP | UFFDIO_REGISTER_MODE_MINOR)
-#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | UFFD_FEATURE_MINOR_SHMEM | UFFD_FEATURE_EXACT_ADDRESS | UFFD_FEATURE_WP_HUGETLBFS_SHMEM)
+#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | UFFD_FEATURE_MINOR_SHMEM | UFFD_FEATURE_EXACT_ADDRESS | UFFD_FEATURE_WP_HUGETLBFS_SHMEM | UFFD_FEATURE_WP_UNPOPULATED)
 #define UFFD_API_IOCTLS ((__u64) 1 << _UFFDIO_REGISTER | (__u64) 1 << _UFFDIO_UNREGISTER | (__u64) 1 << _UFFDIO_API)
 #define UFFD_API_RANGE_IOCTLS ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_ZEROPAGE | (__u64) 1 << _UFFDIO_WRITEPROTECT | (__u64) 1 << _UFFDIO_CONTINUE)
 #define UFFD_API_RANGE_IOCTLS_BASIC ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_CONTINUE | (__u64) 1 << _UFFDIO_WRITEPROTECT)
@@ -99,6 +99,7 @@
 #define UFFD_FEATURE_MINOR_SHMEM (1 << 10)
 #define UFFD_FEATURE_EXACT_ADDRESS (1 << 11)
 #define UFFD_FEATURE_WP_HUGETLBFS_SHMEM (1 << 12)
+#define UFFD_FEATURE_WP_UNPOPULATED (1 << 13)
   __u64 features;
   __u64 ioctls;
 };
@@ -138,6 +139,7 @@
 struct uffdio_continue {
   struct uffdio_range range;
 #define UFFDIO_CONTINUE_MODE_DONTWAKE ((__u64) 1 << 0)
+#define UFFDIO_CONTINUE_MODE_WP ((__u64) 1 << 1)
   __u64 mode;
   __s64 mapped;
 };
diff --git a/libc/kernel/uapi/linux/uuid.h b/libc/kernel/uapi/linux/uuid.h
index d0f82c1..73529c9 100644
--- a/libc/kernel/uapi/linux/uuid.h
+++ b/libc/kernel/uapi/linux/uuid.h
@@ -16,16 +16,4 @@
  ***
  ****************************************************************************
  ****************************************************************************/
-#ifndef _UAPI_LINUX_UUID_H_
-#define _UAPI_LINUX_UUID_H_
-#include <linux/types.h>
-typedef struct {
-  __u8 b[16];
-} guid_t;
-#define GUID_INIT(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
-((guid_t) \
-{ { (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, (b) & 0xff, ((b) >> 8) & 0xff, (c) & 0xff, ((c) >> 8) & 0xff, (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) } })
-typedef guid_t uuid_le;
-#define UUID_LE(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)
-#define NULL_UUID_LE UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
-#endif
+#include <linux/mei_uuid.h>
diff --git a/libc/kernel/uapi/linux/uvcvideo.h b/libc/kernel/uapi/linux/uvcvideo.h
index f15ed78..b63858f 100644
--- a/libc/kernel/uapi/linux/uvcvideo.h
+++ b/libc/kernel/uapi/linux/uvcvideo.h
@@ -36,9 +36,10 @@
 #define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7)
 #define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8)
 #define UVC_CTRL_FLAG_GET_RANGE (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF)
+#define UVC_MENU_NAME_LEN 32
 struct uvc_menu_info {
   __u32 value;
-  __u8 name[32];
+  __u8 name[UVC_MENU_NAME_LEN];
 };
 struct uvc_xu_control_mapping {
   __u32 id;
diff --git a/libc/kernel/uapi/linux/v4l2-subdev.h b/libc/kernel/uapi/linux/v4l2-subdev.h
index 2954dc3..55d7192 100644
--- a/libc/kernel/uapi/linux/v4l2-subdev.h
+++ b/libc/kernel/uapi/linux/v4l2-subdev.h
@@ -18,6 +18,7 @@
  ****************************************************************************/
 #ifndef __LINUX_V4L2_SUBDEV_H
 #define __LINUX_V4L2_SUBDEV_H
+#include <linux/const.h>
 #include <linux/ioctl.h>
 #include <linux/types.h>
 #include <linux/v4l2-common.h>
@@ -30,13 +31,15 @@
   __u32 which;
   __u32 pad;
   struct v4l2_mbus_framefmt format;
-  __u32 reserved[8];
+  __u32 stream;
+  __u32 reserved[7];
 };
 struct v4l2_subdev_crop {
   __u32 which;
   __u32 pad;
   struct v4l2_rect rect;
-  __u32 reserved[8];
+  __u32 stream;
+  __u32 reserved[7];
 };
 #define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
 #define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
@@ -49,7 +52,8 @@
   __u32 code;
   __u32 which;
   __u32 flags;
-  __u32 reserved[7];
+  __u32 stream;
+  __u32 reserved[6];
 };
 struct v4l2_subdev_frame_size_enum {
   __u32 index;
@@ -60,12 +64,14 @@
   __u32 min_height;
   __u32 max_height;
   __u32 which;
-  __u32 reserved[8];
+  __u32 stream;
+  __u32 reserved[7];
 };
 struct v4l2_subdev_frame_interval {
   __u32 pad;
   struct v4l2_fract interval;
-  __u32 reserved[9];
+  __u32 stream;
+  __u32 reserved[8];
 };
 struct v4l2_subdev_frame_interval_enum {
   __u32 index;
@@ -75,7 +81,8 @@
   __u32 height;
   struct v4l2_fract interval;
   __u32 which;
-  __u32 reserved[8];
+  __u32 stream;
+  __u32 reserved[7];
 };
 struct v4l2_subdev_selection {
   __u32 which;
@@ -83,7 +90,8 @@
   __u32 target;
   __u32 flags;
   struct v4l2_rect r;
-  __u32 reserved[8];
+  __u32 stream;
+  __u32 reserved[7];
 };
 struct v4l2_subdev_capability {
   __u32 version;
@@ -91,6 +99,26 @@
   __u32 reserved[14];
 };
 #define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
+#define V4L2_SUBDEV_CAP_STREAMS 0x00000002
+#define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0)
+struct v4l2_subdev_route {
+  __u32 sink_pad;
+  __u32 sink_stream;
+  __u32 source_pad;
+  __u32 source_stream;
+  __u32 flags;
+  __u32 reserved[5];
+};
+struct v4l2_subdev_routing {
+  __u32 which;
+  __u32 num_routes;
+  __u64 routes;
+  __u32 reserved[6];
+};
+#define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0)
+struct v4l2_subdev_client_capability {
+  __u64 capabilities;
+};
 #define v4l2_subdev_edid v4l2_edid
 #define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
 #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
@@ -104,6 +132,10 @@
 #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
 #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
 #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
+#define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing)
+#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing)
+#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability)
+#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability)
 #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
 #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
 #define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
diff --git a/libc/kernel/uapi/linux/version.h b/libc/kernel/uapi/linux/version.h
index 0d50613..59df932 100644
--- a/libc/kernel/uapi/linux/version.h
+++ b/libc/kernel/uapi/linux/version.h
@@ -16,8 +16,8 @@
  ***
  ****************************************************************************
  ****************************************************************************/
-#define LINUX_VERSION_CODE 393728
+#define LINUX_VERSION_CODE 394240
 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
 #define LINUX_VERSION_MAJOR 6
-#define LINUX_VERSION_PATCHLEVEL 2
+#define LINUX_VERSION_PATCHLEVEL 4
 #define LINUX_VERSION_SUBLEVEL 0
diff --git a/libc/kernel/uapi/linux/vhost.h b/libc/kernel/uapi/linux/vhost.h
index e5b1327..5138f0c 100644
--- a/libc/kernel/uapi/linux/vhost.h
+++ b/libc/kernel/uapi/linux/vhost.h
@@ -69,4 +69,5 @@
 #define VHOST_VDPA_GET_VRING_GROUP _IOWR(VHOST_VIRTIO, 0x7B, struct vhost_vring_state)
 #define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, struct vhost_vring_state)
 #define VHOST_VDPA_SUSPEND _IO(VHOST_VIRTIO, 0x7D)
+#define VHOST_VDPA_RESUME _IO(VHOST_VIRTIO, 0x7E)
 #endif
diff --git a/libc/kernel/uapi/linux/vhost_types.h b/libc/kernel/uapi/linux/vhost_types.h
index 32efa85..1669c28 100644
--- a/libc/kernel/uapi/linux/vhost_types.h
+++ b/libc/kernel/uapi/linux/vhost_types.h
@@ -106,4 +106,5 @@
 #define VHOST_BACKEND_F_IOTLB_BATCH 0x2
 #define VHOST_BACKEND_F_IOTLB_ASID 0x3
 #define VHOST_BACKEND_F_SUSPEND 0x4
+#define VHOST_BACKEND_F_RESUME 0x5
 #endif
diff --git a/libc/kernel/uapi/linux/videodev2.h b/libc/kernel/uapi/linux/videodev2.h
index 4fb0a25..b762feb 100644
--- a/libc/kernel/uapi/linux/videodev2.h
+++ b/libc/kernel/uapi/linux/videodev2.h
@@ -244,11 +244,17 @@
 #define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4')
 #define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4')
 #define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4')
+#define V4L2_PIX_FMT_RGBX1010102 v4l2_fourcc('R', 'X', '3', '0')
+#define V4L2_PIX_FMT_RGBA1010102 v4l2_fourcc('R', 'A', '3', '0')
+#define V4L2_PIX_FMT_ARGB2101010 v4l2_fourcc('A', 'R', '3', '0')
+#define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2')
+#define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2')
 #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y')
 #define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ')
 #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ')
 #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ')
 #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ')
+#define V4L2_PIX_FMT_Y012 v4l2_fourcc('Y', '0', '1', '2')
 #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ')
 #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ')
 #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ')
@@ -275,6 +281,10 @@
 #define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A')
 #define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X')
 #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0')
+#define V4L2_PIX_FMT_YUV48_12 v4l2_fourcc('Y', '3', '1', '2')
+#define V4L2_PIX_FMT_Y210 v4l2_fourcc('Y', '2', '1', '0')
+#define V4L2_PIX_FMT_Y212 v4l2_fourcc('Y', '2', '1', '2')
+#define V4L2_PIX_FMT_Y216 v4l2_fourcc('Y', '2', '1', '6')
 #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2')
 #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1')
 #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6')
@@ -282,10 +292,12 @@
 #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4')
 #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2')
 #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0')
+#define V4L2_PIX_FMT_P012 v4l2_fourcc('P', '0', '1', '2')
 #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2')
 #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1')
 #define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6')
 #define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1')
+#define V4L2_PIX_FMT_P012M v4l2_fourcc('P', 'M', '1', '2')
 #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9')
 #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9')
 #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P')
@@ -374,6 +386,9 @@
 #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H')
 #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4')
 #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5')
+#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0')
+#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0')
+#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0')
 #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A')
 #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A')
 #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0')
diff --git a/libc/kernel/uapi/linux/virtio_blk.h b/libc/kernel/uapi/linux/virtio_blk.h
index 0dd08c5..1b7c7e9 100644
--- a/libc/kernel/uapi/linux/virtio_blk.h
+++ b/libc/kernel/uapi/linux/virtio_blk.h
@@ -32,6 +32,7 @@
 #define VIRTIO_BLK_F_DISCARD 13
 #define VIRTIO_BLK_F_WRITE_ZEROES 14
 #define VIRTIO_BLK_F_SECURE_ERASE 16
+#define VIRTIO_BLK_F_ZONED 17
 #ifndef VIRTIO_BLK_NO_LEGACY
 #define VIRTIO_BLK_F_BARRIER 0
 #define VIRTIO_BLK_F_SCSI 7
@@ -67,6 +68,15 @@
   __virtio32 max_secure_erase_sectors;
   __virtio32 max_secure_erase_seg;
   __virtio32 secure_erase_sector_alignment;
+  struct virtio_blk_zoned_characteristics {
+    __virtio32 zone_sectors;
+    __virtio32 max_open_zones;
+    __virtio32 max_active_zones;
+    __virtio32 max_append_sectors;
+    __virtio32 write_granularity;
+    __u8 model;
+    __u8 unused2[3];
+  } zoned;
 } __attribute__((packed));
 #define VIRTIO_BLK_T_IN 0
 #define VIRTIO_BLK_T_OUT 1
@@ -78,6 +88,13 @@
 #define VIRTIO_BLK_T_DISCARD 11
 #define VIRTIO_BLK_T_WRITE_ZEROES 13
 #define VIRTIO_BLK_T_SECURE_ERASE 14
+#define VIRTIO_BLK_T_ZONE_APPEND 15
+#define VIRTIO_BLK_T_ZONE_REPORT 16
+#define VIRTIO_BLK_T_ZONE_OPEN 18
+#define VIRTIO_BLK_T_ZONE_CLOSE 20
+#define VIRTIO_BLK_T_ZONE_FINISH 22
+#define VIRTIO_BLK_T_ZONE_RESET 24
+#define VIRTIO_BLK_T_ZONE_RESET_ALL 26
 #ifndef VIRTIO_BLK_NO_LEGACY
 #define VIRTIO_BLK_T_BARRIER 0x80000000
 #endif
@@ -86,6 +103,33 @@
   __virtio32 ioprio;
   __virtio64 sector;
 };
+#define VIRTIO_BLK_Z_NONE 0
+#define VIRTIO_BLK_Z_HM 1
+#define VIRTIO_BLK_Z_HA 2
+struct virtio_blk_zone_descriptor {
+  __virtio64 z_cap;
+  __virtio64 z_start;
+  __virtio64 z_wp;
+  __u8 z_type;
+  __u8 z_state;
+  __u8 reserved[38];
+};
+struct virtio_blk_zone_report {
+  __virtio64 nr_zones;
+  __u8 reserved[56];
+  struct virtio_blk_zone_descriptor zones[];
+};
+#define VIRTIO_BLK_ZT_CONV 1
+#define VIRTIO_BLK_ZT_SWR 2
+#define VIRTIO_BLK_ZT_SWP 3
+#define VIRTIO_BLK_ZS_NOT_WP 0
+#define VIRTIO_BLK_ZS_EMPTY 1
+#define VIRTIO_BLK_ZS_IOPEN 2
+#define VIRTIO_BLK_ZS_EOPEN 3
+#define VIRTIO_BLK_ZS_CLOSED 4
+#define VIRTIO_BLK_ZS_RDONLY 13
+#define VIRTIO_BLK_ZS_FULL 14
+#define VIRTIO_BLK_ZS_OFFLINE 15
 #define VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP 0x00000001
 struct virtio_blk_discard_write_zeroes {
   __le64 sector;
@@ -103,4 +147,8 @@
 #define VIRTIO_BLK_S_OK 0
 #define VIRTIO_BLK_S_IOERR 1
 #define VIRTIO_BLK_S_UNSUPP 2
+#define VIRTIO_BLK_S_ZONE_INVALID_CMD 3
+#define VIRTIO_BLK_S_ZONE_UNALIGNED_WP 4
+#define VIRTIO_BLK_S_ZONE_OPEN_RESOURCE 5
+#define VIRTIO_BLK_S_ZONE_ACTIVE_RESOURCE 6
 #endif
diff --git a/libc/kernel/uapi/linux/virtio_config.h b/libc/kernel/uapi/linux/virtio_config.h
index bdd2e73..152d854 100644
--- a/libc/kernel/uapi/linux/virtio_config.h
+++ b/libc/kernel/uapi/linux/virtio_config.h
@@ -38,5 +38,6 @@
 #define VIRTIO_F_IN_ORDER 35
 #define VIRTIO_F_ORDER_PLATFORM 36
 #define VIRTIO_F_SR_IOV 37
+#define VIRTIO_F_NOTIFICATION_DATA 38
 #define VIRTIO_F_RING_RESET 40
 #endif
diff --git a/libc/kernel/uapi/linux/virtio_net.h b/libc/kernel/uapi/linux/virtio_net.h
index da7285e..d2554a0 100644
--- a/libc/kernel/uapi/linux/virtio_net.h
+++ b/libc/kernel/uapi/linux/virtio_net.h
@@ -50,6 +50,7 @@
 #define VIRTIO_NET_F_GUEST_USO6 55
 #define VIRTIO_NET_F_HOST_USO 56
 #define VIRTIO_NET_F_HASH_REPORT 57
+#define VIRTIO_NET_F_GUEST_HDRLEN 59
 #define VIRTIO_NET_F_RSS 60
 #define VIRTIO_NET_F_RSC_EXT 61
 #define VIRTIO_NET_F_STANDBY 62
diff --git a/libc/kernel/uapi/rdma/bnxt_re-abi.h b/libc/kernel/uapi/rdma/bnxt_re-abi.h
index 62ba685..cab6aa4 100644
--- a/libc/kernel/uapi/rdma/bnxt_re-abi.h
+++ b/libc/kernel/uapi/rdma/bnxt_re-abi.h
@@ -60,6 +60,9 @@
   __u32 phase;
   __u32 rsvd;
 };
+struct bnxt_re_resize_cq_req {
+  __aligned_u64 cq_va;
+};
 struct bnxt_re_qp_req {
   __aligned_u64 qpsva;
   __aligned_u64 qprva;
diff --git a/libc/kernel/uapi/rdma/efa-abi.h b/libc/kernel/uapi/rdma/efa-abi.h
index bfb3f18..aab5902 100644
--- a/libc/kernel/uapi/rdma/efa-abi.h
+++ b/libc/kernel/uapi/rdma/efa-abi.h
@@ -104,6 +104,8 @@
   EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
   EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
   EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
+  EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
+  EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5,
 };
 struct efa_ibv_ex_query_device_resp {
   __u32 comp_mask;
diff --git a/libc/kernel/uapi/rdma/hns-abi.h b/libc/kernel/uapi/rdma/hns-abi.h
index 0407571..f778ef2 100644
--- a/libc/kernel/uapi/rdma/hns-abi.h
+++ b/libc/kernel/uapi/rdma/hns-abi.h
@@ -62,9 +62,13 @@
 };
 enum {
   HNS_ROCE_EXSGE_FLAGS = 1 << 0,
+  HNS_ROCE_RQ_INLINE_FLAGS = 1 << 1,
+  HNS_ROCE_CQE_INLINE_FLAGS = 1 << 2,
 };
 enum {
   HNS_ROCE_RSP_EXSGE_FLAGS = 1 << 0,
+  HNS_ROCE_RSP_RQ_INLINE_FLAGS = 1 << 1,
+  HNS_ROCE_RSP_CQE_INLINE_FLAGS = 1 << 2,
 };
 struct hns_roce_ib_alloc_ucontext_resp {
   __u32 qp_tab_size;
diff --git a/libc/kernel/uapi/scsi/scsi_bsg_fc.h b/libc/kernel/uapi/scsi/scsi_bsg_fc.h
index 2647249..3836282 100644
--- a/libc/kernel/uapi/scsi/scsi_bsg_fc.h
+++ b/libc/kernel/uapi/scsi/scsi_bsg_fc.h
@@ -69,7 +69,7 @@
   __u32 vendor_cmd[];
 };
 struct fc_bsg_host_vendor_reply {
-  __u32 vendor_rsp[0];
+  __DECLARE_FLEX_ARRAY(__u32, vendor_rsp);
 };
 struct fc_bsg_rport_els {
   __u8 els_code;
diff --git a/libc/kernel/uapi/scsi/scsi_bsg_mpi3mr.h b/libc/kernel/uapi/scsi/scsi_bsg_mpi3mr.h
index fcba8cd..48e88d3 100644
--- a/libc/kernel/uapi/scsi/scsi_bsg_mpi3mr.h
+++ b/libc/kernel/uapi/scsi/scsi_bsg_mpi3mr.h
@@ -220,9 +220,6 @@
     struct mpi3mr_bsg_mptcmd mptcmd;
   } cmd;
 };
-#ifndef MPI3_NVME_ENCAP_CMD_MAX
-#define MPI3_NVME_ENCAP_CMD_MAX (1)
-#endif
 struct mpi3_nvme_encapsulated_request {
   __le16 host_tag;
   __u8 ioc_use_only02;
@@ -236,7 +233,7 @@
   __le16 flags;
   __le32 data_length;
   __le32 reserved14[3];
-  __le32 command[MPI3_NVME_ENCAP_CMD_MAX];
+  __le32 command[];
 };
 struct mpi3_nvme_encapsulated_error_reply {
   __le16 host_tag;
diff --git a/libc/kernel/uapi/scsi/scsi_bsg_ufs.h b/libc/kernel/uapi/scsi/scsi_bsg_ufs.h
index ae5c757..036243e 100644
--- a/libc/kernel/uapi/scsi/scsi_bsg_ufs.h
+++ b/libc/kernel/uapi/scsi/scsi_bsg_ufs.h
@@ -20,8 +20,22 @@
 #define SCSI_BSG_UFS_H
 #include <linux/types.h>
 #define UFS_CDB_SIZE 16
-#define UPIU_TRANSACTION_UIC_CMD 0x1F
 #define UIC_CMD_SIZE (sizeof(__u32) * 4)
+enum ufs_bsg_msg_code {
+  UPIU_TRANSACTION_UIC_CMD = 0x1F,
+  UPIU_TRANSACTION_ARPMB_CMD,
+};
+enum ufs_rpmb_op_type {
+  UFS_RPMB_WRITE_KEY = 0x01,
+  UFS_RPMB_READ_CNT = 0x02,
+  UFS_RPMB_WRITE = 0x03,
+  UFS_RPMB_READ = 0x04,
+  UFS_RPMB_READ_RESP = 0x05,
+  UFS_RPMB_SEC_CONF_WRITE = 0x06,
+  UFS_RPMB_SEC_CONF_READ = 0x07,
+  UFS_RPMB_PURGE_ENABLE = 0x08,
+  UFS_RPMB_PURGE_STATUS_READ = 0x09,
+};
 struct utp_upiu_header {
   __be32 dword_0;
   __be32 dword_1;
@@ -49,13 +63,36 @@
     struct utp_upiu_query uc;
   };
 };
+struct ufs_arpmb_meta {
+  __be16 req_resp_type;
+  __u8 nonce[16];
+  __be32 write_counter;
+  __be16 addr_lun;
+  __be16 block_count;
+  __be16 result;
+} __attribute__((__packed__));
+struct ufs_ehs {
+  __u8 length;
+  __u8 ehs_type;
+  __be16 ehssub_type;
+  struct ufs_arpmb_meta meta;
+  __u8 mac_key[32];
+} __attribute__((__packed__));
 struct ufs_bsg_request {
   __u32 msgcode;
   struct utp_upiu_req upiu_req;
 };
 struct ufs_bsg_reply {
-  __u32 result;
+  int result;
   __u32 reply_payload_rcv_len;
   struct utp_upiu_req upiu_rsp;
 };
+struct ufs_rpmb_request {
+  struct ufs_bsg_request bsg_request;
+  struct ufs_ehs ehs_req;
+};
+struct ufs_rpmb_reply {
+  struct ufs_bsg_reply bsg_reply;
+  struct ufs_ehs ehs_rsp;
+};
 #endif
diff --git a/libc/kernel/uapi/sound/asoc.h b/libc/kernel/uapi/sound/asoc.h
index 1940e5d..b156267 100644
--- a/libc/kernel/uapi/sound/asoc.h
+++ b/libc/kernel/uapi/sound/asoc.h
@@ -149,9 +149,9 @@
   __le32 type;
   __le32 num_elems;
   union {
-    struct snd_soc_tplg_vendor_uuid_elem uuid[0];
-    struct snd_soc_tplg_vendor_value_elem value[0];
-    struct snd_soc_tplg_vendor_string_elem string[0];
+    __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid);
+    __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value);
+    __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string);
   };
 } __attribute__((packed));
 struct snd_soc_tplg_private {
diff --git a/libc/kernel/uapi/sound/emu10k1.h b/libc/kernel/uapi/sound/emu10k1.h
index 483309e..5ecdf71 100644
--- a/libc/kernel/uapi/sound/emu10k1.h
+++ b/libc/kernel/uapi/sound/emu10k1.h
@@ -21,8 +21,6 @@
 #ifdef __linux__
 #include <linux/types.h>
 #endif
-#define EMU10K1_CARD_CREATIVE 0x00000000
-#define EMU10K1_CARD_EMUAPS 0x00000001
 #define EMU10K1_FX8010_PCM_COUNT 8
 #define __EMU10K1_DECLARE_BITMAP(name,bits) unsigned long name[(bits) / (sizeof(unsigned long) * 8)]
 #define iMAC0 0x00
@@ -41,10 +39,29 @@
 #define iEXP 0x0d
 #define iINTERP 0x0e
 #define iSKIP 0x0f
+#define LOWORD_OPX_MASK 0x000ffc00
+#define LOWORD_OPY_MASK 0x000003ff
+#define HIWORD_OPCODE_MASK 0x00f00000
+#define HIWORD_RESULT_MASK 0x000ffc00
+#define HIWORD_OPA_MASK 0x000003ff
+#define A_LOWORD_OPX_MASK 0x007ff000
+#define A_LOWORD_OPY_MASK 0x000007ff
+#define A_HIWORD_OPCODE_MASK 0x0f000000
+#define A_HIWORD_RESULT_MASK 0x007ff000
+#define A_HIWORD_OPA_MASK 0x000007ff
 #define FXBUS(x) (0x00 + (x))
 #define EXTIN(x) (0x10 + (x))
 #define EXTOUT(x) (0x20 + (x))
 #define FXBUS2(x) (0x30 + (x))
+#define A_FXBUS(x) (0x00 + (x))
+#define A_EXTIN(x) (0x40 + (x))
+#define A_P16VIN(x) (0x50 + (x))
+#define A_EXTOUT(x) (0x60 + (x))
+#define A_FXBUS2(x) (0x80 + (x))
+#define A_EMU32OUTH(x) (0xa0 + (x))
+#define A_EMU32OUTL(x) (0xb0 + (x))
+#define A3_EMU32IN(x) (0x160 + (x))
+#define A3_EMU32OUT(x) (0x1E0 + (x))
 #define C_00000000 0x40
 #define C_00000001 0x41
 #define C_00000002 0x42
@@ -73,33 +90,71 @@
 #define GPR_NOISE1 0x59
 #define GPR_IRQ 0x5a
 #define GPR_DBAC 0x5b
+#define A_C_00000000 0xc0
+#define A_C_00000001 0xc1
+#define A_C_00000002 0xc2
+#define A_C_00000003 0xc3
+#define A_C_00000004 0xc4
+#define A_C_00000008 0xc5
+#define A_C_00000010 0xc6
+#define A_C_00000020 0xc7
+#define A_C_00000100 0xc8
+#define A_C_00010000 0xc9
+#define A_C_00000800 0xca
+#define A_C_10000000 0xcb
+#define A_C_20000000 0xcc
+#define A_C_40000000 0xcd
+#define A_C_80000000 0xce
+#define A_C_7fffffff 0xcf
+#define A_C_ffffffff 0xd0
+#define A_C_fffffffe 0xd1
+#define A_C_c0000000 0xd2
+#define A_C_4f1bbcdc 0xd3
+#define A_C_5a7ef9db 0xd4
+#define A_C_00100000 0xd5
+#define A_GPR_ACCU 0xd6
+#define A_GPR_COND 0xd7
+#define A_GPR_NOISE0 0xd8
+#define A_GPR_NOISE1 0xd9
+#define A_GPR_IRQ 0xda
+#define A_GPR_DBAC 0xdb
+#define A_GPR_DBACE 0xde
+#define FXGPREGBASE 0x100
+#define A_FXGPREGBASE 0x400
+#define A_TANKMEMCTLREGBASE 0x100
+#define A_TANKMEMCTLREG_MASK 0x1f
+#define TANKMEMDATAREGBASE 0x200
+#define TANKMEMDATAREG_MASK 0x000fffff
+#define TANKMEMADDRREGBASE 0x300
+#define TANKMEMADDRREG_ADDR_MASK 0x000fffff
+#define TANKMEMADDRREG_CLEAR 0x00800000
+#define TANKMEMADDRREG_ALIGN 0x00400000
+#define TANKMEMADDRREG_WRITE 0x00200000
+#define TANKMEMADDRREG_READ 0x00100000
 #define GPR(x) (FXGPREGBASE + (x))
 #define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x))
 #define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x))
 #define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x))
 #define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x))
+#define A_GPR(x) (A_FXGPREGBASE + (x))
 #define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x))
 #define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x))
 #define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x))
 #define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x))
 #define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x))
 #define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x))
-#define A_FXBUS(x) (0x00 + (x))
-#define A_EXTIN(x) (0x40 + (x))
-#define A_P16VIN(x) (0x50 + (x))
-#define A_EXTOUT(x) (0x60 + (x))
-#define A_FXBUS2(x) (0x80 + (x))
-#define A_EMU32OUTH(x) (0xa0 + (x))
-#define A_EMU32OUTL(x) (0xb0 + (x))
-#define A3_EMU32IN(x) (0x160 + (x))
-#define A3_EMU32OUT(x) (0x1E0 + (x))
-#define A_GPR(x) (A_FXGPREGBASE + (x))
 #define CC_REG_NORMALIZED C_00000001
 #define CC_REG_BORROW C_00000002
 #define CC_REG_MINUS C_00000004
 #define CC_REG_ZERO C_00000008
 #define CC_REG_SATURATE C_00000010
 #define CC_REG_NONZERO C_00000100
+#define A_CC_REG_NORMALIZED A_C_00000001
+#define A_CC_REG_BORROW A_C_00000002
+#define A_CC_REG_MINUS A_C_00000004
+#define A_CC_REG_ZERO A_C_00000008
+#define A_CC_REG_SATURATE A_C_00000010
+#define A_CC_REG_NONZERO A_C_00000100
 #define FXBUS_PCM_LEFT 0x00
 #define FXBUS_PCM_RIGHT 0x01
 #define FXBUS_PCM_LEFT_REAR 0x02
@@ -180,35 +235,6 @@
 #define A_EXTOUT_ADC_CAP_L 0x16
 #define A_EXTOUT_ADC_CAP_R 0x17
 #define A_EXTOUT_MIC_CAP 0x18
-#define A_C_00000000 0xc0
-#define A_C_00000001 0xc1
-#define A_C_00000002 0xc2
-#define A_C_00000003 0xc3
-#define A_C_00000004 0xc4
-#define A_C_00000008 0xc5
-#define A_C_00000010 0xc6
-#define A_C_00000020 0xc7
-#define A_C_00000100 0xc8
-#define A_C_00010000 0xc9
-#define A_C_00000800 0xca
-#define A_C_10000000 0xcb
-#define A_C_20000000 0xcc
-#define A_C_40000000 0xcd
-#define A_C_80000000 0xce
-#define A_C_7fffffff 0xcf
-#define A_C_ffffffff 0xd0
-#define A_C_fffffffe 0xd1
-#define A_C_c0000000 0xd2
-#define A_C_4f1bbcdc 0xd3
-#define A_C_5a7ef9db 0xd4
-#define A_C_00100000 0xd5
-#define A_GPR_ACCU 0xd6
-#define A_GPR_COND 0xd7
-#define A_GPR_NOISE0 0xd8
-#define A_GPR_NOISE1 0xd9
-#define A_GPR_IRQ 0xda
-#define A_GPR_DBAC 0xdb
-#define A_GPR_DBACE 0xde
 #define EMU10K1_DBG_ZC 0x80000000
 #define EMU10K1_DBG_SATURATION_OCCURED 0x02000000
 #define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000
@@ -216,11 +242,13 @@
 #define EMU10K1_DBG_STEP 0x00004000
 #define EMU10K1_DBG_CONDITION_CODE 0x00003e00
 #define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff
-#define TANKMEMADDRREG_ADDR_MASK 0x000fffff
-#define TANKMEMADDRREG_CLEAR 0x00800000
-#define TANKMEMADDRREG_ALIGN 0x00400000
-#define TANKMEMADDRREG_WRITE 0x00200000
-#define TANKMEMADDRREG_READ 0x00100000
+#define A_DBG_ZC 0x40000000
+#define A_DBG_SATURATION_OCCURED 0x20000000
+#define A_DBG_SATURATION_ADDR 0x0ffc0000
+#define A_DBG_SINGLE_STEP 0x00020000
+#define A_DBG_STEP 0x00010000
+#define A_DBG_CONDITION_CODE 0x0000f800
+#define A_DBG_STEP_ADDR 0x000003ff
 struct snd_emu10k1_fx8010_info {
   unsigned int internal_tram_size;
   unsigned int external_tram_size;
diff --git a/libc/kernel/uapi/sound/firewire.h b/libc/kernel/uapi/sound/firewire.h
index d26d722..cc13cb9 100644
--- a/libc/kernel/uapi/sound/firewire.h
+++ b/libc/kernel/uapi/sound/firewire.h
@@ -27,6 +27,7 @@
 #define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
 #define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
 #define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
+#define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE 0x4f6c6761
 struct snd_firewire_event_common {
   unsigned int type;
 };
@@ -74,6 +75,14 @@
   __u32 count;
   __u32 changes[];
 };
+struct snd_firewire_event_ff400_message {
+  unsigned int type;
+  unsigned int message_count;
+  struct {
+    __u32 message;
+    __u32 tstamp;
+  } messages[];
+};
 union snd_firewire_event {
   struct snd_firewire_event_common common;
   struct snd_firewire_event_lock_status lock_status;
@@ -83,6 +92,7 @@
   struct snd_firewire_event_tascam_control tascam_control;
   struct snd_firewire_event_motu_notification motu_notification;
   struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
+  struct snd_firewire_event_ff400_message ff400_message;
 };
 #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
 #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
diff --git a/libc/kernel/uapi/sound/intel/avs/tokens.h b/libc/kernel/uapi/sound/intel/avs/tokens.h
index b6b3002..d524278 100644
--- a/libc/kernel/uapi/sound/intel/avs/tokens.h
+++ b/libc/kernel/uapi/sound/intel/avs/tokens.h
@@ -100,6 +100,7 @@
   AVS_TKN_MOD_CORE_ID_U8 = 1704,
   AVS_TKN_MOD_PROC_DOMAIN_U8 = 1705,
   AVS_TKN_MOD_MODCFG_EXT_ID_U32 = 1706,
+  AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,
   AVS_TKN_PATH_TMPL_ID_U32 = 1801,
   AVS_TKN_PATH_ID_U32 = 1901,
   AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,
@@ -107,5 +108,6 @@
   AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
   AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
   AVS_TKN_PIN_FMT_AFMT_ID_U32 = 2203,
+  AVS_TKN_KCONTROL_ID_U32 = 2301,
 };
 #endif
diff --git a/libc/kernel/uapi/sound/skl-tplg-interface.h b/libc/kernel/uapi/sound/skl-tplg-interface.h
index 6dd9655..ff3d42a 100644
--- a/libc/kernel/uapi/sound/skl-tplg-interface.h
+++ b/libc/kernel/uapi/sound/skl-tplg-interface.h
@@ -47,7 +47,8 @@
   SKL_CH_CFG_DUAL_MONO = 9,
   SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10,
   SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11,
-  SKL_CH_CFG_4_CHANNEL = 12,
+  SKL_CH_CFG_7_1 = 12,
+  SKL_CH_CFG_4_CHANNEL = SKL_CH_CFG_7_1,
   SKL_CH_CFG_INVALID
 };
 enum skl_module_type {
diff --git a/libc/kernel/uapi/sound/sof/abi.h b/libc/kernel/uapi/sound/sof/abi.h
index dc4e525..a4844d6 100644
--- a/libc/kernel/uapi/sound/sof/abi.h
+++ b/libc/kernel/uapi/sound/sof/abi.h
@@ -35,4 +35,5 @@
 #define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver,client_ver) (SOF_ABI_VERSION_MAJOR((sof_ver)) != SOF_ABI_VERSION_MAJOR((client_ver)))
 #define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH)
 #define SOF_ABI_MAGIC 0x00464F53
+#define SOF_IPC4_ABI_MAGIC 0x34464F53
 #endif
diff --git a/libc/kernel/uapi/sound/sof/tokens.h b/libc/kernel/uapi/sound/sof/tokens.h
index 3726546..48ef360 100644
--- a/libc/kernel/uapi/sound/sof/tokens.h
+++ b/libc/kernel/uapi/sound/sof/tokens.h
@@ -39,6 +39,7 @@
 #define SOF_TKN_SCHED_DYNAMIC_PIPELINE 206
 #define SOF_TKN_SCHED_LP_MODE 207
 #define SOF_TKN_SCHED_MEM_USAGE 208
+#define SOF_TKN_SCHED_USE_CHAIN_DMA 209
 #define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
 #define SOF_TKN_VOLUME_RAMP_STEP_MS 251
 #define SOF_TKN_GAIN_RAMP_TYPE 260
@@ -59,10 +60,12 @@
 #define SOF_TKN_COMP_CPC 406
 #define SOF_TKN_COMP_IS_PAGES 409
 #define SOF_TKN_COMP_NUM_AUDIO_FORMATS 410
-#define SOF_TKN_COMP_NUM_SINK_PINS 411
-#define SOF_TKN_COMP_NUM_SOURCE_PINS 412
-#define SOF_TKN_COMP_SINK_PIN_BINDING_WNAME 413
-#define SOF_TKN_COMP_SRC_PIN_BINDING_WNAME 414
+#define SOF_TKN_COMP_NUM_INPUT_PINS 411
+#define SOF_TKN_COMP_NUM_OUTPUT_PINS 412
+#define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME 413
+#define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME 414
+#define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS 415
+#define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS 416
 #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
 #define SOF_TKN_INTEL_SSP_MCLK_ID 501
 #define SOF_TKN_INTEL_SSP_SAMPLE_BITS 502
@@ -107,26 +110,29 @@
 #define SOF_TKN_AMD_ACPDMIC_CH 1801
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE 1900
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH 1901
-#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT 1902
+#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH 1902
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS 1903
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP 1904
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG 1905
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE 1906
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG 1907
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE 1908
+#define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX 1909
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE 1930
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH 1931
-#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT 1932
+#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH 1932
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS 1933
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP 1934
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG 1935
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE 1936
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG 1937
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE 1938
+#define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX 1939
 #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS 1970
 #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS 1971
 #define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE 1972
 #define SOF_TKN_INTEL_COPIER_NODE_TYPE 1980
+#define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS 1981
 #define SOF_TKN_AMD_ACPI2S_RATE 1700
 #define SOF_TKN_AMD_ACPI2S_CH 1701
 #define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index c75b13a..41d18a6 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -74,28 +74,28 @@
     __memrchr_chk; # introduced=23
     __memset_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
     __mmap2; # arm x86
-    __ns_format_ttl; # arm x86
-    __ns_get16; # arm x86
-    __ns_get32; # arm x86
-    __ns_initparse; # arm x86
-    __ns_makecanon; # arm x86
-    __ns_msg_getflag; # arm x86
-    __ns_name_compress; # arm x86
-    __ns_name_ntol; # arm x86
-    __ns_name_ntop; # arm x86
-    __ns_name_pack; # arm x86
-    __ns_name_pton; # arm x86
-    __ns_name_rollback; # arm x86
-    __ns_name_skip; # arm x86
-    __ns_name_uncompress; # arm x86
-    __ns_name_unpack; # arm x86
-    __ns_parserr; # arm x86
-    __ns_put16; # arm x86
-    __ns_put32; # arm x86
-    __ns_samename; # arm x86
-    __ns_skiprr; # arm x86
-    __ns_sprintrr; # arm x86
-    __ns_sprintrrf; # arm x86
+    __ns_format_ttl; # arm x86 introduced=22
+    __ns_get16; # arm x86 introduced=22
+    __ns_get32; # arm x86 introduced=22
+    __ns_initparse; # arm x86 introduced=22
+    __ns_makecanon; # arm x86 introduced=22
+    __ns_msg_getflag; # arm x86 introduced=22
+    __ns_name_compress; # arm x86 introduced=22
+    __ns_name_ntol; # arm x86 introduced=22
+    __ns_name_ntop; # arm x86 introduced=22
+    __ns_name_pack; # arm x86 introduced=22
+    __ns_name_pton; # arm x86 introduced=22
+    __ns_name_rollback; # arm x86 introduced=22
+    __ns_name_skip; # arm x86 introduced=22
+    __ns_name_uncompress; # arm x86 introduced=22
+    __ns_name_unpack; # arm x86 introduced=22
+    __ns_parserr; # arm x86 introduced=22
+    __ns_put16; # arm x86 introduced=22
+    __ns_put32; # arm x86 introduced=22
+    __ns_samename; # arm x86 introduced=22
+    __ns_skiprr; # arm x86 introduced=22
+    __ns_sprintrr; # arm x86 introduced=22
+    __ns_sprintrrf; # arm x86 introduced=22
     __open_2; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
     __openat; # arm x86
     __openat_2; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
@@ -1584,6 +1584,18 @@
     posix_spawn_file_actions_addfchdir_np;
 } LIBC_T;
 
+LIBC_V { # introduced=VanillaIceCream
+  global:
+    localtime_rz;
+    mbsrtowcs_l;
+    mktime_z;
+    __riscv_flush_icache; # riscv64
+    timespec_getres;
+    tzalloc;
+    tzfree;
+    wcsrtombs_l;
+} LIBC_U;
+
 LIBC_PRIVATE {
   global:
     __accept4; # arm x86
diff --git a/libc/malloc_debug/Android.bp b/libc/malloc_debug/Android.bp
index 373d497..24bb18a 100644
--- a/libc/malloc_debug/Android.bp
+++ b/libc/malloc_debug/Android.bp
@@ -197,4 +197,5 @@
         "-O0",
     ],
     test_suites: ["general-tests"],
+    test_config: "tests/AndroidTest.xml",
 }
diff --git a/libc/malloc_debug/tests/AndroidTest.xml b/libc/malloc_debug/tests/AndroidTest.xml
new file mode 100644
index 0000000..c89cbb5
--- /dev/null
+++ b/libc/malloc_debug/tests/AndroidTest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<configuration description="Runs malloc_debug_system_tests.">
+    <option name="test-suite-tag" value="apct" />
+    <option name="test-suite-tag" value="apct-native" />
+
+    <!-- cannot be autogenerated: b/153565474 -->
+    <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer">
+        <!-- flake mitigation, in case device is in bad state-->
+        <option name="pre-reboot" value="true" />
+        <!-- This test can become flaky if there are lots of other tests
+          running at the same time so do this to attempt to run this test
+          as isolated as possible.
+          tests. -->
+        <option name="post-reboot" value="true" />
+    </target_preparer>
+
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+
+    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+        <option name="cleanup" value="true" />
+        <option name="push" value="malloc_debug_system_tests->/data/local/tests/unrestricted/malloc_debug_system_tests" />
+    </target_preparer>
+
+    <test class="com.android.tradefed.testtype.GTest" >
+        <option name="native-test-device-path" value="/data/local/tests/unrestricted/" />
+        <option name="module-name" value="malloc_debug_system_tests" />
+    </test>
+</configuration>
diff --git a/libc/platform/bionic/android_unsafe_frame_pointer_chase.h b/libc/platform/bionic/android_unsafe_frame_pointer_chase.h
index 2b9a32f..406ad92 100644
--- a/libc/platform/bionic/android_unsafe_frame_pointer_chase.h
+++ b/libc/platform/bionic/android_unsafe_frame_pointer_chase.h
@@ -44,4 +44,4 @@
  * take stack traces efficiently. Normal applications should use APIs such as libunwindstack or
  * _Unwind_Backtrace.
  */
-extern "C" size_t android_unsafe_frame_pointer_chase(uintptr_t* buf, size_t num_entries);
+extern "C" size_t android_unsafe_frame_pointer_chase(uintptr_t* _Nonnull buf, size_t num_entries);
diff --git a/libc/platform/bionic/fdtrack.h b/libc/platform/bionic/fdtrack.h
index fe6ca84..7fc304a 100644
--- a/libc/platform/bionic/fdtrack.h
+++ b/libc/platform/bionic/fdtrack.h
@@ -43,6 +43,8 @@
   ANDROID_FDTRACK_EVENT_TYPE_CLOSE,
 };
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 struct android_fdtrack_event {
   // File descriptor for which this event occurred.
   int fd;
@@ -57,12 +59,15 @@
     } create;
   } data;
 };
+#pragma clang diagnostic pop
 
 // Callback invoked upon file descriptor creation/closure.
-typedef void (*android_fdtrack_hook_t)(struct android_fdtrack_event*);
+typedef void (*_Nullable android_fdtrack_hook_t)(struct android_fdtrack_event* _Nullable);
 
 // Register a hook which is called to track fd lifecycle events.
-bool android_fdtrack_compare_exchange_hook(android_fdtrack_hook_t* expected, android_fdtrack_hook_t value) __INTRODUCED_IN(30);
+// Set value to null to disable tracking.
+bool android_fdtrack_compare_exchange_hook(android_fdtrack_hook_t* _Nonnull expected,
+                                           android_fdtrack_hook_t value) __INTRODUCED_IN(30);
 
 // Enable/disable fdtrack *on the current thread*.
 // This is primarily useful when performing operations which you don't want to track
diff --git a/libc/platform/bionic/macros.h b/libc/platform/bionic/macros.h
index 9e13e0d..93268c1 100644
--- a/libc/platform/bionic/macros.h
+++ b/libc/platform/bionic/macros.h
@@ -40,12 +40,12 @@
 }
 
 template <typename T>
-static inline T* align_down(T* p, size_t align) {
+static inline T* _Nonnull align_down(T* _Nonnull p, size_t align) {
   return reinterpret_cast<T*>(align_down(reinterpret_cast<uintptr_t>(p), align));
 }
 
 template <typename T>
-static inline T* align_up(T* p, size_t align) {
+static inline T* _Nonnull align_up(T* _Nonnull p, size_t align) {
   return reinterpret_cast<T*>(align_up(reinterpret_cast<uintptr_t>(p), align));
 }
 
@@ -94,6 +94,6 @@
 }
 
 template <typename T>
-static inline T* untag_address(T* p) {
+static inline T* _Nonnull untag_address(T* _Nonnull p) {
   return reinterpret_cast<T*>(untag_address(reinterpret_cast<uintptr_t>(p)));
 }
diff --git a/libc/platform/bionic/malloc.h b/libc/platform/bionic/malloc.h
index 3c290fc..0a6546e 100644
--- a/libc/platform/bionic/malloc.h
+++ b/libc/platform/bionic/malloc.h
@@ -33,7 +33,8 @@
 #include <stdint.h>
 
 // Structures for android_mallopt.
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 typedef struct {
   // Pointer to the buffer allocated by a call to M_GET_MALLOC_LEAK_INFO.
   uint8_t* buffer;
@@ -47,7 +48,7 @@
   // The maximum number of backtrace entries.
   size_t backtrace_size;
 } android_mallopt_leak_info_t;
-
+#pragma clang diagnostic pop
 // Opcodes for android_mallopt.
 
 enum {
@@ -105,6 +106,8 @@
 #define M_MEMTAG_STACK_IS_ON M_MEMTAG_STACK_IS_ON
 };
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnullability-completeness"
 typedef struct {
   // The null-terminated name that the zygote is spawning. Because native
   // SpecializeCommon (where the GWP-ASan mallopt() is called from) happens
@@ -147,9 +150,9 @@
 
   Action desire = DONT_TURN_ON_UNLESS_OVERRIDDEN;
 } android_mallopt_gwp_asan_options_t;
-
+#pragma clang diagnostic pop
 // Manipulates bionic-specific handling of memory allocation APIs such as
 // malloc. Only for use by the Android platform and APEXes.
 //
 // On success, returns true. On failure, returns false and sets errno.
-extern "C" bool android_mallopt(int opcode, void* arg, size_t arg_size);
+extern "C" bool android_mallopt(int opcode, void* _Nullable arg, size_t arg_size);
diff --git a/libc/platform/bionic/page.h b/libc/platform/bionic/page.h
index d063a98..5f4bb6f 100644
--- a/libc/platform/bionic/page.h
+++ b/libc/platform/bionic/page.h
@@ -16,15 +16,39 @@
 
 #pragma once
 
-// Get PAGE_SIZE and PAGE_MASK.
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/auxv.h>
+
+// For PAGE_SIZE.
 #include <sys/user.h>
 
+inline size_t page_size() {
+  /*
+   * PAGE_SIZE defines the maximum supported page size. Since 4096 is the
+   * minimum supported page size we can just let it be constant folded if it's
+   * also the maximum.
+   */
+#if PAGE_SIZE == 4096
+  return PAGE_SIZE;
+#else
+  static size_t size = getauxval(AT_PAGESZ);
+  return size;
+#endif
+}
+
 // Returns the address of the page containing address 'x'.
-#define PAGE_START(x) ((x) & PAGE_MASK)
+inline uintptr_t page_start(uintptr_t x) {
+  return x & ~(page_size() - 1);
+}
 
 // Returns the offset of address 'x' in its page.
-#define PAGE_OFFSET(x) ((x) & ~PAGE_MASK)
+inline uintptr_t page_offset(uintptr_t x) {
+  return x & (page_size() - 1);
+}
 
 // Returns the address of the next page after address 'x', unless 'x' is
 // itself at the start of a page.
-#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
+inline uintptr_t page_end(uintptr_t x) {
+  return page_start(x + page_size() - 1);
+}
diff --git a/libc/platform/scudo_platform_tls_slot.h b/libc/platform/scudo_platform_tls_slot.h
index 9d017c0..a86b828 100644
--- a/libc/platform/scudo_platform_tls_slot.h
+++ b/libc/platform/scudo_platform_tls_slot.h
@@ -30,6 +30,6 @@
 
 #include "bionic/tls.h"
 
-inline uintptr_t *getPlatformAllocatorTlsSlot() {
+inline uintptr_t* _Nonnull getPlatformAllocatorTlsSlot() {
   return reinterpret_cast<uintptr_t*>(&__get_tls()[TLS_SLOT_SANITIZER]);
 }
diff --git a/libc/bionic/timespec_get.cpp b/libc/private/bionic_asm_offsets.h
similarity index 86%
copy from libc/bionic/timespec_get.cpp
copy to libc/private/bionic_asm_offsets.h
index 7fc2182..c2f2b56 100644
--- a/libc/bionic/timespec_get.cpp
+++ b/libc/private/bionic_asm_offsets.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,8 +26,8 @@
  * SUCH DAMAGE.
  */
 
-#include <time.h>
+#pragma once
 
-int timespec_get(timespec* ts, int base) {
-  return (base == TIME_UTC && clock_gettime(CLOCK_REALTIME, ts) != -1) ? base : 0;
-}
+#ifdef __aarch64__
+#define OFFSETOF_libc_globals_memtag_stack 80
+#endif
diff --git a/libc/private/bionic_constants.h b/libc/private/bionic_constants.h
index d7f4474..05914f4 100644
--- a/libc/private/bionic_constants.h
+++ b/libc/private/bionic_constants.h
@@ -21,7 +21,9 @@
 // Size of the shadow call stack. This can be small because these stacks only
 // contain return addresses. This must be a power of 2 so the mask trick works.
 // See the SCS commentary in pthread_internal.h for more detail.
-#define SCS_SIZE (8 * 1024)
+// SCS_SIZE must be a multiple of page size.
+// We used 8KiB until V but switched to 16KiB in V to experiment with 16KiB pages.
+#define SCS_SIZE (16 * 1024)
 #define SCS_MASK (SCS_SIZE - 1)
 
 // The shadow call stack is allocated at an aligned address within a guard region of this size. The
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index c375cc4..510d556 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -38,6 +38,7 @@
 
 #include "private/WriteProtected.h"
 #include "private/bionic_allocator.h"
+#include "private/bionic_asm_offsets.h"
 #include "private/bionic_elf_tls.h"
 #include "private/bionic_fdsan.h"
 #include "private/bionic_malloc_dispatch.h"
@@ -65,6 +66,10 @@
   MallocDispatch malloc_dispatch_table;
 };
 
+#ifdef __aarch64__
+static_assert(OFFSETOF_libc_globals_memtag_stack == offsetof(libc_globals, memtag_stack));
+#endif
+
 __LIBC_HIDDEN__ extern WriteProtected<libc_globals> __libc_globals;
 
 struct abort_msg_t;
diff --git a/libc/stdio/local.h b/libc/stdio/local.h
index 2fc12a0..a5eb636 100644
--- a/libc/stdio/local.h
+++ b/libc/stdio/local.h
@@ -290,17 +290,21 @@
 
 #define WCIO_GET(fp) (_EXT(fp) ? &(_EXT(fp)->_wcio) : (struct wchar_io_data*)0)
 
-#define _SET_ORIENTATION(fp, mode)                                 \
-  do {                                                             \
-    struct wchar_io_data* _wcio = WCIO_GET(fp);                    \
-    if (_wcio && _wcio->wcio_mode == 0) _wcio->wcio_mode = (mode); \
+#define ORIENT_BYTES (-1)
+#define ORIENT_UNKNOWN 0
+#define ORIENT_CHARS 1
+
+#define _SET_ORIENTATION(fp, mode)                                              \
+  do {                                                                          \
+    struct wchar_io_data* _wcio = WCIO_GET(fp);                                 \
+    if (_wcio && _wcio->wcio_mode == ORIENT_UNKNOWN) _wcio->wcio_mode = (mode); \
   } while (0)
 
 #define WCIO_FREE(fp)                           \
   do {                                          \
     struct wchar_io_data* _wcio = WCIO_GET(fp); \
     if (_wcio) {                                \
-      _wcio->wcio_mode = 0;                     \
+      _wcio->wcio_mode = ORIENT_UNKNOWN;        \
       _wcio->wcio_ungetwc_inbuf = 0;            \
     }                                           \
   } while (0)
diff --git a/libc/stdio/printf_common.h b/libc/stdio/printf_common.h
index b0055f0..365728b 100644
--- a/libc/stdio/printf_common.h
+++ b/libc/stdio/printf_common.h
@@ -528,17 +528,29 @@
       case 'b':
         ADDUARG();
         break;
-      case 'w':
+      case 'w': {
         n = 0;
+        bool fast = false;
         ch = *fmt++;
+        if (ch == 'f') {
+          fast = true;
+          ch = *fmt++;
+        }
         while (is_digit(ch)) {
           APPEND_DIGIT(n, ch);
           ch = *fmt++;
         }
         if (n == 64) {
           flags |= LLONGINT;
+        } else {
+          if (n != 8 && fast) {
+#if defined(__LP64__)
+            flags |= LLONGINT;
+#endif
+          }
         }
         goto reswitch;
+      }
       default: /* "%?" prints ?, unless ? is NUL */
         if (ch == '\0') goto done;
         break;
@@ -824,4 +836,15 @@
     return convbuf;
   }
 
+  // Trasnlate a fixed size integer argument for the %w/%wf format to a
+  // flag representation. Supported sizes are 8, 16, 32, and 64 so far.
+  // See details in bionic/libc/include/stdint.h
+  static int w_to_flag(int size, bool fast) {
+    static constexpr int fast_size = sizeof(void*) == 8 ? LLONGINT : 0;
+    if (size == 8) return CHARINT;
+    if (size == 16) return fast ? fast_size : SHORTINT;
+    if (size == 32) return fast ? fast_size : 0;
+    if (size == 64) return LLONGINT;
+    __fortify_fatal("%%w%s%d is unsupported", fast ? "f" : "", size);
+  }
 };
diff --git a/libc/stdio/scanf_common.h b/libc/stdio/scanf_common.h
new file mode 100644
index 0000000..8132e90
--- /dev/null
+++ b/libc/stdio/scanf_common.h
@@ -0,0 +1,115 @@
+/*	$OpenBSD: vfscanf.c,v 1.31 2014/03/19 05:17:01 guenther Exp $ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * 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.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ */
+
+#include <ctype.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+#include <wctype.h>
+#include "local.h"
+
+#include <platform/bionic/macros.h>
+#include <private/bionic_fortify.h>
+#include <private/bionic_mbstate.h>
+
+#define BUF 513 /* Maximum length of numeric string. */
+
+// Flags used during conversion.
+// Size/type:
+#define LONG 0x00001        // l: long or double
+#define LONGDBL 0x00002     // L: long double
+#define SHORT 0x00004       // h: short
+#define SHORTSHORT 0x00008  // hh: 8 bit integer
+#define LLONG 0x00010       // ll: long long (+ deprecated q: quad)
+#define POINTER 0x00020     // p: void* (as hex)
+#define SIZEINT 0x00040     // z: (signed) size_t
+#define MAXINT 0x00080      // j: intmax_t
+#define PTRINT 0x00100      // t: ptrdiff_t
+#define NOSKIP 0x00200      // [ or c: do not skip blanks
+// Modifiers:
+#define SUPPRESS 0x00400  // *: suppress assignment
+#define UNSIGNED 0x00800  // %[oupxX] conversions
+#define ALLOCATE 0x01000  // m: allocate a char*
+// Internal use during integer parsing:
+#define SIGNOK 0x02000    // +/- is (still) legal
+#define HAVESIGN 0x04000  // Sign detected
+#define NDIGITS 0x08000   // No digits detected
+#define PFXOK 0x10000     // "0x" prefix is (still) legal
+#define PFBOK 0x20000     // "0b" prefix is (still) legal
+#define NZDIGITS 0x40000  // No zero digits detected
+
+// Conversion types.
+#define CT_CHAR 0    // %c conversion
+#define CT_CCL 1     // %[...] conversion
+#define CT_STRING 2  // %s conversion
+#define CT_INT 3     // Integer: strtoimax/strtoumax
+#define CT_FLOAT 4   // Float: strtod
+
+#define to_digit(c) static_cast<int>((c) - '0')
+#define is_digit(c) ((unsigned)to_digit(c) <= 9)
+
+// Append a digit to a value and check for overflow.
+#define APPEND_DIGIT(val, dig)               \
+  do {                                       \
+    if ((val) > INT_MAX / 10)                \
+      errno = ENOMEM;                        \
+    else {                                   \
+      (val) *= 10;                           \
+      if ((val) > INT_MAX - to_digit((dig))) \
+        errno = ENOMEM;                      \
+      else                                   \
+        (val) += to_digit((dig));            \
+    }                                        \
+  } while (0)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+// Trasnlate a fixed size integer argument for the %w/%wf format to a
+// flag representation. Supported sizes are 8, 16, 32, and 64 so far.
+// See details in bionic/libc/include/stdint.h
+static int w_to_flag(int size, bool fast) {
+  static constexpr int fast_size = sizeof(void*) == 8 ? LLONG : 0;
+  if (size == 8) return SHORTSHORT;
+  if (size == 16) return fast ? fast_size : SHORT;
+  if (size == 32) return fast ? fast_size : 0;
+  if (size == 64) return LLONG;
+  __fortify_fatal("%%w%s%d is unsupported", fast ? "f" : "", size);
+}
+
+#pragma clang diagnostic pop
\ No newline at end of file
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp
index 645aefa..f18cd81 100644
--- a/libc/stdio/stdio.cpp
+++ b/libc/stdio/stdio.cpp
@@ -773,7 +773,7 @@
 char* fgets_unlocked(char* buf, int n, FILE* fp) {
   if (n <= 0) __fortify_fatal("fgets: buffer size %d <= 0", n);
 
-  _SET_ORIENTATION(fp, -1);
+  _SET_ORIENTATION(fp, ORIENT_BYTES);
 
   char* s = buf;
   n--; // Leave space for NUL.
@@ -903,7 +903,7 @@
     errno = EBADF;
     return EOF;
   }
-  _SET_ORIENTATION(fp, -1);
+  _SET_ORIENTATION(fp, ORIENT_BYTES);
   if (--fp->_w >= 0 || (fp->_w >= fp->_lbfsize && c != '\n')) {
     return (*fp->_p++ = c);
   }
@@ -1098,7 +1098,7 @@
   size_t total = desired_total;
   if (total == 0) return 0;
 
-  _SET_ORIENTATION(fp, -1);
+  _SET_ORIENTATION(fp, ORIENT_BYTES);
 
   // TODO: how can this ever happen?!
   if (fp->_r < 0) fp->_r = 0;
@@ -1165,7 +1165,7 @@
   __siov iov = { .iov_base = const_cast<void*>(buf), .iov_len = n };
   __suio uio = { .uio_iov = &iov, .uio_iovcnt = 1, .uio_resid = n };
 
-  _SET_ORIENTATION(fp, -1);
+  _SET_ORIENTATION(fp, ORIENT_BYTES);
 
   // The usual case is success (__sfvwrite returns 0); skip the divide if this happens,
   // since divides are generally slow.
diff --git a/libc/stdio/vfprintf.cpp b/libc/stdio/vfprintf.cpp
index b7c68dd..12cceeb 100644
--- a/libc/stdio/vfprintf.cpp
+++ b/libc/stdio/vfprintf.cpp
@@ -39,7 +39,27 @@
 #define CHAR_TYPE_inf "inf"
 #define CHAR_TYPE_NAN "NAN"
 #define CHAR_TYPE_nan "nan"
-#define CHAR_TYPE_ORIENTATION -1
+#define CHAR_TYPE_ORIENTATION ORIENT_BYTES
+
+#define PRINT(ptr, len)                          \
+  do {                                           \
+    iovp->iov_base = (ptr);                      \
+    iovp->iov_len = (len);                       \
+    uio.uio_resid += (len);                      \
+    iovp++;                                      \
+    if (++uio.uio_iovcnt >= NIOV) {              \
+      if (helpers::sprint(fp, &uio)) goto error; \
+      iovp = iov;                                \
+    }                                            \
+  } while (0)
+
+#define FLUSH()                                                 \
+  do {                                                          \
+    if (uio.uio_resid && helpers::sprint(fp, &uio)) goto error; \
+    uio.uio_iovcnt = 0;                                         \
+    iovp = iov;                                                 \
+  } while (0)
+
 #include "printf_common.h"
 
 int FUNCTION_NAME(FILE* fp, const CHAR_TYPE* fmt0, va_list ap) {
@@ -115,24 +135,6 @@
   static const char xdigs_lower[] = "0123456789abcdef";
   static const char xdigs_upper[] = "0123456789ABCDEF";
 
-#define PRINT(ptr, len)                   \
-  do {                                    \
-    iovp->iov_base = (ptr);               \
-    iovp->iov_len = (len);                \
-    uio.uio_resid += (len);               \
-    iovp++;                               \
-    if (++uio.uio_iovcnt >= NIOV) {       \
-      if (helpers::sprint(fp, &uio)) goto error; \
-      iovp = iov;                         \
-    }                                     \
-  } while (0)
-#define FLUSH()                                          \
-  do {                                                   \
-    if (uio.uio_resid && helpers::sprint(fp, &uio)) goto error; \
-    uio.uio_iovcnt = 0;                                  \
-    iovp = iov;                                          \
-  } while (0)
-
   _SET_ORIENTATION(fp, CHAR_TYPE_ORIENTATION);
 
   // Writing "" to a read only file returns EOF, not 0.
@@ -359,14 +361,14 @@
         if (dtoaresult) __freedtoa(dtoaresult);
         if (flags & LONGDBL) {
           fparg.ldbl = GETARG(long double);
-          dtoaresult = cp = __hldtoa(fparg.ldbl, xdigs, prec, &expt, &signflag, &dtoaend);
+          dtoaresult = __hldtoa(fparg.ldbl, xdigs, prec, &expt, &signflag, &dtoaend);
           if (dtoaresult == nullptr) {
             errno = ENOMEM;
             goto error;
           }
         } else {
           fparg.dbl = GETARG(double);
-          dtoaresult = cp = __hdtoa(fparg.dbl, xdigs, prec, &expt, &signflag, &dtoaend);
+          dtoaresult = __hdtoa(fparg.dbl, xdigs, prec, &expt, &signflag, &dtoaend);
           if (dtoaresult == nullptr) {
             errno = ENOMEM;
             goto error;
@@ -396,14 +398,14 @@
         if (dtoaresult) __freedtoa(dtoaresult);
         if (flags & LONGDBL) {
           fparg.ldbl = GETARG(long double);
-          dtoaresult = cp = __ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend);
+          dtoaresult = __ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend);
           if (dtoaresult == nullptr) {
             errno = ENOMEM;
             goto error;
           }
         } else {
           fparg.dbl = GETARG(double);
-          dtoaresult = cp = __dtoa(fparg.dbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend);
+          dtoaresult = __dtoa(fparg.dbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend);
           if (dtoaresult == nullptr) {
             errno = ENOMEM;
             goto error;
@@ -411,6 +413,13 @@
           if (expt == 9999) expt = INT_MAX;
         }
       fp_common:
+#if CHAR_TYPE_ORIENTATION == ORIENT_BYTES
+        cp = dtoaresult;
+#else
+        free(convbuf);
+        cp = convbuf = helpers::mbsconv(dtoaresult, -1);
+        if (cp == nullptr) goto error;
+#endif
         if (signflag) sign = '-';
         if (expt == INT_MAX) { /* inf or nan */
           if (*cp == 'N') {
@@ -423,7 +432,7 @@
           break;
         }
         flags |= FPT;
-        ndig = dtoaend - cp;
+        ndig = dtoaend - dtoaresult;
         if (ch == 'g' || ch == 'G') {
           if (expt > -4 && expt <= prec) {
             /* Make %[gG] smell like %[fF] */
@@ -521,34 +530,21 @@
         _umax = UARG();
         base = DEC;
         goto nosign;
-      case 'w':
+      case 'w': {
         n = 0;
+        bool fast = false;
         ch = *fmt++;
+        if (ch == 'f') {
+          fast = true;
+          ch = *fmt++;
+        }
         while (is_digit(ch)) {
           APPEND_DIGIT(n, ch);
           ch = *fmt++;
         }
-        switch (n) {
-          case 8: {
-            flags |= CHARINT;
-            goto reswitch;
-          }
-          case 16: {
-            flags |= SHORTINT;
-            goto reswitch;
-          }
-          case 32: {
-            goto reswitch;
-          }
-          case 64: {
-            flags |= LLONGINT;
-            goto reswitch;
-          }
-          default: {
-            __fortify_fatal("%%w%d is unsupported", n);
-            break;
-          }
-        }
+        flags |= helpers::w_to_flag(n, fast);
+        goto reswitch;
+      }
       case 'X':
         xdigs = xdigs_upper;
         goto hex;
@@ -673,6 +669,7 @@
     } else { /* glue together f_p fragments */
       if (decimal_point == nullptr) decimal_point = nl_langinfo(RADIXCHAR);
       if (!expchar) { /* %[fF] or sufficiently short %[gG] */
+        CHAR_TYPE* end = cp + ndig;
         if (expt <= 0) {
           PRINT(zeroes, 1);
           if (prec || flags & ALT) PRINT(decimal_point, 1);
@@ -680,11 +677,11 @@
           /* already handled initial 0's */
           prec += expt;
         } else {
-          PRINTANDPAD(cp, dtoaend, lead, zeroes);
+          PRINTANDPAD(cp, end, lead, zeroes);
           cp += lead;
           if (prec || flags & ALT) PRINT(decimal_point, 1);
         }
-        PRINTANDPAD(cp, dtoaend, prec, zeroes);
+        PRINTANDPAD(cp, end, prec, zeroes);
       } else { /* %[eE] or sufficiently long %[gG] */
         if (prec > 1 || flags & ALT) {
           buf[0] = *cp++;
diff --git a/libc/stdio/vfscanf.cpp b/libc/stdio/vfscanf.cpp
index d05a3a6..3133f1f 100644
--- a/libc/stdio/vfscanf.cpp
+++ b/libc/stdio/vfscanf.cpp
@@ -31,53 +31,7 @@
  * SUCH DAMAGE.
  */
 
-#include <ctype.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-#include <wctype.h>
-#include "local.h"
-
-#include <private/bionic_fortify.h>
-#include <platform/bionic/macros.h>
-#include <private/bionic_mbstate.h>
-
-#define BUF 513 /* Maximum length of numeric string. */
-
-// Flags used during conversion.
-// Size/type:
-#define LONG       0x00001 // l: long or double
-#define LONGDBL    0x00002 // L: long double
-#define SHORT      0x00004 // h: short
-#define SHORTSHORT 0x00008 // hh: 8 bit integer
-#define LLONG      0x00010 // ll: long long (+ deprecated q: quad)
-#define POINTER    0x00020 // p: void* (as hex)
-#define SIZEINT    0x00040 // z: (signed) size_t
-#define MAXINT     0x00080 // j: intmax_t
-#define PTRINT     0x00100 // t: ptrdiff_t
-#define NOSKIP     0x00200 // [ or c: do not skip blanks
-// Modifiers:
-#define SUPPRESS   0x00400 // *: suppress assignment
-#define UNSIGNED   0x00800 // %[oupxX] conversions
-#define ALLOCATE   0x01000 // m: allocate a char*
-// Internal use during integer parsing:
-#define SIGNOK     0x02000 // +/- is (still) legal
-#define HAVESIGN   0x04000 // Sign detected
-#define NDIGITS    0x08000 // No digits detected
-#define PFXOK      0x10000 // "0x" prefix is (still) legal
-#define PFBOK      0x20000 // "0b" prefix is (still) legal
-#define NZDIGITS   0x40000 // No zero digits detected
-
-// Conversion types.
-#define CT_CHAR 0   // %c conversion
-#define CT_CCL 1    // %[...] conversion
-#define CT_STRING 2 // %s conversion
-#define CT_INT 3    // Integer: strtoimax/strtoumax
-#define CT_FLOAT 4  // Float: strtod
+#include "scanf_common.h"
 
 static const unsigned char* __sccl(char*, const unsigned char*);
 
@@ -102,7 +56,7 @@
   void* allocation = nullptr; // Allocated but unassigned result for %mc/%ms/%m[.
   size_t capacity = 0; // Number of char/wchar_t units allocated in `allocation`.
 
-  _SET_ORIENTATION(fp, -1);
+  _SET_ORIENTATION(fp, ORIENT_BYTES);
 
   nassigned = 0;
   nread = 0;
@@ -122,6 +76,7 @@
      */
 again:
     c = *fmt++;
+reswitch:
     switch (c) {
       case '%':
 literal:
@@ -220,6 +175,22 @@
         base = 10;
         break;
 
+      case 'w': {
+        int size = 0;
+        bool fast = false;
+        c = *fmt++;
+        if (c == 'f') {
+          fast = true;
+          c = *fmt++;
+        }
+        while (is_digit(c)) {
+          APPEND_DIGIT(size, c);
+          c = *fmt++;
+        }
+        flags |= w_to_flag(size, fast);
+        goto reswitch;
+      }
+
       case 'X':
       case 'x':
         flags |= PFXOK; /* enable 0x prefixing */
diff --git a/libc/stdio/vfwprintf.cpp b/libc/stdio/vfwprintf.cpp
index 52ae64b..d6f6a6b 100644
--- a/libc/stdio/vfwprintf.cpp
+++ b/libc/stdio/vfwprintf.cpp
@@ -39,7 +39,17 @@
 #define CHAR_TYPE_inf L"inf"
 #define CHAR_TYPE_NAN L"NAN"
 #define CHAR_TYPE_nan L"nan"
-#define CHAR_TYPE_ORIENTATION 1
+#define CHAR_TYPE_ORIENTATION ORIENT_CHARS
+
+#define PRINT(ptr, len)                                          \
+  do {                                                           \
+    for (int n3 = 0; n3 < (len); n3++) {                         \
+      if ((helpers::xfputwc((ptr)[n3], fp)) == WEOF) goto error; \
+    }                                                            \
+  } while (0)
+
+#define FLUSH()
+
 #include "printf_common.h"
 
 int FUNCTION_NAME(FILE* fp, const CHAR_TYPE* fmt0, va_list ap) {
@@ -115,13 +125,6 @@
   static const char xdigs_lower[] = "0123456789abcdef";
   static const char xdigs_upper[] = "0123456789ABCDEF";
 
-#define PRINT(ptr, len)                                   \
-  do {                                                    \
-    for (int n3 = 0; n3 < (len); n3++) {                      \
-      if ((helpers::xfputwc((ptr)[n3], fp)) == WEOF) goto error; \
-    }                                                     \
-  } while (0)
-
   _SET_ORIENTATION(fp, CHAR_TYPE_ORIENTATION);
 
   // Writing "" to a read only file returns EOF, not 0.
@@ -352,10 +355,6 @@
         }
         if (prec < 0) prec = dtoaend - dtoaresult;
         if (expt == INT_MAX) ox[1] = '\0';
-        free(convbuf);
-        cp = convbuf = helpers::mbsconv(dtoaresult, -1);
-        if (cp == nullptr) goto error;
-        ndig = dtoaend - dtoaresult;
         goto fp_common;
       case 'e':
       case 'E':
@@ -392,11 +391,14 @@
           }
           if (expt == 9999) expt = INT_MAX;
         }
+      fp_common:
+#if CHAR_TYPE_ORIENTATION == ORIENT_BYTES
+        cp = dtoaresult;
+#else
         free(convbuf);
         cp = convbuf = helpers::mbsconv(dtoaresult, -1);
         if (cp == nullptr) goto error;
-        ndig = dtoaend - dtoaresult;
-      fp_common:
+#endif
         if (signflag) sign = '-';
         if (expt == INT_MAX) { /* inf or nan */
           if (*cp == 'N') {
@@ -409,6 +411,7 @@
           break;
         }
         flags |= FPT;
+        ndig = dtoaend - dtoaresult;
         if (ch == 'g' || ch == 'G') {
           if (expt > -4 && expt <= prec) {
             /* Make %[gG] smell like %[fF] */
@@ -510,34 +513,21 @@
         _umax = UARG();
         base = DEC;
         goto nosign;
-      case 'w':
+      case 'w': {
         n = 0;
+        bool fast = false;
         ch = *fmt++;
+        if (ch == 'f') {
+          fast = true;
+          ch = *fmt++;
+        }
         while (is_digit(ch)) {
           APPEND_DIGIT(n, ch);
           ch = *fmt++;
         }
-        switch (n) {
-          case 8: {
-            flags |= CHARINT;
-            goto reswitch;
-          }
-          case 16: {
-            flags |= SHORTINT;
-            goto reswitch;
-          }
-          case 32: {
-            goto reswitch;
-          }
-          case 64: {
-            flags |= LLONGINT;
-            goto reswitch;
-          }
-          default: {
-            __fortify_fatal("%%w%d is unsupported", n);
-            break;
-          }
-        }
+        flags |= helpers::w_to_flag(n, fast);
+        goto reswitch;
+      }
       case 'X':
         xdigs = xdigs_upper;
         goto hex;
@@ -662,6 +652,7 @@
     } else { /* glue together f_p fragments */
       if (decimal_point == nullptr) decimal_point = nl_langinfo(RADIXCHAR);
       if (!expchar) { /* %[fF] or sufficiently short %[gG] */
+        CHAR_TYPE* end = cp + ndig;
         if (expt <= 0) {
           PRINT(zeroes, 1);
           if (prec || flags & ALT) PRINT(decimal_point, 1);
@@ -669,11 +660,11 @@
           /* already handled initial 0's */
           prec += expt;
         } else {
-          PRINTANDPAD(cp, convbuf + ndig, lead, zeroes);
+          PRINTANDPAD(cp, end, lead, zeroes);
           cp += lead;
           if (prec || flags & ALT) PRINT(decimal_point, 1);
         }
-        PRINTANDPAD(cp, convbuf + ndig, prec, zeroes);
+        PRINTANDPAD(cp, end, prec, zeroes);
       } else { /* %[eE] or sufficiently long %[gG] */
         if (prec > 1 || flags & ALT) {
           buf[0] = *cp++;
@@ -694,8 +685,11 @@
     if (width < realsz) width = realsz;
     if (width > INT_MAX - ret) goto overflow;
     ret += width;
+
+    FLUSH(); /* copy out the I/O vectors */
   }
 done:
+  FLUSH();
 error:
   va_end(orgap);
   if (__sferror(fp)) ret = -1;
diff --git a/libc/stdio/vfwscanf.cpp b/libc/stdio/vfwscanf.cpp
index 06f706a..3df4a87 100644
--- a/libc/stdio/vfwscanf.cpp
+++ b/libc/stdio/vfwscanf.cpp
@@ -31,62 +31,7 @@
  * SUCH DAMAGE.
  */
 
-#include <inttypes.h>
-#include <limits.h>
-#include <locale.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wctype.h>
-#include "local.h"
-
-#include <platform/bionic/macros.h>
-
-#define BUF 513 /* Maximum length of numeric string. */
-
-/*
- * Flags used during conversion.
- */
-#define LONG 0x00001       /* l: long or double */
-#define LONGDBL 0x00002    /* L: long double */
-#define SHORT 0x00004      /* h: short */
-#define SHORTSHORT 0x00008 /* hh: 8 bit integer */
-#define LLONG 0x00010      /* ll: long long (+ deprecated q: quad) */
-#define POINTER 0x00020    /* p: void * (as hex) */
-#define SIZEINT 0x00040    /* z: (signed) size_t */
-#define MAXINT 0x00080     /* j: intmax_t */
-#define PTRINT 0x00100     /* t: ptrdiff_t */
-#define NOSKIP 0x00200     /* [ or c: do not skip blanks */
-#define SUPPRESS 0x00400   /* *: suppress assignment */
-#define UNSIGNED 0x00800   /* %[oupxX] conversions */
-
-/*
- * The following are used in numeric conversions only:
- * SIGNOK, HAVESIGN, NDIGITS, DPTOK, and EXPOK are for floating point;
- * SIGNOK, HAVESIGN, NDIGITS, PFXOK, and NZDIGITS are for integral.
- */
-#define SIGNOK   0x01000  /* +/- is (still) legal */
-#define HAVESIGN 0x02000 /* sign detected */
-#define NDIGITS  0x04000 /* no digits detected */
-
-#define DPTOK    0x08000 /* (float) decimal point is still legal */
-#define EXPOK    0x10000 /* (float) exponent (e+3, etc) still legal */
-
-#define PFBOK    0x20000 /* 0x prefix is (still) legal */
-#define PFXOK    0x40000 /* 0x prefix is (still) legal */
-#define NZDIGITS 0x80000 /* no zero digits detected */
-
-/*
- * Conversion types.
- */
-#define CT_CHAR 0   /* %c conversion */
-#define CT_CCL 1    /* %[...] conversion */
-#define CT_STRING 2 /* %s conversion */
-#define CT_INT 3    /* integer, i.e., strtoimax or strtoumax */
-#define CT_FLOAT 4  /* floating, i.e., strtod */
-
+#include "scanf_common.h"
 // An interpretive version of __sccl from vfscanf.c --- a table of all wchar_t values would
 // be a little too expensive, and some kind of compressed version isn't worth the trouble.
 static inline bool in_ccl(wchar_t wc, const wchar_t* ccl) {
@@ -150,7 +95,7 @@
   char mbbuf[MB_LEN_MAX]; /* temporary mb. character buffer */
   mbstate_t mbs;
 
-  _SET_ORIENTATION(fp, 1);
+  _SET_ORIENTATION(fp, ORIENT_CHARS);
 
   nassigned = 0;
   nconversions = 0;
@@ -176,6 +121,7 @@
      */
   again:
     c = *fmt++;
+  reswitch:
     switch (c) {
       case '%':
       literal:
@@ -273,6 +219,22 @@
         base = 10;
         break;
 
+      case 'w': {
+        int size = 0;
+        bool fast = false;
+        c = *fmt++;
+        if (c == 'f') {
+          fast = true;
+          c = *fmt++;
+        }
+        while (is_digit(c)) {
+          APPEND_DIGIT(size, c);
+          c = *fmt++;
+        }
+        flags |= w_to_flag(size, fast);
+        goto reswitch;
+      }
+
       case 'X':
       case 'x':
         flags |= PFXOK; /* enable 0x prefixing */
diff --git a/libc/system_properties/context_lookup_benchmark_data.h b/libc/system_properties/context_lookup_benchmark_data.h
index b928875..1d7250c 100644
--- a/libc/system_properties/context_lookup_benchmark_data.h
+++ b/libc/system_properties/context_lookup_benchmark_data.h
@@ -321,7 +321,7 @@
 persist.vendor.         u:object_r:vendor_default_prop:s0
 vendor.                 u:object_r:vendor_default_prop:s0
 
-# Properties that relate to time / time zone detection behavior.
+# Properties that relate to time / timezone detection behavior.
 persist.time.           u:object_r:time_prop:s0
 
 # Properties that relate to server configurable flags
diff --git a/libc/tools/generate_notice.py b/libc/tools/generate_notice.py
index e004d74..505708a 100755
--- a/libc/tools/generate_notice.py
+++ b/libc/tools/generate_notice.py
@@ -33,6 +33,7 @@
         ".pyc",
         ".swp",
         ".txt",
+        ".xml",
     ]
     if path.suffix in uninteresting_extensions:
         return False
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py
index 558b004..8c457c8 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -88,7 +88,7 @@
     ecall
 
     li      a7, -MAX_ERRNO
-    bgtu    a0, a7, 1f
+    bgeu    a0, a7, 1f
 
     ret
 1:
@@ -227,11 +227,6 @@
     aliases = syscall["aliases"]
     for alias in aliases:
         stub += "\nALIAS_SYMBOL(%s, %s)\n" % (alias, syscall["func"])
-
-    # Use hidden visibility on LP64 for any functions beginning with underscores.
-    if pointer_length == 64 and syscall["func"].startswith("__"):
-        stub += '.hidden ' + syscall["func"] + '\n'
-
     return stub
 
 
diff --git a/libc/tzcode/asctime.c b/libc/tzcode/asctime.c
index ce5d4be..4cdfd13 100644
--- a/libc/tzcode/asctime.c
+++ b/libc/tzcode/asctime.c
@@ -17,12 +17,6 @@
 #include <stdio.h>
 
 /*
-** Some systems only handle "%.2d"; others only handle "%02d";
-** "%02.2d" makes (most) everybody happy.
-** At least some versions of gcc warn about the %02.2d;
-** we conditionalize below to avoid the warning.
-*/
-/*
 ** All years associated with 32-bit time_t values are exactly four digits long;
 ** some years associated with 64-bit time_t values are not.
 ** Vintage programs are coded for years that are always four digits long
@@ -34,24 +28,16 @@
 ** The ISO C and POSIX standards prohibit padding the year,
 ** but many implementations pad anyway; most likely the standards are buggy.
 */
-#ifdef __GNUC__
-#define ASCTIME_FMT	"%s %s%3d %2.2d:%2.2d:%2.2d %-4s\n"
-#else /* !defined __GNUC__ */
-#define ASCTIME_FMT	"%s %s%3d %02.2d:%02.2d:%02.2d %-4s\n"
-#endif /* !defined __GNUC__ */
+static char const ASCTIME_FMT[] = "%s %s%3d %.2d:%.2d:%.2d %-4s\n";
 /*
 ** For years that are more than four digits we put extra spaces before the year
 ** so that code trying to overwrite the newline won't end up overwriting
 ** a digit within a year and truncating the year (operating on the assumption
 ** that no output is better than wrong output).
 */
-#ifdef __GNUC__
-#define ASCTIME_FMT_B	"%s %s%3d %2.2d:%2.2d:%2.2d     %s\n"
-#else /* !defined __GNUC__ */
-#define ASCTIME_FMT_B	"%s %s%3d %02.2d:%02.2d:%02.2d     %s\n"
-#endif /* !defined __GNUC__ */
+static char const ASCTIME_FMT_B[] = "%s %s%3d %.2d:%.2d:%.2d     %s\n";
 
-#define STD_ASCTIME_BUF_SIZE	26
+enum { STD_ASCTIME_BUF_SIZE = 26 };
 /*
 ** Big enough for something such as
 ** ??? ???-2147483648 -2147483648:-2147483648:-2147483648     -2147483648\n
@@ -59,15 +45,23 @@
 ** seven explicit spaces, two explicit colons, a newline,
 ** and a trailing NUL byte).
 ** The values above are for systems where an int is 32 bits and are provided
-** as an example; the define below calculates the maximum for the system at
+** as an example; the size expression below is a bound for the system at
 ** hand.
 */
-#define MAX_ASCTIME_BUF_SIZE	(2*3+5*INT_STRLEN_MAXIMUM(int)+7+2+1+1)
+static char buf_asctime[2*3 + 5*INT_STRLEN_MAXIMUM(int) + 7 + 2 + 1 + 1];
 
-static char	buf_asctime[MAX_ASCTIME_BUF_SIZE];
+/* A similar buffer for ctime.
+   C89 requires that they be the same buffer.
+   This requirement was removed in C99, so support it only if requested,
+   as support is more likely to lead to bugs in badly written programs.  */
+#if SUPPORT_C89
+# define buf_ctime buf_asctime
+#else
+static char buf_ctime[sizeof buf_asctime];
+#endif
 
 char *
-asctime_r(register const struct tm *timeptr, char *buf)
+asctime_r(struct tm const *restrict timeptr, char *restrict buf)
 {
 	static const char	wday_name[][4] = {
 		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
@@ -79,7 +73,7 @@
 	register const char *	wn;
 	register const char *	mn;
 	char			year[INT_STRLEN_MAXIMUM(int) + 2];
-	char			result[MAX_ASCTIME_BUF_SIZE];
+	char result[sizeof buf_asctime];
 
 	if (timeptr == NULL) {
 		errno = EINVAL;
@@ -107,7 +101,8 @@
 		timeptr->tm_mday, timeptr->tm_hour,
 		timeptr->tm_min, timeptr->tm_sec,
 		year);
-	if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime)
+	if (strlen(result) < STD_ASCTIME_BUF_SIZE
+	    || buf == buf_ctime || buf == buf_asctime)
 		return strcpy(buf, result);
 	else {
 		errno = EOVERFLOW;
@@ -120,3 +115,17 @@
 {
 	return asctime_r(timeptr, buf_asctime);
 }
+
+char *
+ctime_r(const time_t *timep, char *buf)
+{
+  struct tm mytm;
+  struct tm *tmp = localtime_r(timep, &mytm);
+  return tmp ? asctime_r(tmp, buf) : NULL;
+}
+
+char *
+ctime(const time_t *timep)
+{
+  return ctime_r(timep, buf_ctime);
+}
diff --git a/libc/tzcode/bionic.cpp b/libc/tzcode/bionic.cpp
index d2b5d80..7091707 100644
--- a/libc/tzcode/bionic.cpp
+++ b/libc/tzcode/bionic.cpp
@@ -36,10 +36,45 @@
 #include "private/CachedProperty.h"
 
 extern "C" void tzset_unlocked(void);
+extern "C" void __bionic_get_system_tz(char* buf, size_t n);
 extern "C" int __bionic_open_tzdata(const char*, int32_t*);
 
 extern "C" void tzsetlcl(char const*);
 
+void __bionic_get_system_tz(char* buf, size_t n) {
+  static CachedProperty persist_sys_timezone("persist.sys.timezone");
+  const char* name = persist_sys_timezone.Get();
+
+  // If the system property is not set, perhaps because this is called
+  // before the default value has been set (the recovery image being a
+  // classic example), fall back to GMT.
+  if (name == nullptr) name = "GMT";
+
+  strlcpy(buf, name, n);
+
+  if (!strcmp(buf, "GMT")) {
+    // Typically we'll set the system property to an Olson ID, but
+    // java.util.TimeZone also supports the "GMT+xxxx" style, and at
+    // least historically (see http://b/25463955) some Android-based set
+    // top boxes would get the timezone from the TV network in this format
+    // and use it directly in the system property. This caused trouble
+    // for native code because POSIX and Java disagree about the sign in
+    // a timezone string. For POSIX, "GMT+3" means "3 hours west/behind",
+    // but for Java it means "3 hours east/ahead". Since (a) Java is the
+    // one that matches human expectations and (b) this system property is
+    // used directly by Java, we flip the sign here to translate from Java
+    // to POSIX. We only need to worry about the "GMT+xxxx" case because
+    // the expectation is that these are valid java.util.TimeZone ids,
+    // not general POSIX custom timezone specifications (which is why this
+    // code only applies to the system property, and not to the environment
+    // variable).
+    char sign = buf[3];
+    if (sign == '-' || sign == '+') {
+      buf[3] = (sign == '-') ? '+' : '-';
+    }
+  }
+}
+
 void tzset_unlocked() {
   // The TZ environment variable is meant to override the system-wide setting.
   const char* name = getenv("TZ");
@@ -47,26 +82,10 @@
 
   // If that's not set, look at the "persist.sys.timezone" system property.
   if (name == nullptr) {
-    static CachedProperty persist_sys_timezone("persist.sys.timezone");
-
-    if ((name = persist_sys_timezone.Get()) != nullptr && strlen(name) > 3) {
-      // POSIX and Java disagree about the sign in a timezone string. For POSIX, "GMT+3" means
-      // "3 hours west/behind", but for Java it means "3 hours east/ahead". Since (a) Java is
-      // the one that matches human expectations and (b) this system property is used directly
-      // by Java, we flip the sign here to translate from Java to POSIX. http://b/25463955.
-      char sign = name[3];
-      if (sign == '-' || sign == '+') {
-        strlcpy(buf, name, sizeof(buf));
-        buf[3] = (sign == '-') ? '+' : '-';
-        name = buf;
-      }
-    }
+    __bionic_get_system_tz(buf, sizeof(buf));
+    name = buf;
   }
 
-  // If the system property is also not available (because you're running AOSP on a WiFi-only
-  // device, say), fall back to GMT.
-  if (name == nullptr) name = "GMT";
-
   tzsetlcl(name);
 }
 
@@ -192,14 +211,14 @@
     close(fd);
     // This file descriptor (-1) is passed to localtime.c. In invalid fd case
     // upstream passes errno value around methods and having 0 there will
-    // indicate that time zone was found and read successfully and localtime's
+    // indicate that timezone was found and read successfully and localtime's
     // internal state was properly initialized (which wasn't as we couldn't find
-    // requested time zone in the tzdata file).
+    // requested timezone in the tzdata file).
     // If we reached this point errno is unlikely to be touched. It is only
     // close(fd) which can do it, but that is very unlikely to happen. And
     // even if it happens we can't extract any useful insights from it.
     // We are overriding it to ENOENT as it matches upstream expectations -
-    // time zone is absent in the tzdata file == there is no TZif file in
+    // timezone is absent in the tzdata file == there is no TZif file in
     // /usr/share/zoneinfo.
     errno = ENOENT;
     return -1;
@@ -219,7 +238,7 @@
   int fd;
 
   // Try the two locations for the tzdata file in a strict order:
-  // 1: The time zone data module which contains the main copy. This is the
+  // 1: The timezone data module which contains the main copy. This is the
   //    common case for current devices.
   // 2: The ultimate fallback: the non-updatable copy in /system.
 
diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c
index 8ff5cee..018acad 100644
--- a/libc/tzcode/localtime.c
+++ b/libc/tzcode/localtime.c
@@ -28,29 +28,22 @@
 static void unlock(void) { }
 #endif
 
-#ifndef TZ_ABBR_MAX_LEN
-#define TZ_ABBR_MAX_LEN 16
-#endif /* !defined TZ_ABBR_MAX_LEN */
-
 #ifndef TZ_ABBR_CHAR_SET
-#define TZ_ABBR_CHAR_SET \
+# define TZ_ABBR_CHAR_SET \
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._"
 #endif /* !defined TZ_ABBR_CHAR_SET */
 
 #ifndef TZ_ABBR_ERR_CHAR
-#define TZ_ABBR_ERR_CHAR    '_'
+# define TZ_ABBR_ERR_CHAR    '_'
 #endif /* !defined TZ_ABBR_ERR_CHAR */
 
 /*
-** SunOS 4.1.1 headers lack O_BINARY.
++** Support non-POSIX platforms that distinguish between text and binary files.
 */
 
-#ifdef O_BINARY
-#define OPEN_MODE   (O_RDONLY | O_BINARY)
-#endif /* defined O_BINARY */
 #ifndef O_BINARY
-#define OPEN_MODE   O_RDONLY
-#endif /* !defined O_BINARY */
+# define O_BINARY 0
+#endif
 
 #ifndef WILDABBR
 /*
@@ -72,12 +65,13 @@
 ** manual page of what this "time zone abbreviation" means (doing this so
 ** that tzname[0] has the "normal" length of three characters).
 */
-#define WILDABBR    "   "
+# define WILDABBR    "   "
 #endif /* !defined WILDABBR */
 
 static const char       wildabbr[] = WILDABBR;
 
-static const char gmt[] = "GMT";
+static char const etc_utc[] = "Etc/UTC";
+static char const *utc = etc_utc + sizeof "Etc/" - 1;
 
 /*
 ** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
@@ -86,7 +80,7 @@
 ** for historical reasons, US rules are a common default.
 */
 #ifndef TZDEFRULESTRING
-#define TZDEFRULESTRING ",M3.2.0,M11.1.0"
+# define TZDEFRULESTRING ",M3.2.0,M11.1.0"
 #endif
 
 struct ttinfo {              /* time type information */
@@ -102,9 +96,6 @@
     int_fast32_t ls_corr;    /* correction to apply */
 };
 
-#define SMALLEST(a, b)	(((a) < (b)) ? (a) : (b))
-#define BIGGEST(a, b)   (((a) > (b)) ? (a) : (b))
-
 /* This abbreviation means local time is unspecified.  */
 static char const UNSPEC[] = "-00";
 
@@ -112,14 +103,13 @@
    This needs to be at least 1 for null termination in case the input
    data isn't properly terminated, and it also needs to be big enough
    for ttunspecified to work without crashing.  */
-enum { CHARS_EXTRA = BIGGEST(sizeof UNSPEC, 2) - 1 };
+enum { CHARS_EXTRA = max(sizeof UNSPEC, 2) - 1 };
 
-#ifdef TZNAME_MAX
-#define MY_TZNAME_MAX   TZNAME_MAX
-#endif /* defined TZNAME_MAX */
-#ifndef TZNAME_MAX
-#define MY_TZNAME_MAX   255
-#endif /* !defined TZNAME_MAX */
+/* Limit to time zone abbreviation length in POSIX-style TZ strings.
+   This is distinct from TZ_MAX_CHARS, which limits TZif file contents.  */
+#ifndef TZNAME_MAXIMUM
+# define TZNAME_MAXIMUM 255
+#endif
 
 struct state {
     int           leapcnt;
@@ -131,9 +121,8 @@
     time_t        ats[TZ_MAX_TIMES];
     unsigned char types[TZ_MAX_TIMES];
     struct ttinfo ttis[TZ_MAX_TYPES];
-    char          chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + CHARS_EXTRA,
-                            sizeof gmt),
-                  (2 * (MY_TZNAME_MAX + 1)))];
+    char chars[max(max(TZ_MAX_CHARS + CHARS_EXTRA, sizeof "UTC"),
+		         2 * (TZNAME_MAXIMUM + 1))];
     struct lsinfo lsis[TZ_MAX_LEAPS];
     /* The time type to use for early times or if no transitions.
        It is always zero for recent tzdb releases.
@@ -174,12 +163,12 @@
 #ifndef ALL_STATE
 static struct state lclmem;
 static struct state gmtmem;
-#define lclptr      (&lclmem)
-#define gmtptr      (&gmtmem)
+static struct state *const lclptr = &lclmem;
+static struct state *const gmtptr = &gmtmem;
 #endif /* State Farm */
 
 #ifndef TZ_STRLEN_MAX
-#define TZ_STRLEN_MAX 255
+# define TZ_STRLEN_MAX 255
 #endif /* !defined TZ_STRLEN_MAX */
 
 static char lcl_TZname[TZ_STRLEN_MAX + 1];
@@ -191,9 +180,14 @@
 **  ctime, gmtime, localtime] return values in one of two static
 **  objects: a broken-down time structure and an array of char.
 ** Thanks to Paul Eggert for noting this.
+**
+** This requirement was removed in C99, so support it only if requested,
+** as support is more likely to lead to bugs in badly written programs.
 */
 
+#if SUPPORT_C89
 static struct tm	tm;
+#endif
 
 #if 2 <= HAVE_TZNAME + TZ_TIME_T
 char *			tzname[2] = {
@@ -321,7 +315,7 @@
 	int stddst_mask = 0;
 
 #if HAVE_TZNAME
-	tzname[0] = tzname[1] = (char *) (sp ? wildabbr : gmt);
+	tzname[0] = tzname[1] = (char *) (sp ? wildabbr : utc);
 	stddst_mask = 3;
 #endif
 #if USG_COMPAT
@@ -346,27 +340,28 @@
 #endif
 }
 
-static void
+/* Replace bogus characters in time zone abbreviations.
+   Return 0 on success, an errno value if a time zone abbreviation is
+   too long.  */
+static int
 scrub_abbrs(struct state *sp)
 {
 	int i;
-	/*
-	** First, replace bogus characters.
-	*/
+
+	/* Reject overlong abbreviations.  */
+	for (i = 0; i < sp->charcnt - (TZNAME_MAXIMUM + 1); ) {
+	  int len = strlen(&sp->chars[i]);
+	  if (TZNAME_MAXIMUM < len)
+	    return EOVERFLOW;
+	  i += len + 1;
+	}
+
+	/* Replace bogus characters.  */
 	for (i = 0; i < sp->charcnt; ++i)
 		if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL)
 			sp->chars[i] = TZ_ABBR_ERR_CHAR;
-	/*
-	** Second, truncate long abbreviations.
-	*/
-	for (i = 0; i < sp->typecnt; ++i) {
-		register const struct ttinfo * const	ttisp = &sp->ttis[i];
-		char *cp = &sp->chars[ttisp->tt_desigidx];
 
-		if (strlen(cp) > TZ_ABBR_MAX_LEN &&
-			strcmp(cp, GRANDPARENTED) != 0)
-				*(cp + TZ_ABBR_MAX_LEN) = '\0';
-	}
+	return 0;
 }
 
 /* Input buffer for data read from a compiled tz file.  */
@@ -379,8 +374,11 @@
      + 4 * TZ_MAX_TIMES];
 };
 
-// Android-removed: There is no directory with file-per-time zone on Android.
-#ifndef __BIONIC__
+#if defined(__BIONIC__)
+// Android: there is no directory with one file per timezone on Android,
+// but we do have a system property instead.
+#include <sys/system_properties.h>
+#else
 /* TZDIR with a trailing '/' rather than a trailing '\0'.  */
 static char const tzdirslash[sizeof TZDIR] = TZDIR "/";
 #endif
@@ -399,8 +397,7 @@
   // Android-removed: There is no directory with file-per-time zone on Android.
   #ifndef __BIONIC__
   /* The file name to be opened.  */
-  char fullname[BIGGEST(sizeof(struct file_analysis),
-      sizeof tzdirslash + 1024)];
+  char fullname[max(sizeof(struct file_analysis), sizeof tzdirslash + 1024)];
   #endif
 };
 
@@ -421,13 +418,20 @@
 #endif
 	register union input_buffer *up = &lsp->u.u;
 	register int tzheadsize = sizeof(struct tzhead);
+	char system_tz_name[PROP_VALUE_MAX];
 
 	sp->goback = sp->goahead = false;
 
 	if (! name) {
+#if defined(__BIONIC__)
+		extern void __bionic_get_system_tz(char* , size_t);
+		__bionic_get_system_tz(system_tz_name, sizeof(system_tz_name));
+		name = system_tz_name;
+#else
 		name = TZDEFAULT;
 		if (! name)
 		  return EINVAL;
+#endif
 	}
 
 #if defined(__BIONIC__)
@@ -446,8 +450,7 @@
 #endif
 	if (!doaccess) {
 		char const *dot;
-		size_t namelen = strlen(name);
-		if (sizeof lsp->fullname - sizeof tzdirslash <= namelen)
+		if (sizeof lsp->fullname - sizeof tzdirslash <= strlen(name))
 		  return ENAMETOOLONG;
 
 		/* Create a string "TZDIR/NAME".  Using sprintf here
@@ -470,7 +473,7 @@
 	}
 	if (doaccess && access(name, R_OK) != 0)
 	  return errno;
-	fid = open(name, OPEN_MODE);
+  fid = open(name, O_RDONLY | O_BINARY);
 #endif
 	if (fid < 0)
 	  return errno;
@@ -828,12 +831,14 @@
 		b < 0 || b >= sp->typecnt)
 			result = false;
 	else {
+		/* Compare the relevant members of *AP and *BP.
+		   Ignore tt_ttisstd and tt_ttisut, as they are
+		   irrelevant now and counting them could cause
+		   sp->goahead to mistakenly remain false.  */
 		register const struct ttinfo *	ap = &sp->ttis[a];
 		register const struct ttinfo *	bp = &sp->ttis[b];
 		result = (ap->tt_utoff == bp->tt_utoff
 			  && ap->tt_isdst == bp->tt_isdst
-			  && ap->tt_ttisstd == bp->tt_ttisstd
-			  && ap->tt_ttisut == bp->tt_ttisut
 			  && (strcmp(&sp->chars[ap->tt_desigidx],
 				     &sp->chars[bp->tt_desigidx])
 			      == 0));
@@ -863,7 +868,7 @@
 ** Return a pointer to that character.
 */
 
-static ATTRIBUTE_PURE const char *
+ATTRIBUTE_REPRODUCIBLE static const char *
 getzname(register const char *strp)
 {
 	register char	c;
@@ -884,7 +889,7 @@
 ** We don't do any checking here; checking is done later in common-case code.
 */
 
-static ATTRIBUTE_PURE const char *
+ATTRIBUTE_REPRODUCIBLE static const char *
 getqzname(register const char *strp, const int delim)
 {
 	register int	c;
@@ -1122,7 +1127,7 @@
             value += mon_lengths[leapyear][i] * SECSPERDAY;
         break;
 
-        default: UNREACHABLE();
+        default: unreachable();
     }
 
     /*
@@ -1144,13 +1149,11 @@
 {
 	const char *			stdname;
 	const char *			dstname;
-	size_t				stdlen;
-	size_t				dstlen;
-	size_t				charcnt;
 	int_fast32_t			stdoffset;
 	int_fast32_t			dstoffset;
 	register char *			cp;
 	register bool			load_ok;
+	ptrdiff_t stdlen, dstlen, charcnt;
 	time_t atlo = TIME_T_MIN, leaplo = TIME_T_MIN;
 
 	stdname = name;
@@ -1166,14 +1169,12 @@
 	  name = getzname(name);
 	  stdlen = name - stdname;
 	}
-	if (!stdlen)
+	if (! (0 < stdlen && stdlen <= TZNAME_MAXIMUM))
 	  return false;
 	name = getoffset(name, &stdoffset);
 	if (name == NULL)
 	  return false;
 	charcnt = stdlen + 1;
-	if (sizeof sp->chars < charcnt)
-	  return false;
 	if (basep) {
 	  if (0 < basep->timecnt)
 	    atlo = basep->ats[basep->timecnt - 1];
@@ -1200,11 +1201,9 @@
 			name = getzname(name);
 			dstlen = name - dstname; /* length of DST abbr. */
 		}
-		if (!dstlen)
+		if (! (0 < dstlen && dstlen <= TZNAME_MAXIMUM))
 		  return false;
 		charcnt += dstlen + 1;
-		if (sizeof sp->chars < charcnt)
-		  return false;
 		if (*name != '\0' && *name != ',' && *name != ';') {
 			name = getoffset(name, &dstoffset);
 			if (name == NULL)
@@ -1420,8 +1419,8 @@
 static void
 gmtload(struct state *const sp)
 {
-	if (tzload(gmt, sp, true) != 0)
-	  tzparse("GMT0", sp, NULL);
+	if (tzload(etc_utc, sp, true) != 0)
+	  tzparse("UTC0", sp, NULL);
 }
 
 /* Initialize *SP to a value appropriate for the TZ setting NAME.
@@ -1439,7 +1438,7 @@
     sp->charcnt = 0;
     sp->goback = sp->goahead = false;
     init_ttinfo(&sp->ttis[0], 0, false, 0);
-    strcpy(sp->chars, gmt);
+    strcpy(sp->chars, utc);
     sp->defaulttype = 0;
     return 0;
   } else {
@@ -1447,7 +1446,7 @@
     if (err != 0 && name && name[0] != ':' && tzparse(name, sp, NULL))
       err = 0;
     if (err == 0)
-      scrub_abbrs(sp);
+      err = scrub_abbrs(sp);
     return err;
   }
 }
@@ -1557,7 +1556,7 @@
 ** set the applicable parts of tzname, timezone and altzone;
 ** however, it's OK to omit this step if the timezone is POSIX-compatible,
 ** since in that case tzset should have already done this step correctly.
-** SETNAME's type is intfast32_t for compatibility with gmtsub,
+** SETNAME's type is int_fast32_t for compatibility with gmtsub,
 ** but it is actually a boolean and its value should be 0 or 1.
 */
 
@@ -1601,6 +1600,14 @@
 					return NULL;	/* "cannot happen" */
 			result = localsub(sp, &newt, setname, tmp);
 			if (result) {
+#if defined ckd_add && defined ckd_sub
+				if (t < sp->ats[0]
+				    ? ckd_sub(&result->tm_year,
+					      result->tm_year, years)
+				    : ckd_add(&result->tm_year,
+					      result->tm_year, years))
+				  return NULL;
+#else
 				register int_fast64_t newy;
 
 				newy = result->tm_year;
@@ -1610,6 +1617,7 @@
 				if (! (INT_MIN <= newy && newy <= INT_MAX))
 					return NULL;
 				result->tm_year = newy;
+#endif
 			}
 			return result;
 	}
@@ -1650,7 +1658,8 @@
 #if NETBSD_INSPIRED
 
 struct tm *
-localtime_rz(struct state *sp, time_t const *timep, struct tm *tmp)
+localtime_rz(struct state *restrict sp, time_t const *restrict timep,
+	     struct tm *restrict tmp)
 {
   return localsub(sp, timep, 0, tmp);
 }
@@ -1681,11 +1690,14 @@
 struct tm *
 localtime(const time_t *timep)
 {
+#if !SUPPORT_C89
+  static struct tm tm;
+#endif
   return localtime_tzset(timep, &tm);
 }
 
 struct tm *
-localtime_r(const time_t *timep, struct tm *tmp)
+localtime_r(const time_t *restrict timep, struct tm *restrict tmp)
 {
   return localtime_tzset(timep, tmp);
 }
@@ -1695,8 +1707,8 @@
 */
 
 static struct tm *
-gmtsub(struct state const *sp, time_t const *timep, int_fast32_t offset,
-       struct tm *tmp)
+gmtsub(ATTRIBUTE_MAYBE_UNUSED struct state const *sp, time_t const *timep,
+       int_fast32_t offset, struct tm *tmp)
 {
 	register struct tm *	result;
 
@@ -1708,7 +1720,7 @@
 	** but this is no time for a treasure hunt.
 	*/
 	tmp->TM_ZONE = ((char *)
-			(offset ? wildabbr : gmtptr ? gmtptr->chars : gmt));
+			(offset ? wildabbr : gmtptr ? gmtptr->chars : utc));
 #endif /* defined TM_ZONE */
 	return result;
 }
@@ -1718,7 +1730,7 @@
 */
 
 struct tm *
-gmtime_r(const time_t *timep, struct tm *tmp)
+gmtime_r(time_t const *restrict timep, struct tm *restrict tmp)
 {
   gmtcheck();
   return gmtsub(gmtptr, timep, 0, tmp);
@@ -1727,19 +1739,26 @@
 struct tm *
 gmtime(const time_t *timep)
 {
+#if !SUPPORT_C89
+  static struct tm tm;
+#endif
   return gmtime_r(timep, &tm);
 }
 
-#ifdef STD_INSPIRED
+#if STD_INSPIRED
 
 struct tm *
 offtime(const time_t *timep, long offset)
 {
   gmtcheck();
+
+#if !SUPPORT_C89
+  static struct tm tm;
+#endif
   return gmtsub(gmtptr, timep, offset, &tm);
 }
 
-#endif /* defined STD_INSPIRED */
+#endif
 
 /*
 ** Return the number of leap years through the end of the given year
@@ -1825,6 +1844,12 @@
 		y = newy;
 	}
 
+#ifdef ckd_add
+	if (ckd_add(&tmp->tm_year, y, -TM_YEAR_BASE)) {
+	  errno = EOVERFLOW;
+	  return NULL;
+	}
+#else
 	if (!TYPE_SIGNED(time_t) && y < TM_YEAR_BASE) {
 	  int signed_y = y;
 	  tmp->tm_year = signed_y - TM_YEAR_BASE;
@@ -1835,6 +1860,7 @@
 	  errno = EOVERFLOW;
 	  return NULL;
 	}
+#endif
 	tmp->tm_yday = idays;
 	/*
 	** The "extra" mods below avoid overflow problems.
@@ -1868,27 +1894,6 @@
 	return tmp;
 }
 
-char *
-ctime(const time_t *timep)
-{
-/*
-** Section 4.12.3.2 of X3.159-1989 requires that
-**	The ctime function converts the calendar time pointed to by timer
-**	to local time in the form of a string. It is equivalent to
-**		asctime(localtime(timer))
-*/
-  struct tm *tmp = localtime(timep);
-  return tmp ? asctime(tmp) : NULL;
-}
-
-char *
-ctime_r(const time_t *timep, char *buf)
-{
-  struct tm mytm;
-  struct tm *tmp = localtime_r(timep, &mytm);
-  return tmp ? asctime_r(tmp, buf) : NULL;
-}
-
 /*
 ** Adapted from code provided by Robert Elz, who writes:
 **	The "best" way to do mktime I think is based on an idea of Bob
@@ -1899,7 +1904,7 @@
 */
 
 #ifndef WRONG
-#define WRONG	(-1)
+# define WRONG (-1)
 #endif /* !defined WRONG */
 
 /*
@@ -1909,6 +1914,9 @@
 static bool
 increment_overflow(int *ip, int j)
 {
+#ifdef ckd_add
+	return ckd_add(ip, *ip, j);
+#else
 	register int const	i = *ip;
 
 	/*
@@ -1921,22 +1929,30 @@
 		return true;
 	*ip += j;
 	return false;
+#endif
 }
 
 static bool
 increment_overflow32(int_fast32_t *const lp, int const m)
 {
+#ifdef ckd_add
+	return ckd_add(lp, *lp, m);
+#else
 	register int_fast32_t const	l = *lp;
 
 	if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l))
 		return true;
 	*lp += m;
 	return false;
+#endif
 }
 
 static bool
 increment_overflow_time(time_t *tp, int_fast32_t j)
 {
+#ifdef ckd_add
+	return ckd_add(tp, *tp, j);
+#else
 	/*
 	** This is like
 	** 'if (! (TIME_T_MIN <= *tp + j && *tp + j <= TIME_T_MAX)) ...',
@@ -1948,6 +1964,7 @@
 		return true;
 	*tp += j;
 	return false;
+#endif
 }
 
 static bool
@@ -1990,6 +2007,23 @@
 	return result;
 }
 
+/* Copy to *DEST from *SRC.  Copy only the members needed for mktime,
+   as other members might not be initialized.  */
+static void
+mktmcpy(struct tm *dest, struct tm const *src)
+{
+  dest->tm_sec = src->tm_sec;
+  dest->tm_min = src->tm_min;
+  dest->tm_hour = src->tm_hour;
+  dest->tm_mday = src->tm_mday;
+  dest->tm_mon = src->tm_mon;
+  dest->tm_year = src->tm_year;
+  dest->tm_isdst = src->tm_isdst;
+#if defined TM_GMTOFF && ! UNINIT_TRAP
+  dest->TM_GMTOFF = src->TM_GMTOFF;
+#endif
+}
+
 static time_t
 time2sub(struct tm *const tmp,
 	 struct tm *(*funcp)(struct state const *, time_t const *,
@@ -2011,7 +2045,8 @@
 	struct tm			yourtm, mytm;
 
 	*okayp = false;
-	yourtm = *tmp;
+	mktmcpy(&yourtm, tmp);
+
 	if (do_norm_secs) {
 		if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec,
 			SECSPERMIN))
@@ -2053,14 +2088,19 @@
 				return WRONG;
 		}
 	}
+#ifdef ckd_add
+	if (ckd_add(&yourtm.tm_year, y, -TM_YEAR_BASE))
+	  return WRONG;
+#else
 	if (increment_overflow32(&y, -TM_YEAR_BASE))
 		return WRONG;
 	if (! (INT_MIN <= y && y <= INT_MAX))
 		return WRONG;
 	yourtm.tm_year = y;
+#endif
 	if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)
 		saved_seconds = 0;
-	else if (y + TM_YEAR_BASE < EPOCH_YEAR) {
+	else if (yourtm.tm_year < EPOCH_YEAR - TM_YEAR_BASE) {
 		/*
 		** We can't set tm_sec to 0, because that might push the
 		** time below the minimum representable time.
@@ -2120,10 +2160,10 @@
 		    && (yourtm.TM_GMTOFF < 0
 			? (-SECSPERDAY <= yourtm.TM_GMTOFF
 			   && (mytm.TM_GMTOFF <=
-			       (SMALLEST(INT_FAST32_MAX, LONG_MAX)
+			       (min(INT_FAST32_MAX, LONG_MAX)
 				+ yourtm.TM_GMTOFF)))
 			: (yourtm.TM_GMTOFF <= SECSPERDAY
-			   && ((BIGGEST(INT_FAST32_MIN, LONG_MIN)
+			   && ((max(INT_FAST32_MIN, LONG_MIN)
 				+ yourtm.TM_GMTOFF)
 			       <= mytm.TM_GMTOFF)))) {
 		  /* MYTM matches YOURTM except with the wrong UT offset.
@@ -2294,7 +2334,7 @@
 #if NETBSD_INSPIRED
 
 time_t
-mktime_z(struct state *sp, struct tm *tmp)
+mktime_z(struct state *restrict sp, struct tm *restrict tmp)
 {
   return mktime_tzname(sp, tmp, false);
 }
@@ -2324,8 +2364,7 @@
   return t;
 }
 
-#ifdef STD_INSPIRED
-
+#if STD_INSPIRED
 time_t
 timelocal(struct tm *tmp)
 {
@@ -2333,13 +2372,9 @@
 		tmp->tm_isdst = -1;	/* in case it wasn't initialized */
 	return mktime(tmp);
 }
-
-time_t
-timegm(struct tm *tmp)
-{
-  return timeoff(tmp, 0);
-}
-
+#else
+static
+#endif
 time_t
 timeoff(struct tm *tmp, long offset)
 {
@@ -2349,7 +2384,18 @@
   return time1(tmp, gmtsub, gmtptr, offset);
 }
 
-#endif /* defined STD_INSPIRED */
+time_t
+timegm(struct tm *tmp)
+{
+  time_t t;
+  struct tm tmcpy;
+  mktmcpy(&tmcpy, tmp);
+  tmcpy.tm_wday = -1;
+  t = timeoff(&tmcpy, 0);
+  if (0 <= tmcpy.tm_wday)
+    *tmp = tmcpy;
+  return t;
+}
 
 static int_fast32_t
 leapcorr(struct state const *sp, time_t t)
@@ -2370,7 +2416,7 @@
 ** XXX--is the below the right way to conditionalize??
 */
 
-#ifdef STD_INSPIRED
+#if STD_INSPIRED
 
 /* NETBSD_INSPIRED_EXTERN functions are exported to callers if
    NETBSD_INSPIRED is defined, and are private otherwise.  */
@@ -2455,7 +2501,7 @@
   return t;
 }
 
-#endif /* defined STD_INSPIRED */
+#endif /* STD_INSPIRED */
 
 #if TZ_TIME_T
 
diff --git a/libc/tzcode/private.h b/libc/tzcode/private.h
index 4c03324..838ab2b 100644
--- a/libc/tzcode/private.h
+++ b/libc/tzcode/private.h
@@ -17,6 +17,36 @@
 ** Thank you!
 */
 
+/* PORT_TO_C89 means the code should work even if the underlying
+   compiler and library support only C89.  SUPPORT_C89 means the
+   tzcode library should support C89 callers in addition to the usual
+   support for C99-and-later callers.  These macros are obsolescent,
+   and the plan is to remove them along with any code needed only when
+   they are nonzero.  */
+#ifndef PORT_TO_C89
+# define PORT_TO_C89 0
+#endif
+#ifndef SUPPORT_C89
+# define SUPPORT_C89 0
+#endif
+
+#ifndef __STDC_VERSION__
+# define __STDC_VERSION__ 0
+#endif
+
+/* Define true, false and bool if they don't work out of the box.  */
+#if PORT_TO_C89 && __STDC_VERSION__ < 199901
+# define true 1
+# define false 0
+# define bool int
+#elif __STDC_VERSION__ < 202311
+# include <stdbool.h>
+#endif
+
+#if __STDC_VERSION__ < 202311
+# define static_assert(cond) extern int static_assert_check[(cond) ? 1 : -1]
+#endif
+
 /*
 ** zdump has been made independent of the rest of the time
 ** conversion package to increase confidence in the verification it provides.
@@ -36,79 +66,86 @@
 */
 
 #ifndef HAVE_DECL_ASCTIME_R
-#define HAVE_DECL_ASCTIME_R 1
+# define HAVE_DECL_ASCTIME_R 1
 #endif
 
-#if !defined HAVE_GENERIC && defined __has_extension
+#if !defined HAVE__GENERIC && defined __has_extension
 # if __has_extension(c_generic_selections)
-#  define HAVE_GENERIC 1
+#  define HAVE__GENERIC 1
 # else
-#  define HAVE_GENERIC 0
+#  define HAVE__GENERIC 0
 # endif
 #endif
 /* _Generic is buggy in pre-4.9 GCC.  */
-#if !defined HAVE_GENERIC && defined __GNUC__
-# define HAVE_GENERIC (4 < __GNUC__ + (9 <= __GNUC_MINOR__))
+#if !defined HAVE__GENERIC && defined __GNUC__ && !defined __STRICT_ANSI__
+# define HAVE__GENERIC (4 < __GNUC__ + (9 <= __GNUC_MINOR__))
 #endif
-#ifndef HAVE_GENERIC
-# define HAVE_GENERIC (201112 <= __STDC_VERSION__)
+#ifndef HAVE__GENERIC
+# define HAVE__GENERIC (201112 <= __STDC_VERSION__)
 #endif
 
+#if !defined HAVE_GETTEXT && defined __has_include
+# if __has_include(<libintl.h>)
+#  define HAVE_GETTEXT true
+# endif
+#endif
 #ifndef HAVE_GETTEXT
-#define HAVE_GETTEXT		0
-#endif /* !defined HAVE_GETTEXT */
+# define HAVE_GETTEXT false
+#endif
 
 #ifndef HAVE_INCOMPATIBLE_CTIME_R
-#define HAVE_INCOMPATIBLE_CTIME_R	0
+# define HAVE_INCOMPATIBLE_CTIME_R 0
 #endif
 
 #ifndef HAVE_LINK
-#define HAVE_LINK		1
+# define HAVE_LINK 1
 #endif /* !defined HAVE_LINK */
 
 #ifndef HAVE_MALLOC_ERRNO
-#define HAVE_MALLOC_ERRNO 1
+# define HAVE_MALLOC_ERRNO 1
 #endif
 
 #ifndef HAVE_POSIX_DECLS
-#define HAVE_POSIX_DECLS 1
+# define HAVE_POSIX_DECLS 1
 #endif
 
-#ifndef HAVE_STDBOOL_H
-#define HAVE_STDBOOL_H (199901 <= __STDC_VERSION__)
+#ifndef HAVE_SETENV
+# define HAVE_SETENV 1
 #endif
 
 #ifndef HAVE_STRDUP
-#define HAVE_STRDUP 1
-#endif
-
-#ifndef HAVE_STRTOLL
-#define HAVE_STRTOLL 1
+# define HAVE_STRDUP 1
 #endif
 
 #ifndef HAVE_SYMLINK
-#define HAVE_SYMLINK		1
+# define HAVE_SYMLINK 1
 #endif /* !defined HAVE_SYMLINK */
 
+#if !defined HAVE_SYS_STAT_H && defined __has_include
+# if !__has_include(<sys/stat.h>)
+#  define HAVE_SYS_STAT_H false
+# endif
+#endif
 #ifndef HAVE_SYS_STAT_H
-#define HAVE_SYS_STAT_H		1
-#endif /* !defined HAVE_SYS_STAT_H */
+# define HAVE_SYS_STAT_H true
+#endif
 
+#if !defined HAVE_UNISTD_H && defined __has_include
+# if !__has_include(<unistd.h>)
+#  define HAVE_UNISTD_H false
+# endif
+#endif
 #ifndef HAVE_UNISTD_H
-#define HAVE_UNISTD_H		1
-#endif /* !defined HAVE_UNISTD_H */
-
-#ifndef HAVE_UTMPX_H
-#define HAVE_UTMPX_H		1
-#endif /* !defined HAVE_UTMPX_H */
+# define HAVE_UNISTD_H true
+#endif
 
 #ifndef NETBSD_INSPIRED
 # define NETBSD_INSPIRED 1
 #endif
 
 #if HAVE_INCOMPATIBLE_CTIME_R
-#define asctime_r _incompatible_asctime_r
-#define ctime_r _incompatible_ctime_r
+# define asctime_r _incompatible_asctime_r
+# define ctime_r _incompatible_ctime_r
 #endif /* HAVE_INCOMPATIBLE_CTIME_R */
 
 /* Enable tm_gmtoff, tm_zone, and environ on GNUish systems.  */
@@ -118,15 +155,17 @@
 /* Enable strtoimax on pre-C99 Solaris 11.  */
 #define __EXTENSIONS__ 1
 
-/* To avoid having 'stat' fail unnecessarily with errno == EOVERFLOW,
-   enable large files on GNUish systems ...  */
+/* On GNUish systems where time_t might be 32 or 64 bits, use 64.
+   On these platforms _FILE_OFFSET_BITS must also be 64; otherwise
+   setting _TIME_BITS to 64 does not work.  The code does not
+   otherwise rely on _FILE_OFFSET_BITS being 64, since it does not
+   use off_t or functions like 'stat' that depend on off_t.  */
 #ifndef _FILE_OFFSET_BITS
 # define _FILE_OFFSET_BITS 64
 #endif
-/* ... and on AIX ...  */
-#define _LARGE_FILES 1
-/* ... and enable large inode numbers on Mac OS X 10.5 and later.  */
-#define _DARWIN_USE_64_BIT_INODE 1
+#if !defined _TIME_BITS && _FILE_OFFSET_BITS == 64
+# define _TIME_BITS 64
+#endif
 
 /*
 ** Nested includes
@@ -157,8 +196,11 @@
 #undef tzalloc
 #undef tzfree
 
-#include <sys/types.h>	/* for time_t */
+#include <stddef.h>
 #include <string.h>
+#if !PORT_TO_C89
+# include <inttypes.h>
+#endif
 #include <limits.h>	/* for CHAR_BIT et al. */
 #include <stdlib.h>
 
@@ -168,6 +210,9 @@
 # define EINVAL ERANGE
 #endif
 
+#ifndef ELOOP
+# define ELOOP EINVAL
+#endif
 #ifndef ENAMETOOLONG
 # define ENAMETOOLONG EINVAL
 #endif
@@ -182,11 +227,11 @@
 #endif
 
 #if HAVE_GETTEXT
-#include <libintl.h>
+# include <libintl.h>
 #endif /* HAVE_GETTEXT */
 
 #if HAVE_UNISTD_H
-#include <unistd.h>	/* for R_OK, and other POSIX goodness */
+# include <unistd.h> /* for R_OK, and other POSIX goodness */
 #endif /* HAVE_UNISTD_H */
 
 #ifndef HAVE_STRFTIME_L
@@ -222,24 +267,29 @@
 #endif
 
 #ifndef R_OK
-#define R_OK	4
+# define R_OK 4
 #endif /* !defined R_OK */
 
+#if PORT_TO_C89
+
 /*
 ** Define HAVE_STDINT_H's default value here, rather than at the
 ** start, since __GLIBC__ and INTMAX_MAX's values depend on
-** previously-included files.  glibc 2.1 and Solaris 10 and later have
+** previously included files.  glibc 2.1 and Solaris 10 and later have
 ** stdint.h, even with pre-C99 compilers.
 */
+#if !defined HAVE_STDINT_H && defined __has_include
+# define HAVE_STDINT_H true /* C23 __has_include implies C99 stdint.h.  */
+#endif
 #ifndef HAVE_STDINT_H
-#define HAVE_STDINT_H \
+# define HAVE_STDINT_H \
    (199901 <= __STDC_VERSION__ \
-    || 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__)	\
+    || 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
     || __CYGWIN__ || INTMAX_MAX)
 #endif /* !defined HAVE_STDINT_H */
 
 #if HAVE_STDINT_H
-#include <stdint.h>
+# include <stdint.h>
 #endif /* !HAVE_STDINT_H */
 
 #ifndef HAVE_INTTYPES_H
@@ -250,36 +300,36 @@
 #endif
 
 /* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX.  */
-#ifdef __LONG_LONG_MAX__
+#if defined __LONG_LONG_MAX__ && !defined __STRICT_ANSI__
 # ifndef LLONG_MAX
 #  define LLONG_MAX __LONG_LONG_MAX__
 # endif
 # ifndef LLONG_MIN
 #  define LLONG_MIN (-1 - LLONG_MAX)
 # endif
+# ifndef ULLONG_MAX
+#  define ULLONG_MAX (LLONG_MAX * 2ull + 1)
+# endif
 #endif
 
 #ifndef INT_FAST64_MAX
-# ifdef LLONG_MAX
-typedef long long	int_fast64_t;
-#  define INT_FAST64_MIN LLONG_MIN
-#  define INT_FAST64_MAX LLONG_MAX
-# else
-#  if LONG_MAX >> 31 < 0xffffffff
-Please use a compiler that supports a 64-bit integer type (or wider);
-you may need to compile with "-DHAVE_STDINT_H".
-#  endif
-typedef long		int_fast64_t;
+# if 1 <= LONG_MAX >> 31 >> 31
+typedef long int_fast64_t;
 #  define INT_FAST64_MIN LONG_MIN
 #  define INT_FAST64_MAX LONG_MAX
+# else
+/* If this fails, compile with -DHAVE_STDINT_H or with a better compiler.  */
+typedef long long int_fast64_t;
+#  define INT_FAST64_MIN LLONG_MIN
+#  define INT_FAST64_MAX LLONG_MAX
 # endif
 #endif
 
 #ifndef PRIdFAST64
-# if INT_FAST64_MAX == LLONG_MAX
-#  define PRIdFAST64 "lld"
-# else
+# if INT_FAST64_MAX == LONG_MAX
 #  define PRIdFAST64 "ld"
+# else
+#  define PRIdFAST64 "lld"
 # endif
 #endif
 
@@ -302,6 +352,9 @@
 #ifndef INTMAX_MAX
 # ifdef LLONG_MAX
 typedef long long intmax_t;
+#  ifndef HAVE_STRTOLL
+#   define HAVE_STRTOLL true
+#  endif
 #  if HAVE_STRTOLL
 #   define strtoimax strtoll
 #  endif
@@ -325,70 +378,183 @@
 # endif
 #endif
 
+#ifndef PTRDIFF_MAX
+# define PTRDIFF_MAX MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t))
+#endif
+
 #ifndef UINT_FAST32_MAX
 typedef unsigned long uint_fast32_t;
 #endif
 
 #ifndef UINT_FAST64_MAX
-# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
-typedef unsigned long long uint_fast64_t;
+# if 3 <= ULONG_MAX >> 31 >> 31
+typedef unsigned long uint_fast64_t;
+#  define UINT_FAST64_MAX ULONG_MAX
 # else
-#  if ULONG_MAX >> 31 >> 1 < 0xffffffff
-Please use a compiler that supports a 64-bit integer type (or wider);
-you may need to compile with "-DHAVE_STDINT_H".
-#  endif
-typedef unsigned long	uint_fast64_t;
+/* If this fails, compile with -DHAVE_STDINT_H or with a better compiler.  */
+typedef unsigned long long uint_fast64_t;
+#  define UINT_FAST64_MAX ULLONG_MAX
 # endif
 #endif
 
 #ifndef UINTMAX_MAX
-# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
+# ifdef ULLONG_MAX
 typedef unsigned long long uintmax_t;
+#  define UINTMAX_MAX ULLONG_MAX
 # else
 typedef unsigned long uintmax_t;
+#  define UINTMAX_MAX ULONG_MAX
 # endif
 #endif
 
 #ifndef PRIuMAX
-# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
+# ifdef ULLONG_MAX
 #  define PRIuMAX "llu"
 # else
 #  define PRIuMAX "lu"
 # endif
 #endif
 
-#ifndef INT32_MAX
-#define INT32_MAX 0x7fffffff
-#endif /* !defined INT32_MAX */
-#ifndef INT32_MIN
-#define INT32_MIN (-1 - INT32_MAX)
-#endif /* !defined INT32_MIN */
-
 #ifndef SIZE_MAX
-#define SIZE_MAX ((size_t) -1)
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#endif /* PORT_TO_C89 */
+
+/* The maximum size of any created object, as a signed integer.
+   Although the C standard does not outright prohibit larger objects,
+   behavior is undefined if the result of pointer subtraction does not
+   fit into ptrdiff_t, and the code assumes in several places that
+   pointer subtraction works.  As a practical matter it's OK to not
+   support objects larger than this.  */
+#define INDEX_MAX ((ptrdiff_t) min(PTRDIFF_MAX, SIZE_MAX))
+
+/* Support ckd_add, ckd_sub, ckd_mul on C23 or recent-enough GCC-like
+   hosts, unless compiled with -DHAVE_STDCKDINT_H=0 or with pre-C23 EDG.  */
+#if !defined HAVE_STDCKDINT_H && defined __has_include
+# if __has_include(<stdckdint.h>)
+#  define HAVE_STDCKDINT_H true
+# endif
+#endif
+#ifdef HAVE_STDCKDINT_H
+# if HAVE_STDCKDINT_H
+#  include <stdckdint.h>
+# endif
+#elif defined __EDG__
+/* Do nothing, to work around EDG bug <https://bugs.gnu.org/53256>.  */
+#elif defined __has_builtin
+# if __has_builtin(__builtin_add_overflow)
+#  define ckd_add(r, a, b) __builtin_add_overflow(a, b, r)
+# endif
+# if __has_builtin(__builtin_sub_overflow)
+#  define ckd_sub(r, a, b) __builtin_sub_overflow(a, b, r)
+# endif
+# if __has_builtin(__builtin_mul_overflow)
+#  define ckd_mul(r, a, b) __builtin_mul_overflow(a, b, r)
+# endif
+#elif 7 <= __GNUC__
+# define ckd_add(r, a, b) __builtin_add_overflow(a, b, r)
+# define ckd_sub(r, a, b) __builtin_sub_overflow(a, b, r)
+# define ckd_mul(r, a, b) __builtin_mul_overflow(a, b, r)
 #endif
 
 #if 3 <= __GNUC__
-# define ATTRIBUTE_CONST __attribute__((const))
-# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
-# define ATTRIBUTE_PURE __attribute__((__pure__))
-# define ATTRIBUTE_FORMAT(spec) __attribute__((__format__ spec))
+# define ATTRIBUTE_MALLOC __attribute__((malloc))
+# define ATTRIBUTE_FORMAT(spec) __attribute__((format spec))
 #else
-# define ATTRIBUTE_CONST /* empty */
 # define ATTRIBUTE_MALLOC /* empty */
-# define ATTRIBUTE_PURE /* empty */
 # define ATTRIBUTE_FORMAT(spec) /* empty */
 #endif
 
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__)
-#  define _Noreturn __attribute__((__noreturn__))
+#if (defined __has_c_attribute \
+     && (202311 <= __STDC_VERSION__ || !defined __STRICT_ANSI__))
+# define HAVE___HAS_C_ATTRIBUTE true
+#else
+# define HAVE___HAS_C_ATTRIBUTE false
+#endif
+
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(deprecated)
+#  define ATTRIBUTE_DEPRECATED [[deprecated]]
+# endif
+#endif
+#ifndef ATTRIBUTE_DEPRECATED
+# if 3 < __GNUC__ + (2 <= __GNUC_MINOR__)
+#  define ATTRIBUTE_DEPRECATED __attribute__((deprecated))
 # else
-#  define _Noreturn
+#  define ATTRIBUTE_DEPRECATED /* empty */
 # endif
 #endif
 
-#if __STDC_VERSION__ < 199901 && !defined restrict
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(fallthrough)
+#  define ATTRIBUTE_FALLTHROUGH [[fallthrough]]
+# endif
+#endif
+#ifndef ATTRIBUTE_FALLTHROUGH
+# if 7 <= __GNUC__
+#  define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough))
+# else
+#  define ATTRIBUTE_FALLTHROUGH ((void) 0)
+# endif
+#endif
+
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(maybe_unused)
+#  define ATTRIBUTE_MAYBE_UNUSED [[maybe_unused]]
+# endif
+#endif
+#ifndef ATTRIBUTE_MAYBE_UNUSED
+# if 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#  define ATTRIBUTE_MAYBE_UNUSED __attribute__((unused))
+# else
+#  define ATTRIBUTE_MAYBE_UNUSED /* empty */
+# endif
+#endif
+
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(noreturn)
+#  define ATTRIBUTE_NORETURN [[noreturn]]
+# endif
+#endif
+#ifndef ATTRIBUTE_NORETURN
+# if 201112 <= __STDC_VERSION__
+#  define ATTRIBUTE_NORETURN _Noreturn
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__)
+#  define ATTRIBUTE_NORETURN __attribute__((noreturn))
+# else
+#  define ATTRIBUTE_NORETURN /* empty */
+# endif
+#endif
+
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(reproducible)
+#  define ATTRIBUTE_REPRODUCIBLE [[reproducible]]
+# endif
+#endif
+#ifndef ATTRIBUTE_REPRODUCIBLE
+# if 3 <= __GNUC__
+#  define ATTRIBUTE_REPRODUCIBLE __attribute__((pure))
+# else
+#  define ATTRIBUTE_REPRODUCIBLE /* empty */
+# endif
+#endif
+
+#if HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute(unsequenced)
+#  define ATTRIBUTE_UNSEQUENCED [[unsequenced]]
+# endif
+#endif
+#ifndef ATTRIBUTE_UNSEQUENCED
+# if 3 <= __GNUC__
+#  define ATTRIBUTE_UNSEQUENCED __attribute__((const))
+# else
+#  define ATTRIBUTE_UNSEQUENCED /* empty */
+# endif
+#endif
+
+#if (__STDC_VERSION__ < 199901 && !defined restrict \
+     && (PORT_TO_C89 || defined _MSC_VER))
 # define restrict /* empty */
 #endif
 
@@ -505,11 +671,16 @@
 #  define altzone tz_altzone
 # endif
 
-char *asctime(struct tm const *);
+# if __STDC_VERSION__ < 202311
+#  define DEPRECATED_IN_C23 /* empty */
+# else
+#  define DEPRECATED_IN_C23 ATTRIBUTE_DEPRECATED
+# endif
+DEPRECATED_IN_C23 char *asctime(struct tm const *);
 char *asctime_r(struct tm const *restrict, char *restrict);
-char *ctime(time_t const *);
+DEPRECATED_IN_C23 char *ctime(time_t const *);
 char *ctime_r(time_t const *, char *);
-double difftime(time_t, time_t) ATTRIBUTE_CONST;
+ATTRIBUTE_UNSEQUENCED double difftime(time_t, time_t);
 size_t strftime(char *restrict, size_t, char const *restrict,
 		struct tm const *restrict);
 # if HAVE_STRFTIME_L
@@ -522,9 +693,24 @@
 struct tm *localtime_r(time_t const *restrict, struct tm *restrict);
 time_t mktime(struct tm *);
 time_t time(time_t *);
+time_t timegm(struct tm *);
 void tzset(void);
 #endif
 
+#ifndef HAVE_DECL_TIMEGM
+# if (202311 <= __STDC_VERSION__ \
+      || defined __GLIBC__ || defined __tm_zone /* musl */ \
+      || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
+      || (defined __APPLE__ && defined __MACH__))
+#  define HAVE_DECL_TIMEGM true
+# else
+#  define HAVE_DECL_TIMEGM false
+# endif
+#endif
+#if !HAVE_DECL_TIMEGM && !defined timegm
+time_t timegm(struct tm *);
+#endif
+
 #if !HAVE_DECL_ASCTIME_R && !defined asctime_r
 extern char *asctime_r(struct tm const *restrict, char *restrict);
 #endif
@@ -557,13 +743,13 @@
 ** declarations if time_tz is defined.
 */
 
-#ifdef STD_INSPIRED
+#ifndef STD_INSPIRED
+# define STD_INSPIRED 0
+#endif
+#if STD_INSPIRED
 # if TZ_TIME_T || !defined offtime
 struct tm *offtime(time_t const *, long);
 # endif
-# if TZ_TIME_T || !defined timegm
-time_t timegm(struct tm *);
-# endif
 # if TZ_TIME_T || !defined timelocal
 time_t timelocal(struct tm *);
 # endif
@@ -581,6 +767,7 @@
 /* Infer TM_ZONE on systems where this information is known, but suppress
    guessing if NO_TM_ZONE is defined.  Similarly for TM_GMTOFF.  */
 #if (defined __GLIBC__ \
+     || defined __tm_zone /* musl */ \
      || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
      || (defined __APPLE__ && defined __MACH__))
 # if !defined TM_GMTOFF && !defined NO_TM_GMTOFF
@@ -606,12 +793,12 @@
 time_t mktime_z(timezone_t restrict, struct tm *restrict);
 timezone_t tzalloc(char const *);
 void tzfree(timezone_t);
-# ifdef STD_INSPIRED
+# if STD_INSPIRED
 #  if TZ_TIME_T || !defined posix2time_z
-time_t posix2time_z(timezone_t, time_t) ATTRIBUTE_PURE;
+ATTRIBUTE_REPRODUCIBLE time_t posix2time_z(timezone_t, time_t);
 #  endif
 #  if TZ_TIME_T || !defined time2posix_z
-time_t time2posix_z(timezone_t, time_t) ATTRIBUTE_PURE;
+ATTRIBUTE_REPRODUCIBLE time_t time2posix_z(timezone_t, time_t);
 #  endif
 # endif
 #endif
@@ -620,18 +807,15 @@
 ** Finally, some convenience items.
 */
 
-#if HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-# define true 1
-# define false 0
-# define bool int
-#endif
-
-#define TYPE_BIT(type)	(sizeof(type) * CHAR_BIT)
+#define TYPE_BIT(type) (CHAR_BIT * (ptrdiff_t) sizeof(type))
 #define TYPE_SIGNED(type) (((type) -1) < 0)
 #define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0)
 
+/* Minimum and maximum of two values.  Use lower case to avoid
+   naming clashes with standard include files.  */
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
 /* Max and min values of the integer type T, of which only the bottom
    B bits are used, and where the highest-order used bit is considered
    to be a sign bit if T is signed.  */
@@ -651,7 +835,7 @@
    This implementation assumes no padding if time_t is signed and
    either the compiler lacks support for _Generic or time_t is not one
    of the standard signed integer types.  */
-#if HAVE_GENERIC
+#if HAVE__GENERIC
 # define TIME_T_MIN \
     _Generic((time_t) 0, \
 	     signed char: SCHAR_MIN, short: SHRT_MIN, \
@@ -664,10 +848,23 @@
 		int: INT_MAX, long: LONG_MAX, long long: LLONG_MAX, \
 		default: TIME_T_MAX_NO_PADDING)			    \
      : (time_t) -1)
+enum { SIGNED_PADDING_CHECK_NEEDED
+         = _Generic((time_t) 0,
+		    signed char: false, short: false,
+		    int: false, long: false, long long: false,
+		    default: true) };
 #else
 # define TIME_T_MIN TIME_T_MIN_NO_PADDING
 # define TIME_T_MAX TIME_T_MAX_NO_PADDING
+enum { SIGNED_PADDING_CHECK_NEEDED = true };
 #endif
+/* Try to check the padding assumptions.  Although TIME_T_MAX and the
+   following check can both have undefined behavior on oddball
+   platforms due to shifts exceeding widths of signed integers, these
+   platforms' compilers are likely to diagnose these issues in integer
+   constant expressions, so it shouldn't hurt to check statically.  */
+static_assert(! TYPE_SIGNED(time_t) || ! SIGNED_PADDING_CHECK_NEEDED
+	      || TIME_T_MAX >> (TYPE_BIT(time_t) - 2) == 1);
 
 /*
 ** 302 / 1000 is log10(2.0) rounded up.
@@ -689,21 +886,30 @@
 # define INITIALIZE(x)
 #endif
 
+/* Whether memory access must strictly follow the C standard.
+   If 0, it's OK to read uninitialized storage so long as the value is
+   not relied upon.  Defining it to 0 lets mktime access parts of
+   struct tm that might be uninitialized, as a heuristic when the
+   standard doesn't say what to return and when tm_gmtoff can help
+   mktime likely infer a better value.  */
 #ifndef UNINIT_TRAP
 # define UNINIT_TRAP 0
 #endif
 
 #ifdef DEBUG
-# define UNREACHABLE() abort()
-#elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
-# define UNREACHABLE() __builtin_unreachable()
-#elif defined __has_builtin
-# if __has_builtin(__builtin_unreachable)
-#  define UNREACHABLE() __builtin_unreachable()
+# undef unreachable
+# define unreachable() abort()
+#elif !defined unreachable
+# ifdef __has_builtin
+#  if __has_builtin(__builtin_unreachable)
+#   define unreachable() __builtin_unreachable()
+#  endif
+# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+#  define unreachable() __builtin_unreachable()
 # endif
-#endif
-#ifndef UNREACHABLE
-# define UNREACHABLE() ((void) 0)
+# ifndef unreachable
+#  define unreachable() ((void) 0)
+# endif
 #endif
 
 /*
@@ -725,53 +931,61 @@
 #if HAVE_INCOMPATIBLE_CTIME_R
 #undef asctime_r
 #undef ctime_r
-char *asctime_r(struct tm const *, char *);
+char *asctime_r(struct tm const *restrict, char *restrict);
 char *ctime_r(time_t const *, char *);
 #endif /* HAVE_INCOMPATIBLE_CTIME_R */
 
 /* Handy macros that are independent of tzfile implementation.  */
 
-#define SECSPERMIN	60
-#define MINSPERHOUR	60
-#define HOURSPERDAY	24
-#define DAYSPERWEEK	7
-#define DAYSPERNYEAR	365
-#define DAYSPERLYEAR	366
-#define SECSPERHOUR	(SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY	((int_fast32_t) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR	12
+enum {
+  SECSPERMIN = 60,
+  MINSPERHOUR = 60,
+  SECSPERHOUR = SECSPERMIN * MINSPERHOUR,
+  HOURSPERDAY = 24,
+  DAYSPERWEEK = 7,
+  DAYSPERNYEAR = 365,
+  DAYSPERLYEAR = DAYSPERNYEAR + 1,
+  MONSPERYEAR = 12,
+  YEARSPERREPEAT = 400	/* years before a Gregorian repeat */
+};
 
-#define YEARSPERREPEAT		400	/* years before a Gregorian repeat */
+#define SECSPERDAY	((int_fast32_t) SECSPERHOUR * HOURSPERDAY)
+
 #define DAYSPERREPEAT		((int_fast32_t) 400 * 365 + 100 - 4 + 1)
 #define SECSPERREPEAT		((int_fast64_t) DAYSPERREPEAT * SECSPERDAY)
 #define AVGSECSPERYEAR		(SECSPERREPEAT / YEARSPERREPEAT)
 
-#define TM_SUNDAY	0
-#define TM_MONDAY	1
-#define TM_TUESDAY	2
-#define TM_WEDNESDAY	3
-#define TM_THURSDAY	4
-#define TM_FRIDAY	5
-#define TM_SATURDAY	6
+enum {
+  TM_SUNDAY,
+  TM_MONDAY,
+  TM_TUESDAY,
+  TM_WEDNESDAY,
+  TM_THURSDAY,
+  TM_FRIDAY,
+  TM_SATURDAY
+};
 
-#define TM_JANUARY	0
-#define TM_FEBRUARY	1
-#define TM_MARCH	2
-#define TM_APRIL	3
-#define TM_MAY		4
-#define TM_JUNE		5
-#define TM_JULY		6
-#define TM_AUGUST	7
-#define TM_SEPTEMBER	8
-#define TM_OCTOBER	9
-#define TM_NOVEMBER	10
-#define TM_DECEMBER	11
+enum {
+  TM_JANUARY,
+  TM_FEBRUARY,
+  TM_MARCH,
+  TM_APRIL,
+  TM_MAY,
+  TM_JUNE,
+  TM_JULY,
+  TM_AUGUST,
+  TM_SEPTEMBER,
+  TM_OCTOBER,
+  TM_NOVEMBER,
+  TM_DECEMBER
+};
 
-#define TM_YEAR_BASE	1900
-#define TM_WDAY_BASE	TM_MONDAY
-
-#define EPOCH_YEAR	1970
-#define EPOCH_WDAY	TM_THURSDAY
+enum {
+  TM_YEAR_BASE = 1900,
+  TM_WDAY_BASE = TM_MONDAY,
+  EPOCH_YEAR = 1970,
+  EPOCH_WDAY = TM_THURSDAY
+};
 
 #define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
 
diff --git a/libc/tzcode/strftime.c b/libc/tzcode/strftime.c
index d04c5ba..4cde556 100644
--- a/libc/tzcode/strftime.c
+++ b/libc/tzcode/strftime.c
@@ -71,8 +71,6 @@
     const char *    date_fmt;
 };
 
-#define Locale  (&C_time_locale)
-
 static const struct lc_time_T   C_time_locale = {
     {
         "Jan", "Feb", "Mar", "Apr", "May", "Jun",
@@ -128,13 +126,14 @@
 static char *   _yconv(int, int, bool, bool, char *, const char *, int);
 
 #ifndef YEAR_2000_NAME
-#define YEAR_2000_NAME  "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
+# define YEAR_2000_NAME  "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
 #endif /* !defined YEAR_2000_NAME */
 
 #if HAVE_STRFTIME_L
 size_t
-strftime_l(char *s, size_t maxsize, char const *format, struct tm const *t,
-	   locale_t locale)
+strftime_l(char *restrict s, size_t maxsize, char const *restrict format,
+	   struct tm const *restrict t,
+	   ATTRIBUTE_MAYBE_UNUSED locale_t locale)
 {
   /* Just call strftime, as only the C locale is supported.  */
   return strftime(s, maxsize, format, t);
@@ -144,7 +143,8 @@
 #define FORCE_LOWER_CASE 0x100 /* Android extension. */
 
 size_t
-strftime(char *s, size_t maxsize, const char *format, const struct tm *t)
+strftime(char *restrict s, size_t maxsize, char const *restrict format,
+	 struct tm const *restrict t)
 {
     char *  p;
     int saved_errno = errno;
@@ -217,6 +217,8 @@
 _fmt(const char *format, const struct tm *t, char *pt,
         const char *ptlim, enum warn *warnp)
 {
+	struct lc_time_T const *Locale = &C_time_locale;
+
     for ( ; *format; ++format) {
         if (*format == '%') {
             int modifier = 0;
@@ -378,12 +380,21 @@
                     char buf[INT_STRLEN_MAXIMUM(time64_t) + 1] __attribute__((__uninitialized__));
                     time64_t    mkt;
 
-                    tm = *t;
+          					tm.tm_sec = t->tm_sec;
+					          tm.tm_min = t->tm_min;
+          					tm.tm_hour = t->tm_hour;
+					          tm.tm_mday = t->tm_mday;
+          					tm.tm_mon = t->tm_mon;
+					          tm.tm_year = t->tm_year;
+          					tm.tm_isdst = t->tm_isdst;
+#if defined TM_GMTOFF && ! UNINIT_TRAP
+					          tm.TM_GMTOFF = t->TM_GMTOFF;
+#endif
                     mkt = mktime64(&tm);
-					/* There is no portable, definitive
-					   test for whether whether mktime
-					   succeeded, so treat (time_t) -1 as
-					   the success that it might be.  */
+					/* If mktime fails, %s expands to the
+              value of (time_t) -1 as a failure
+              marker; this is better in practice
+              than strftime failing.  */
                     if (TYPE_SIGNED(time64_t)) {
                       intmax_t n = mkt;
                       sprintf(buf, "%"PRIdMAX, n);
@@ -607,19 +618,19 @@
 # endif
                 negative = diff < 0;
                 if (diff == 0) {
-#ifdef TM_ZONE
+# ifdef TM_ZONE
                   // Android-changed: do not use TM_ZONE as it is as it may be null.
                   {
                     const char* zone = _safe_tm_zone(t);
                     negative = zone[0] == '-';
                   }
-#else
+# else
                     negative = t->tm_isdst < 0;
-# if HAVE_TZNAME
+#  if HAVE_TZNAME
                     if (tzname[t->tm_isdst != 0][0] == '-')
                         negative = true;
+#  endif
 # endif
-#endif
                 }
                 if (negative) {
                     sign = "-";
@@ -748,7 +759,7 @@
     register int    lead;
     register int    trail;
 
-#define DIVISOR 100
+    int DIVISOR = 100;
     trail = a % DIVISOR + b % DIVISOR;
     lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
     trail %= DIVISOR;
diff --git a/libc/tzcode/strptime.c b/libc/tzcode/strptime.c
index d31a501..ae7881e 100644
--- a/libc/tzcode/strptime.c
+++ b/libc/tzcode/strptime.c
@@ -28,6 +28,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "private.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
@@ -37,7 +39,6 @@
 #include <time.h>
 
 #include "localedef.h"
-#include "private.h"
 #include "tzfile.h"
 
 // Android: ignore OpenBSD's DEF_WEAK() stuff.
diff --git a/libc/tzcode/tzfile.h b/libc/tzcode/tzfile.h
index c5f9967..7ac8b51 100644
--- a/libc/tzcode/tzfile.h
+++ b/libc/tzcode/tzfile.h
@@ -22,15 +22,15 @@
 */
 
 #ifndef TZDIR
-#define TZDIR	"/usr/share/zoneinfo" /* Time zone object file directory */
+# define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
 #endif /* !defined TZDIR */
 
 #ifndef TZDEFAULT
-#define TZDEFAULT	"/etc/localtime"
+# define TZDEFAULT "/etc/localtime"
 #endif /* !defined TZDEFAULT */
 
 #ifndef TZDEFRULES
-#define TZDEFRULES	"posixrules"
+# define TZDEFRULES "posixrules"
 #endif /* !defined TZDEFRULES */
 
 
@@ -103,21 +103,25 @@
 */
 
 #ifndef TZ_MAX_TIMES
-#define TZ_MAX_TIMES	2000
+/* This must be at least 242 for Europe/London with 'zic -b fat'.  */
+# define TZ_MAX_TIMES 2000
 #endif /* !defined TZ_MAX_TIMES */
 
 #ifndef TZ_MAX_TYPES
-/* This must be at least 17 for Europe/Samara and Europe/Vilnius.  */
-#define TZ_MAX_TYPES	256 /* Limited by what (unsigned char)'s can hold */
+/* This must be at least 18 for Europe/Vilnius with 'zic -b fat'.  */
+# define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
 #endif /* !defined TZ_MAX_TYPES */
 
 #ifndef TZ_MAX_CHARS
-#define TZ_MAX_CHARS	50	/* Maximum number of abbreviation characters */
+/* This must be at least 40 for America/Anchorage.  */
+# define TZ_MAX_CHARS 50	/* Maximum number of abbreviation characters */
 				/* (limited by what unsigned chars can hold) */
 #endif /* !defined TZ_MAX_CHARS */
 
 #ifndef TZ_MAX_LEAPS
-#define TZ_MAX_LEAPS	50	/* Maximum number of leap second corrections */
+/* This must be at least 27 for leap seconds from 1972 through mid-2023.
+   There's a plan to discontinue leap seconds by 2035.  */
+# define TZ_MAX_LEAPS 50	/* Maximum number of leap second corrections */
 #endif /* !defined TZ_MAX_LEAPS */
 
 #define SECSPERMIN	60
diff --git a/libc/bionic/timespec_get.cpp b/libc/upstream-freebsd/android/include/xlocale_private.h
similarity index 86%
copy from libc/bionic/timespec_get.cpp
copy to libc/upstream-freebsd/android/include/xlocale_private.h
index 7fc2182..010d70c 100644
--- a/libc/bionic/timespec_get.cpp
+++ b/libc/upstream-freebsd/android/include/xlocale_private.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,8 +26,10 @@
  * SUCH DAMAGE.
  */
 
-#include <time.h>
+#pragma once
 
-int timespec_get(timespec* ts, int base) {
-  return (base == TIME_UTC && clock_gettime(CLOCK_REALTIME, ts) != -1) ? base : 0;
-}
+#include <locale.h>
+
+#define __get_locale() LC_GLOBAL_LOCALE
+
+#define FIX_LOCALE(__l) /* Nothing. */
diff --git a/libc/upstream-freebsd/lib/libc/locale/wcsftime.c b/libc/upstream-freebsd/lib/libc/locale/wcsftime.c
new file mode 100644
index 0000000..aabb632
--- /dev/null
+++ b/libc/upstream-freebsd/lib/libc/locale/wcsftime.c
@@ -0,0 +1,124 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2002 Tim J. Robbins
+ * All rights reserved.
+ *
+ * Copyright (c) 2011 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by David Chisnall
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <time.h>
+#include <wchar.h>
+#include "xlocale_private.h"
+
+/*
+ * Convert date and time to a wide-character string.
+ *
+ * This is the wide-character counterpart of strftime(). So that we do not
+ * have to duplicate the code of strftime(), we convert the format string to
+ * multibyte, call strftime(), then convert the result back into wide
+ * characters.
+ *
+ * This technique loses in the presence of stateful multibyte encoding if any
+ * of the conversions in the format string change conversion state. When
+ * stateful encoding is implemented, we will need to reset the state between
+ * format specifications in the format string.
+ */
+size_t
+wcsftime_l(wchar_t * __restrict wcs, size_t maxsize,
+	const wchar_t * __restrict format, const struct tm * __restrict timeptr,
+	locale_t locale)
+{
+	static const mbstate_t initial;
+	mbstate_t mbs;
+	char *dst, *sformat;
+	const char *dstp;
+	const wchar_t *formatp;
+	size_t n, sflen;
+	int sverrno;
+	FIX_LOCALE(locale);
+
+	sformat = dst = NULL;
+
+	/*
+	 * Convert the supplied format string to a multibyte representation
+	 * for strftime(), which only handles single-byte characters.
+	 */
+	mbs = initial;
+	formatp = format;
+	sflen = wcsrtombs_l(NULL, &formatp, 0, &mbs, locale);
+	if (sflen == (size_t)-1)
+		goto error;
+	if ((sformat = malloc(sflen + 1)) == NULL)
+		goto error;
+	mbs = initial;
+	wcsrtombs_l(sformat, &formatp, sflen + 1, &mbs, locale);
+
+	/*
+	 * Allocate memory for longest multibyte sequence that will fit
+	 * into the caller's buffer and call strftime() to fill it.
+	 * Then, copy and convert the result back into wide characters in
+	 * the caller's buffer.
+	 */
+	if (SIZE_T_MAX / MB_CUR_MAX <= maxsize) {
+		/* maxsize is prepostorously large - avoid int. overflow. */
+		errno = EINVAL;
+		goto error;
+	}
+	if ((dst = malloc(maxsize * MB_CUR_MAX)) == NULL)
+		goto error;
+	if (strftime_l(dst, maxsize, sformat, timeptr, locale) == 0)
+		goto error;
+	dstp = dst;
+	mbs = initial;
+	n = mbsrtowcs_l(wcs, &dstp, maxsize, &mbs, locale);
+	if (n == (size_t)-2 || n == (size_t)-1 || dstp != NULL)
+		goto error;
+
+	free(sformat);
+	free(dst);
+	return (n);
+
+error:
+	sverrno = errno;
+	free(sformat);
+	free(dst);
+	errno = sverrno;
+	return (0);
+}
+size_t
+wcsftime(wchar_t * __restrict wcs, size_t maxsize,
+	const wchar_t * __restrict format, const struct tm * __restrict timeptr)
+{
+	return wcsftime_l(wcs, maxsize, format, timeptr, __get_locale());
+}
diff --git a/libc/upstream-openbsd/lib/libc/time/wcsftime.c b/libc/upstream-openbsd/lib/libc/time/wcsftime.c
deleted file mode 100644
index 6870871..0000000
--- a/libc/upstream-openbsd/lib/libc/time/wcsftime.c
+++ /dev/null
@@ -1,550 +0,0 @@
-/*	$OpenBSD: wcsftime.c,v 1.7 2019/05/12 12:49:52 schwarze Exp $ */
-/*
-** Based on the UCB version with the ID appearing below.
-** This is ANSIish only when "multibyte character == plain character".
-**
-** Copyright (c) 1989, 1993
-**	The Regents of the University of California.  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.
-** 3. Neither the name of the University nor the names of its contributors
-**    may be used to endorse or promote products derived from this software
-**    without specific prior written permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
-*/
-
-#include <fcntl.h>
-#include <locale.h>
-#include <wchar.h>
-
-#include "private.h"
-#include "tzfile.h"
-
-struct lc_time_T {
-	const wchar_t *	mon[MONSPERYEAR];
-	const wchar_t *	month[MONSPERYEAR];
-	const wchar_t *	wday[DAYSPERWEEK];
-	const wchar_t *	weekday[DAYSPERWEEK];
-	const wchar_t *	X_fmt;
-	const wchar_t *	x_fmt;
-	const wchar_t *	c_fmt;
-	const wchar_t *	am;
-	const wchar_t *	pm;
-	const wchar_t *	date_fmt;
-};
-
-#define Locale	(&C_time_locale)
-
-static const struct lc_time_T	C_time_locale = {
-	{
-		L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun",
-		L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec"
-	}, {
-		L"January", L"February", L"March", L"April", L"May", L"June",
-		L"July", L"August", L"September", L"October", L"November", 
-		L"December"
-	}, {
-		L"Sun", L"Mon", L"Tue", L"Wed",
-		L"Thu", L"Fri", L"Sat"
-	}, {
-		L"Sunday", L"Monday", L"Tuesday", L"Wednesday",
-		L"Thursday", L"Friday", L"Saturday"
-	},
-
-	/* X_fmt */
-	L"%H:%M:%S",
-
-	/*
-	** x_fmt
-	** C99 requires this format.
-	** Using just numbers (as here) makes Quakers happier;
-	** it's also compatible with SVR4.
-	*/
-	L"%m/%d/%y",
-
-	/*
-	** c_fmt
-	** C99 requires this format.
-	** Previously this code used "%D %X", but we now conform to C99.
-	** Note that
-	**	"%a %b %d %H:%M:%S %Y"
-	** is used by Solaris 2.3.
-	*/
-	L"%a %b %e %T %Y",
-
-	/* am */
-	L"AM",
-
-	/* pm */
-	L"PM",
-
-	/* date_fmt */
-	L"%a %b %e %H:%M:%S %Z %Y"
-};
-
-#define UNKNOWN L"?"
-static wchar_t *	_add(const wchar_t *, wchar_t *, const wchar_t *);
-static wchar_t *	_sadd(const char *, wchar_t *, const wchar_t *);
-static wchar_t *	_conv(int, const wchar_t *, wchar_t *, const wchar_t *);
-static wchar_t *	_fmt(const wchar_t *, const struct tm *, wchar_t *, const wchar_t *,
-			int *);
-static wchar_t *	_yconv(int, int, int, int, wchar_t *, const wchar_t *);
-
-extern char *	tzname[];
-
-#define IN_NONE	0
-#define IN_SOME	1
-#define IN_THIS	2
-#define IN_ALL	3
-
-size_t
-wcsftime(wchar_t *__restrict s, size_t maxsize, 
-    const wchar_t *__restrict format, const struct tm *__restrict t)
-{
-	wchar_t *p;
-	int	warn;
-
-	tzset();
-	warn = IN_NONE;
-	p = _fmt(((format == NULL) ? L"%c" : format), t, s, s + maxsize, &warn);
-	if (p == s + maxsize) {
-		if (maxsize > 0)
-			s[maxsize - 1] = '\0';
-		return 0;
-	}
-	*p = L'\0';
-	return p - s;
-}
-
-static wchar_t *
-_fmt(const wchar_t *format, const struct tm *t, wchar_t *pt, 
-    const wchar_t *ptlim, int *warnp)
-{
-	for ( ; *format; ++format) {
-		if (*format != L'%') {
-			if (pt == ptlim)
-				break;
-			*pt++ = *format;
-			continue;
-		}
-label:
-		switch (*++format) {
-		case '\0':
-			--format;
-			break;
-		case 'A':
-			pt = _add((t->tm_wday < 0 ||
-				t->tm_wday >= DAYSPERWEEK) ?
-				UNKNOWN : Locale->weekday[t->tm_wday],
-				pt, ptlim);
-			continue;
-		case 'a':
-			pt = _add((t->tm_wday < 0 ||
-				t->tm_wday >= DAYSPERWEEK) ?
-				UNKNOWN : Locale->wday[t->tm_wday],
-				pt, ptlim);
-			continue;
-		case 'B':
-			pt = _add((t->tm_mon < 0 ||
-				t->tm_mon >= MONSPERYEAR) ?
-				UNKNOWN : Locale->month[t->tm_mon],
-				pt, ptlim);
-			continue;
-		case 'b':
-		case 'h':
-			pt = _add((t->tm_mon < 0 ||
-				t->tm_mon >= MONSPERYEAR) ?
-				UNKNOWN : Locale->mon[t->tm_mon],
-				pt, ptlim);
-			continue;
-		case 'C':
-			/*
-			** %C used to do a...
-			**	_fmt("%a %b %e %X %Y", t);
-			** ...whereas now POSIX 1003.2 calls for
-			** something completely different.
-			** (ado, 1993-05-24)
-			*/
-			pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0,
-				pt, ptlim);
-			continue;
-		case 'c':
-			{
-			int warn2 = IN_SOME;
-
-			pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2);
-			if (warn2 == IN_ALL)
-				warn2 = IN_THIS;
-			if (warn2 > *warnp)
-				*warnp = warn2;
-			}
-			continue;
-		case 'D':
-			pt = _fmt(L"%m/%d/%y", t, pt, ptlim, warnp);
-			continue;
-		case 'd':
-			pt = _conv(t->tm_mday, L"%02d", pt, ptlim);
-			continue;
-		case 'E':
-		case 'O':
-			/*
-			** C99 locale modifiers.
-			** The sequences
-			**	%Ec %EC %Ex %EX %Ey %EY
-			**	%Od %oe %OH %OI %Om %OM
-			**	%OS %Ou %OU %OV %Ow %OW %Oy
-			** are supposed to provide alternate
-			** representations.
-			*/
-			goto label;
-		case 'e':
-			pt = _conv(t->tm_mday, L"%2d", pt, ptlim);
-			continue;
-		case 'F':
-			pt = _fmt(L"%Y-%m-%d", t, pt, ptlim, warnp);
-			continue;
-		case 'H':
-			pt = _conv(t->tm_hour, L"%02d", pt, ptlim);
-			continue;
-		case 'I':
-			pt = _conv((t->tm_hour % 12) ?
-				(t->tm_hour % 12) : 12,
-				L"%02d", pt, ptlim);
-			continue;
-		case 'j':
-			pt = _conv(t->tm_yday + 1, L"%03d", pt, ptlim);
-			continue;
-		case 'k':
-			/*
-			** This used to be...
-			**	_conv(t->tm_hour % 12 ?
-			**		t->tm_hour % 12 : 12, 2, ' ');
-			** ...and has been changed to the below to
-			** match SunOS 4.1.1 and Arnold Robbins'
-			** strftime version 3.0. That is, "%k" and
-			** "%l" have been swapped.
-			** (ado, 1993-05-24)
-			*/
-			pt = _conv(t->tm_hour, L"%2d", pt, ptlim);
-			continue;
-		case 'l':
-			/*
-			** This used to be...
-			**	_conv(t->tm_hour, 2, ' ');
-			** ...and has been changed to the below to
-			** match SunOS 4.1.1 and Arnold Robbin's
-			** strftime version 3.0. That is, "%k" and
-			** "%l" have been swapped.
-			** (ado, 1993-05-24)
-			*/
-			pt = _conv((t->tm_hour % 12) ?
-				(t->tm_hour % 12) : 12,
-				L"%2d", pt, ptlim);
-			continue;
-		case 'M':
-			pt = _conv(t->tm_min, L"%02d", pt, ptlim);
-			continue;
-		case 'm':
-			pt = _conv(t->tm_mon + 1, L"%02d", pt, ptlim);
-			continue;
-		case 'n':
-			pt = _add(L"\n", pt, ptlim);
-			continue;
-		case 'p':
-			pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ?
-				Locale->pm :
-				Locale->am,
-				pt, ptlim);
-			continue;
-		case 'R':
-			pt = _fmt(L"%H:%M", t, pt, ptlim, warnp);
-			continue;
-		case 'r':
-			pt = _fmt(L"%I:%M:%S %p", t, pt, ptlim, warnp);
-			continue;
-		case 'S':
-			pt = _conv(t->tm_sec, L"%02d", pt, ptlim);
-			continue;
-		case 's':
-			{
-				struct tm	tm;
-				wchar_t		buf[INT_STRLEN_MAXIMUM(
-							time_t) + 1];
-				time_t		mkt;
-
-				tm = *t;
-				mkt = mktime(&tm);
-				(void) swprintf(buf, 
-				    sizeof buf/sizeof buf[0],
-				    L"%ld", (long) mkt);
-				pt = _add(buf, pt, ptlim);
-			}
-			continue;
-		case 'T':
-			pt = _fmt(L"%H:%M:%S", t, pt, ptlim, warnp);
-			continue;
-		case 't':
-			pt = _add(L"\t", pt, ptlim);
-			continue;
-		case 'U':
-			pt = _conv((t->tm_yday + DAYSPERWEEK -
-				t->tm_wday) / DAYSPERWEEK,
-				L"%02d", pt, ptlim);
-			continue;
-		case 'u':
-			/*
-			** From Arnold Robbins' strftime version 3.0:
-			** "ISO 8601: Weekday as a decimal number
-			** [1 (Monday) - 7]"
-			** (ado, 1993-05-24)
-			*/
-			pt = _conv((t->tm_wday == 0) ?
-				DAYSPERWEEK : t->tm_wday,
-				L"%d", pt, ptlim);
-			continue;
-		case 'V':	/* ISO 8601 week number */
-		case 'G':	/* ISO 8601 year (four digits) */
-		case 'g':	/* ISO 8601 year (two digits) */
-/*
-** From Arnold Robbins' strftime version 3.0: "the week number of the
-** year (the first Monday as the first day of week 1) as a decimal number
-** (01-53)."
-** (ado, 1993-05-24)
-**
-** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn:
-** "Week 01 of a year is per definition the first week which has the
-** Thursday in this year, which is equivalent to the week which contains
-** the fourth day of January. In other words, the first week of a new year
-** is the week which has the majority of its days in the new year. Week 01
-** might also contain days from the previous year and the week before week
-** 01 of a year is the last week (52 or 53) of the previous year even if
-** it contains days from the new year. A week starts with Monday (day 1)
-** and ends with Sunday (day 7). For example, the first week of the year
-** 1997 lasts from 1996-12-30 to 1997-01-05..."
-** (ado, 1996-01-02)
-*/
-			{
-			int	year;
-			int	base;
-			int	yday;
-			int	wday;
-			int	w;
-
-			year = t->tm_year;
-			base = TM_YEAR_BASE;
-			yday = t->tm_yday;
-			wday = t->tm_wday;
-			for ( ; ; ) {
-				int	len;
-				int	bot;
-				int	top;
-
-				len = isleap_sum(year, base) ?
-					DAYSPERLYEAR :
-					DAYSPERNYEAR;
-				/*
-				** What yday (-3 ... 3) does the ISO year 
-				** begin on?
-				*/
-				bot = ((yday + 11 - wday) % DAYSPERWEEK) - 3;
-				/*
-				** What yday does the NEXT ISO year begin on?
-				*/
-				top = bot - (len % DAYSPERWEEK);
-				if (top < -3)
-					top += DAYSPERWEEK;
-				top += len;
-				if (yday >= top) {
-					++base;
-					w = 1;
-					break;
-				}
-				if (yday >= bot) {
-					w = 1 + ((yday - bot) / DAYSPERWEEK);
-					break;
-				}
-				--base;
-				yday += isleap_sum(year, base) ?
-					DAYSPERLYEAR :
-					DAYSPERNYEAR;
-			}
-			if ((w == 52 && t->tm_mon == TM_JANUARY) ||
-				(w == 1 && t->tm_mon == TM_DECEMBER))
-					w = 53;
-			if (*format == 'V')
-				pt = _conv(w, L"%02d", pt, ptlim);
-			else if (*format == 'g') {
-				*warnp = IN_ALL;
-				pt = _yconv(year, base, 0, 1, pt, ptlim);
-			} else	
-				pt = _yconv(year, base, 1, 1, pt, ptlim);
-			}
-			continue;
-		case 'v':
-			/*
-			** From Arnold Robbins' strftime version 3.0:
-			** "date as dd-bbb-YYYY"
-			** (ado, 1993-05-24)
-			*/
-			pt = _fmt(L"%e-%b-%Y", t, pt, ptlim, warnp);
-			continue;
-		case 'W':
-			pt = _conv((t->tm_yday + DAYSPERWEEK -
-				(t->tm_wday ?
-				(t->tm_wday - 1) :
-				(DAYSPERWEEK - 1))) / DAYSPERWEEK,
-				L"%02d", pt, ptlim);
-			continue;
-		case 'w':
-			pt = _conv(t->tm_wday, L"%d", pt, ptlim);
-			continue;
-		case 'X':
-			pt = _fmt(Locale->X_fmt, t, pt, ptlim, warnp);
-			continue;
-		case 'x':
-			{
-			int	warn2 = IN_SOME;
-
-			pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2);
-			if (warn2 == IN_ALL)
-				warn2 = IN_THIS;
-			if (warn2 > *warnp)
-				*warnp = warn2;
-			}
-			continue;
-		case 'y':
-			*warnp = IN_ALL;
-			pt = _yconv(t->tm_year, TM_YEAR_BASE, 0, 1, pt, ptlim);
-			continue;
-		case 'Y':
-			pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 1, pt, ptlim);
-			continue;
-		case 'Z':
-			if (t->tm_zone != NULL)
-				pt = _sadd(t->tm_zone, pt, ptlim);
-			else
-				if (t->tm_isdst >= 0)
-					pt = _sadd(tzname[t->tm_isdst != 0], 
-					    pt, ptlim);
-			/*
-			** C99 says that %Z must be replaced by the
-			** empty string if the time zone is not
-			** determinable.
-			*/
-			continue;
-		case 'z':
-			{
-			int		diff;
-			wchar_t const *	sign;
-
-			if (t->tm_isdst < 0)
-				continue;
-			diff = t->tm_gmtoff;
-			if (diff < 0) {
-				sign = L"-";
-				diff = -diff;
-			} else	
-				sign = L"+";
-			pt = _add(sign, pt, ptlim);
-			diff /= SECSPERMIN;
-			diff = (diff / MINSPERHOUR) * 100 +
-				(diff % MINSPERHOUR);
-			pt = _conv(diff, L"%04d", pt, ptlim);
-			}
-			continue;
-		case '+':
-			pt = _fmt(Locale->date_fmt, t, pt, ptlim, warnp);
-			continue;
-		case '%':
-		/*
-		** X311J/88-090 (4.12.3.5): if conversion wchar_t is
-		** undefined, behavior is undefined. Print out the
-		** character itself as printf(3) also does.
-		*/
-		default:
-			if (pt != ptlim)
-				*pt++ = *format;
-			break;
-		}
-	}
-	return pt;
-}
-
-static wchar_t *
-_conv(int n, const wchar_t *format, wchar_t *pt, const wchar_t *ptlim)
-{
-	wchar_t	buf[INT_STRLEN_MAXIMUM(int) + 1];
-
-	(void) swprintf(buf, sizeof buf/sizeof buf[0], format, n);
-	return _add(buf, pt, ptlim);
-}
-
-static wchar_t *
-_add(const wchar_t *str, wchar_t *pt, const wchar_t *ptlim)
-{
-	while (pt < ptlim && (*pt = *str++) != L'\0')
-		++pt;
-	return pt;
-}
-
-static wchar_t *
-_sadd(const char *str, wchar_t *pt, const wchar_t *ptlim)
-{
-	while (pt < ptlim && (*pt = btowc(*str++)) != L'\0')
-		++pt;
-	return pt;
-}
-/*
-** POSIX and the C Standard are unclear or inconsistent about
-** what %C and %y do if the year is negative or exceeds 9999.
-** Use the convention that %C concatenated with %y yields the
-** same output as %Y, and that %Y contains at least 4 bytes,
-** with more only if necessary.
-*/
-
-static wchar_t *
-_yconv(int a, int b, int convert_top, int convert_yy, wchar_t *pt, 
-    const wchar_t *ptlim)
-{
-	int	lead;
-	int	trail;
-
-#define DIVISOR	100
-	trail = a % DIVISOR + b % DIVISOR;
-	lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
-	trail %= DIVISOR;
-	if (trail < 0 && lead > 0) {
-		trail += DIVISOR;
-		--lead;
-	} else if (lead < 0 && trail > 0) {
-		trail -= DIVISOR;
-		++lead;
-	}
-	if (convert_top) {
-		if (lead == 0 && trail < 0)
-			pt = _add(L"-0", pt, ptlim);
-		else	pt = _conv(lead, L"%02d", pt, ptlim);
-	}
-	if (convert_yy)
-		pt = _conv(((trail < 0) ? -trail : trail), L"%02d", pt, ptlim);
-	return pt;
-}
-
diff --git a/libfdtrack/Android.bp b/libfdtrack/Android.bp
index 83ea7cb..7539052 100644
--- a/libfdtrack/Android.bp
+++ b/libfdtrack/Android.bp
@@ -22,10 +22,16 @@
     static_libs: [
         "libasync_safe",
         "libbase",
+        "libdexfile_support",
         "libunwindstack",
         "liblzma",
         "liblog",
     ],
+    target: {
+        recovery: {
+            exclude_static_libs: ["libdexfile_support"],
+        },
+    },
     version_script: "libfdtrack.map.txt",
 
     allow_undefined_symbols: true,
diff --git a/libfdtrack/fdtrack.cpp b/libfdtrack/fdtrack.cpp
index b064401..57b9d37 100644
--- a/libfdtrack/fdtrack.cpp
+++ b/libfdtrack/fdtrack.cpp
@@ -45,10 +45,8 @@
 #include <android-base/thread_annotations.h>
 #include <async_safe/log.h>
 #include <bionic/reserved_signals.h>
-#include <unwindstack/Maps.h>
-#include <unwindstack/Regs.h>
-#include <unwindstack/RegsGetLocal.h>
-#include <unwindstack/Unwinder.h>
+
+#include <unwindstack/AndroidUnwinder.h>
 
 struct FdEntry {
   std::mutex mutex;
@@ -70,22 +68,16 @@
 // Only unwind up to 32 frames outside of libfdtrack.so.
 static constexpr size_t kStackDepth = 32;
 
-// Skip any initial frames from libfdtrack.so.
-// Also ignore frames from ART (http://b/236197847) because we'd rather spend
-// our precious few frames on the actual Java calling code rather than the
-// implementation of JNI!
-static std::vector<std::string> kSkipFdtrackLib
-    [[clang::no_destroy]] = {"libfdtrack.so", "libart.so"};
-
 static bool installed = false;
 static std::array<FdEntry, kFdTableSize> stack_traces [[clang::no_destroy]];
-static unwindstack::LocalUpdatableMaps& Maps() {
-  static android::base::NoDestructor<unwindstack::LocalUpdatableMaps> maps;
-  return *maps.get();
-}
-static std::shared_ptr<unwindstack::Memory>& ProcessMemory() {
-  static android::base::NoDestructor<std::shared_ptr<unwindstack::Memory>> process_memory;
-  return *process_memory.get();
+static unwindstack::AndroidLocalUnwinder& Unwinder() {
+  // Skip any initial frames from libfdtrack.so.
+  // Also ignore frames from ART (http://b/236197847) because we'd rather spend
+  // our precious few frames on the actual Java calling code rather than the
+  // implementation of JNI!
+  static android::base::NoDestructor<unwindstack::AndroidLocalUnwinder> unwinder(
+      std::vector<std::string>{"libfdtrack.so", "libart.so"});
+  return *unwinder.get();
 }
 
 __attribute__((constructor)) static void ctor() {
@@ -104,8 +96,8 @@
   sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
   sigaction(BIONIC_SIGNAL_FDTRACK, &sa, nullptr);
 
-  if (Maps().Parse()) {
-    ProcessMemory() = unwindstack::Memory::CreateProcessMemoryThreadCached(getpid());
+  unwindstack::ErrorData error;
+  if (Unwinder().Initialize(error)) {
     android_fdtrack_hook_t expected = nullptr;
     installed = android_fdtrack_compare_exchange_hook(&expected, &fd_hook);
   }
@@ -133,11 +125,10 @@
       std::lock_guard<std::mutex> lock(entry->mutex);
       entry->backtrace.clear();
 
-      std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::CreateFromLocal());
-      unwindstack::RegsGetLocal(regs.get());
-      unwindstack::Unwinder unwinder(kStackDepth, &Maps(), regs.get(), ProcessMemory());
-      unwinder.Unwind(&kSkipFdtrackLib);
-      entry->backtrace = unwinder.ConsumeFrames();
+      unwindstack::AndroidUnwinderData data(kStackDepth);
+      if (Unwinder().Unwind(data)) {
+        entry->backtrace = std::move(data.frames);
+      }
     }
   } else if (event->type == ANDROID_FDTRACK_EVENT_TYPE_CLOSE) {
     if (FdEntry* entry = GetFdEntry(event->fd); entry) {
diff --git a/libm/Android.bp b/libm/Android.bp
index 13fbf9a..079fd9a 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -400,7 +400,6 @@
     ],
 
     cflags: [
-        "-D__BIONIC_LP32_USE_LONG_DOUBLE",
         "-D_BSD_SOURCE",
         "-DFLT_EVAL_METHOD=0",
         "-include freebsd-compat.h",
diff --git a/linker/arch/riscv64/begin.S b/linker/arch/riscv64/begin.S
index f7509c6..21665cb 100644
--- a/linker/arch/riscv64/begin.S
+++ b/linker/arch/riscv64/begin.S
@@ -33,7 +33,7 @@
   .cfi_undefined ra
 
   mv a0, sp
-  jal __linker_init
+  call __linker_init
 
   // __linker_init returns the address of the entry point in the main image.
   jr a0
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 17b574f..5c26944 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -962,7 +962,7 @@
   }
 
   // Check if it is properly stored
-  if (entry.method != kCompressStored || (entry.offset % PAGE_SIZE) != 0) {
+  if (entry.method != kCompressStored || (entry.offset % page_size()) != 0) {
     close(fd);
     return -1;
   }
@@ -1171,7 +1171,7 @@
          "load_library(ns=%s, task=%s, flags=0x%x, realpath=%s, search_linked_namespaces=%d)",
          ns->get_name(), name, rtld_flags, realpath.c_str(), search_linked_namespaces);
 
-  if ((file_offset % PAGE_SIZE) != 0) {
+  if ((file_offset % page_size()) != 0) {
     DL_OPEN_ERR("file offset for the library \"%s\" is not page-aligned: %" PRId64, name, file_offset);
     return false;
   }
diff --git a/linker/linker_cfi.cpp b/linker/linker_cfi.cpp
index 6bc2615..247a25d 100644
--- a/linker/linker_cfi.cpp
+++ b/linker/linker_cfi.cpp
@@ -50,8 +50,8 @@
   ShadowWrite(uint16_t* s, uint16_t* e) {
     shadow_start = reinterpret_cast<char*>(s);
     shadow_end = reinterpret_cast<char*>(e);
-    aligned_start = reinterpret_cast<char*>(PAGE_START(reinterpret_cast<uintptr_t>(shadow_start)));
-    aligned_end = reinterpret_cast<char*>(PAGE_END(reinterpret_cast<uintptr_t>(shadow_end)));
+    aligned_start = reinterpret_cast<char*>(page_start(reinterpret_cast<uintptr_t>(shadow_start)));
+    aligned_end = reinterpret_cast<char*>(page_end(reinterpret_cast<uintptr_t>(shadow_end)));
     tmp_start =
         reinterpret_cast<char*>(mmap(nullptr, aligned_end - aligned_start, PROT_READ | PROT_WRITE,
                                      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
@@ -204,7 +204,7 @@
   shadow_start = reinterpret_cast<uintptr_t* (*)(uintptr_t)>(cfi_init)(p);
   CHECK(shadow_start != nullptr);
   CHECK(*shadow_start == p);
-  mprotect(shadow_start, PAGE_SIZE, PROT_READ);
+  mprotect(shadow_start, page_size(), PROT_READ);
   return true;
 }
 
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp
index 26e2228..f7c8ea9 100644
--- a/linker/linker_main.cpp
+++ b/linker/linker_main.cpp
@@ -580,8 +580,8 @@
     }
 
     ElfW(Addr) seg_start = phdr->p_vaddr + si->load_bias;
-    ElfW(Addr) seg_page_end = PAGE_END(seg_start + phdr->p_memsz);
-    ElfW(Addr) seg_file_end = PAGE_END(seg_start + phdr->p_filesz);
+    ElfW(Addr) seg_page_end = page_end(seg_start + phdr->p_memsz);
+    ElfW(Addr) seg_file_end = page_end(seg_start + phdr->p_filesz);
 
     if (seg_page_end > seg_file_end) {
       prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME,
diff --git a/linker/linker_mapped_file_fragment.cpp b/linker/linker_mapped_file_fragment.cpp
index cbe5f66..6be1b2b 100644
--- a/linker/linker_mapped_file_fragment.cpp
+++ b/linker/linker_mapped_file_fragment.cpp
@@ -29,6 +29,7 @@
 #include "linker_mapped_file_fragment.h"
 #include "linker_debug.h"
 #include "linker_utils.h"
+#include "platform/bionic/page.h"
 
 #include <inttypes.h>
 #include <stdlib.h>
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index 73cfced..97ae709 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -116,7 +116,7 @@
   can only memory-map at page boundaries, this means that the bias is
   computed as:
 
-       load_bias = phdr0_load_address - PAGE_START(phdr0->p_vaddr)
+       load_bias = phdr0_load_address - page_start(phdr0->p_vaddr)
 
   (NOTE: The value must be used as a 32-bit unsigned integer, to deal with
           possible wrap around UINT32_MAX for possible large p_vaddr values).
@@ -124,11 +124,11 @@
   And that the phdr0_load_address must start at a page boundary, with
   the segment's real content starting at:
 
-       phdr0_load_address + PAGE_OFFSET(phdr0->p_vaddr)
+       phdr0_load_address + page_offset(phdr0->p_vaddr)
 
   Note that ELF requires the following condition to make the mmap()-ing work:
 
-      PAGE_OFFSET(phdr0->p_vaddr) == PAGE_OFFSET(phdr0->p_offset)
+      page_offset(phdr0->p_vaddr) == page_offset(phdr0->p_offset)
 
   The load_bias must be added to any p_vaddr value read from the ELF file to
   determine the corresponding memory address.
@@ -529,8 +529,8 @@
     min_vaddr = 0;
   }
 
-  min_vaddr = PAGE_START(min_vaddr);
-  max_vaddr = PAGE_END(max_vaddr);
+  min_vaddr = page_start(min_vaddr);
+  max_vaddr = page_end(max_vaddr);
 
   if (out_min_vaddr != nullptr) {
     *out_min_vaddr = min_vaddr;
@@ -545,7 +545,7 @@
 // program header table. Used to determine whether the file should be loaded at
 // a specific virtual address alignment for use with huge pages.
 size_t phdr_table_get_maximum_alignment(const ElfW(Phdr)* phdr_table, size_t phdr_count) {
-  size_t maximum_alignment = PAGE_SIZE;
+  size_t maximum_alignment = page_size();
 
   for (size_t i = 0; i < phdr_count; ++i) {
     const ElfW(Phdr)* phdr = &phdr_table[i];
@@ -563,7 +563,7 @@
 #if defined(__LP64__)
   return maximum_alignment;
 #else
-  return PAGE_SIZE;
+  return page_size();
 #endif
 }
 
@@ -574,7 +574,7 @@
   int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS;
   // Reserve enough space to properly align the library's start address.
   mapping_align = std::max(mapping_align, start_align);
-  if (mapping_align == PAGE_SIZE) {
+  if (mapping_align == page_size()) {
     void* mmap_ptr = mmap(nullptr, size, PROT_NONE, mmap_flags, -1, 0);
     if (mmap_ptr == MAP_FAILED) {
       return nullptr;
@@ -593,7 +593,7 @@
   constexpr size_t kMaxGapUnits = 32;
   // Allocate enough space so that the end of the desired region aligned up is still inside the
   // mapping.
-  size_t mmap_size = align_up(size, mapping_align) + mapping_align - PAGE_SIZE;
+  size_t mmap_size = align_up(size, mapping_align) + mapping_align - page_size();
   uint8_t* mmap_ptr =
       reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0));
   if (mmap_ptr == MAP_FAILED) {
@@ -610,7 +610,7 @@
     mapping_align = std::max(mapping_align, kGapAlignment);
     gap_size =
         kGapAlignment * (is_first_stage_init() ? 1 : arc4random_uniform(kMaxGapUnits - 1) + 1);
-    mmap_size = align_up(size + gap_size, mapping_align) + mapping_align - PAGE_SIZE;
+    mmap_size = align_up(size + gap_size, mapping_align) + mapping_align - page_size();
     mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0));
     if (mmap_ptr == MAP_FAILED) {
       return nullptr;
@@ -665,12 +665,12 @@
              load_size_ - address_space->reserved_size, load_size_, name_.c_str());
       return false;
     }
-    size_t start_alignment = PAGE_SIZE;
+    size_t start_alignment = page_size();
     if (get_transparent_hugepages_supported() && get_application_target_sdk_version() >= 31) {
       size_t maximum_alignment = phdr_table_get_maximum_alignment(phdr_table_, phdr_num_);
       // Limit alignment to PMD size as other alignments reduce the number of
       // bits available for ASLR for no benefit.
-      start_alignment = maximum_alignment == kPmdSize ? kPmdSize : PAGE_SIZE;
+      start_alignment = maximum_alignment == kPmdSize ? kPmdSize : page_size();
     }
     start = ReserveWithAlignmentPadding(load_size_, kLibraryAlignment, start_alignment, &gap_start_,
                                         &gap_size_);
@@ -706,8 +706,8 @@
     ElfW(Addr) seg_start = phdr->p_vaddr + load_bias_;
     ElfW(Addr) seg_end   = seg_start + phdr->p_memsz;
 
-    ElfW(Addr) seg_page_start = PAGE_START(seg_start);
-    ElfW(Addr) seg_page_end   = PAGE_END(seg_end);
+    ElfW(Addr) seg_page_start = page_start(seg_start);
+    ElfW(Addr) seg_page_end = page_end(seg_end);
 
     ElfW(Addr) seg_file_end   = seg_start + phdr->p_filesz;
 
@@ -715,7 +715,7 @@
     ElfW(Addr) file_start = phdr->p_offset;
     ElfW(Addr) file_end   = file_start + phdr->p_filesz;
 
-    ElfW(Addr) file_page_start = PAGE_START(file_start);
+    ElfW(Addr) file_page_start = page_start(file_start);
     ElfW(Addr) file_length = file_end - file_page_start;
 
     if (file_size_ <= 0) {
@@ -768,11 +768,11 @@
 
     // if the segment is writable, and does not end on a page boundary,
     // zero-fill it until the page limit.
-    if ((phdr->p_flags & PF_W) != 0 && PAGE_OFFSET(seg_file_end) > 0) {
-      memset(reinterpret_cast<void*>(seg_file_end), 0, PAGE_SIZE - PAGE_OFFSET(seg_file_end));
+    if ((phdr->p_flags & PF_W) != 0 && page_offset(seg_file_end) > 0) {
+      memset(reinterpret_cast<void*>(seg_file_end), 0, page_size() - page_offset(seg_file_end));
     }
 
-    seg_file_end = PAGE_END(seg_file_end);
+    seg_file_end = page_end(seg_file_end);
 
     // seg_file_end is now the first page address after the file
     // content. If seg_end is larger, we need to zero anything
@@ -811,8 +811,8 @@
       continue;
     }
 
-    ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias;
-    ElfW(Addr) seg_page_end   = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias;
+    ElfW(Addr) seg_page_start = page_start(phdr->p_vaddr) + load_bias;
+    ElfW(Addr) seg_page_end = page_end(phdr->p_vaddr + phdr->p_memsz) + load_bias;
 
     int prot = PFLAGS_TO_PROT(phdr->p_flags) | extra_prot_flags;
     if ((prot & PROT_WRITE) != 0) {
@@ -912,8 +912,8 @@
     //       the program is likely to fail at runtime. So in effect the
     //       linker must only emit a PT_GNU_RELRO segment if it ensures
     //       that it starts on a page boundary.
-    ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias;
-    ElfW(Addr) seg_page_end   = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias;
+    ElfW(Addr) seg_page_start = page_start(phdr->p_vaddr) + load_bias;
+    ElfW(Addr) seg_page_end = page_end(phdr->p_vaddr + phdr->p_memsz) + load_bias;
 
     int ret = mprotect(reinterpret_cast<void*>(seg_page_start),
                        seg_page_end - seg_page_start,
@@ -972,8 +972,8 @@
       continue;
     }
 
-    ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias;
-    ElfW(Addr) seg_page_end   = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias;
+    ElfW(Addr) seg_page_start = page_start(phdr->p_vaddr) + load_bias;
+    ElfW(Addr) seg_page_end = page_end(phdr->p_vaddr + phdr->p_memsz) + load_bias;
     ssize_t size = seg_page_end - seg_page_start;
 
     ssize_t written = TEMP_FAILURE_RETRY(write(fd, reinterpret_cast<void*>(seg_page_start), size));
@@ -1035,8 +1035,8 @@
       continue;
     }
 
-    ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias;
-    ElfW(Addr) seg_page_end   = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias;
+    ElfW(Addr) seg_page_start = page_start(phdr->p_vaddr) + load_bias;
+    ElfW(Addr) seg_page_end = page_end(phdr->p_vaddr + phdr->p_memsz) + load_bias;
 
     char* file_base = static_cast<char*>(temp_mapping) + *file_offset;
     char* mem_base = reinterpret_cast<char*>(seg_page_start);
@@ -1053,15 +1053,15 @@
     while (match_offset < size) {
       // Skip over dissimilar pages.
       while (match_offset < size &&
-             memcmp(mem_base + match_offset, file_base + match_offset, PAGE_SIZE) != 0) {
-        match_offset += PAGE_SIZE;
+             memcmp(mem_base + match_offset, file_base + match_offset, page_size()) != 0) {
+        match_offset += page_size();
       }
 
       // Count similar pages.
       size_t mismatch_offset = match_offset;
       while (mismatch_offset < size &&
-             memcmp(mem_base + mismatch_offset, file_base + mismatch_offset, PAGE_SIZE) == 0) {
-        mismatch_offset += PAGE_SIZE;
+             memcmp(mem_base + mismatch_offset, file_base + mismatch_offset, page_size()) == 0) {
+        mismatch_offset += page_size();
       }
 
       // Map over similar pages.
diff --git a/linker/linker_utils.cpp b/linker/linker_utils.cpp
index 29110ed..cd03eed 100644
--- a/linker/linker_utils.cpp
+++ b/linker/linker_utils.cpp
@@ -169,12 +169,6 @@
   return true;
 }
 
-constexpr off64_t kPageMask = ~static_cast<off64_t>(PAGE_SIZE-1);
-
-off64_t page_start(off64_t offset) {
-  return offset & kPageMask;
-}
-
 bool safe_add(off64_t* out, off64_t a, size_t b) {
   CHECK(a >= 0);
   if (static_cast<uint64_t>(INT64_MAX - a) < b) {
@@ -185,10 +179,6 @@
   return true;
 }
 
-size_t page_offset(off64_t offset) {
-  return static_cast<size_t>(offset & (PAGE_SIZE-1));
-}
-
 void split_path(const char* path, const char* delimiters,
                 std::vector<std::string>* paths) {
   if (path != nullptr && path[0] != 0) {
diff --git a/linker/linker_utils.h b/linker/linker_utils.h
index 5073b10..3049e53 100644
--- a/linker/linker_utils.h
+++ b/linker/linker_utils.h
@@ -55,7 +55,5 @@
 
 std::string dirname(const char* path);
 
-off64_t page_start(off64_t offset);
-size_t page_offset(off64_t offset);
 bool safe_add(off64_t* out, off64_t a, size_t b);
 bool is_first_stage_init();
diff --git a/linker/linker_utils_test.cpp b/linker/linker_utils_test.cpp
index 44907da..0b881d4 100644
--- a/linker/linker_utils_test.cpp
+++ b/linker/linker_utils_test.cpp
@@ -33,6 +33,7 @@
 #include <gtest/gtest.h>
 
 #include "linker_utils.h"
+#include "platform/bionic/page.h"
 
 TEST(linker_utils, format_string) {
   std::vector<std::pair<std::string, std::string>> params = {{ "LIB", "lib32"}, { "SDKVER", "42"}};
@@ -104,9 +105,9 @@
 }
 
 TEST(linker_utils, page_start) {
-  ASSERT_EQ(0x0001000, page_start(0x0001000));
-  ASSERT_EQ(0x3002000, page_start(0x300222f));
-  ASSERT_EQ(0x6001000, page_start(0x6001fff));
+  ASSERT_EQ(0x0001000U, page_start(0x0001000));
+  ASSERT_EQ(0x3002000U, page_start(0x300222f));
+  ASSERT_EQ(0x6001000U, page_start(0x6001fff));
 }
 
 TEST(linker_utils, page_offset) {
diff --git a/tests/Android.bp b/tests/Android.bp
index 1be1ec3..8dc8eaf 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -386,7 +386,6 @@
         "bug_26110743_test.cpp",
         "byteswap_test.cpp",
         "complex_test.cpp",
-        "complex_force_long_double_test.cpp",
         "ctype_test.cpp",
         "dirent_test.cpp",
         "elf_test.cpp",
@@ -423,7 +422,6 @@
         "malloc_iterate_test.cpp",
         "malloc_test.cpp",
         "math_test.cpp",
-        "math_force_long_double_test.cpp",
         "membarrier_test.cpp",
         "memtag_stack_test.cpp",
         "mntent_test.cpp",
@@ -472,6 +470,7 @@
         "struct_layout_test.cpp",
         "sstream_test.cpp",
         "sys_auxv_test.cpp",
+        "sys_cachectl_test.cpp",
         "sys_epoll_test.cpp",
         "sys_mman_test.cpp",
         "sys_msg_test.cpp",
@@ -503,6 +502,7 @@
         "sys_vfs_test.cpp",
         "sys_wait_test.cpp",
         "sys_xattr_test.cpp",
+        "syslog_test.cpp",
         "system_properties_test.cpp",
         "system_properties_test2.cpp",
         "termios_test.cpp",
diff --git a/tests/complex_force_long_double_test.cpp b/tests/complex_force_long_double_test.cpp
deleted file mode 100644
index 2ea7bd4..0000000
--- a/tests/complex_force_long_double_test.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __BIONIC_LP32_USE_LONG_DOUBLE
-#include "complex_test.cpp"
diff --git a/tests/complex_test.cpp b/tests/complex_test.cpp
index f015b2c..6a1831f 100644
--- a/tests/complex_test.cpp
+++ b/tests/complex_test.cpp
@@ -14,20 +14,11 @@
  * limitations under the License.
  */
 
-#if defined(__BIONIC_LP32_USE_LONG_DOUBLE)
-#define COMPLEX_TEST complex_h_force_long_double
-#else
-#define COMPLEX_TEST complex_h
-#endif
-
 // This file is compiled against both glibc and bionic, and our complex.h
 // depends on bionic-specific macros, so hack around that.
 #include <sys/cdefs.h>
 #if !defined(__INTRODUCED_IN)
 #define __INTRODUCED_IN(x)
-#define __INTRODUCED_IN_32(x)
-#define __INTRODUCED_IN_64(x)
-#define __RENAME_LDBL(a,b,c)
 #endif
 
 // libc++ actively gets in the way of including <complex.h> from C++, so we
@@ -62,259 +53,259 @@
 #include <gtest/gtest.h>
 #pragma pop_macro("I")
 
-TEST(COMPLEX_TEST, cabs) {
+TEST(complex_h, cabs) {
   ASSERT_EQ(0.0, cabs(0));
 }
 
-TEST(COMPLEX_TEST, cabsf) {
+TEST(complex_h, cabsf) {
   ASSERT_EQ(0.0, cabsf(0));
 }
 
-TEST(COMPLEX_TEST, cabsl) {
+TEST(complex_h, cabsl) {
   ASSERT_EQ(0.0, cabsl(0));
 }
 
-TEST(COMPLEX_TEST, cacos) {
+TEST(complex_h, cacos) {
   ASSERT_EQ(M_PI_2, cacos(0.0));
 }
 
-TEST(COMPLEX_TEST, cacosf) {
+TEST(complex_h, cacosf) {
   ASSERT_EQ(static_cast<float>(M_PI_2), cacosf(0.0));
 }
 
-TEST(COMPLEX_TEST, cacosl) {
+TEST(complex_h, cacosl) {
   ASSERT_EQ(M_PI_2l, cacosl(0.0));
 }
 
-TEST(COMPLEX_TEST, cacosh) {
+TEST(complex_h, cacosh) {
   ASSERT_EQ(0.0, cacosh(1.0));
 }
 
-TEST(COMPLEX_TEST, cacoshl) {
+TEST(complex_h, cacoshl) {
   ASSERT_EQ(0.0, cacoshl(1.0));
 }
 
-TEST(COMPLEX_TEST, cacoshf) {
+TEST(complex_h, cacoshf) {
   ASSERT_EQ(0.0, cacoshf(1.0));
 }
 
-TEST(COMPLEX_TEST, carg) {
+TEST(complex_h, carg) {
   ASSERT_EQ(0.0, carg(0));
 }
 
-TEST(COMPLEX_TEST, cargf) {
+TEST(complex_h, cargf) {
   ASSERT_EQ(0.0, cargf(0));
 }
 
-TEST(COMPLEX_TEST, cargl) {
+TEST(complex_h, cargl) {
   ASSERT_EQ(0.0, cargl(0));
 }
 
-TEST(COMPLEX_TEST, casin) {
+TEST(complex_h, casin) {
   ASSERT_EQ(0.0, casin(0));
 }
 
-TEST(COMPLEX_TEST, casinf) {
+TEST(complex_h, casinf) {
   ASSERT_EQ(0.0, casinf(0));
 }
 
-TEST(COMPLEX_TEST, casinl) {
+TEST(complex_h, casinl) {
   ASSERT_EQ(0.0, casinl(0));
 }
 
-TEST(COMPLEX_TEST, casinh) {
+TEST(complex_h, casinh) {
   ASSERT_EQ(0.0, casinh(0));
 }
 
-TEST(COMPLEX_TEST, casinhf) {
+TEST(complex_h, casinhf) {
   ASSERT_EQ(0.0, casinhf(0));
 }
 
-TEST(COMPLEX_TEST, casinhl) {
+TEST(complex_h, casinhl) {
   ASSERT_EQ(0.0, casinhl(0));
 }
 
-TEST(COMPLEX_TEST, catan) {
+TEST(complex_h, catan) {
   ASSERT_EQ(0.0, catan(0));
 }
 
-TEST(COMPLEX_TEST, catanf) {
+TEST(complex_h, catanf) {
   ASSERT_EQ(0.0, catanf(0));
 }
 
-TEST(COMPLEX_TEST, catanl) {
+TEST(complex_h, catanl) {
   ASSERT_EQ(0.0, catanl(0));
 }
 
-TEST(COMPLEX_TEST, catanh) {
+TEST(complex_h, catanh) {
   ASSERT_EQ(0.0, catanh(0));
 }
 
-TEST(COMPLEX_TEST, catanhf) {
+TEST(complex_h, catanhf) {
   ASSERT_EQ(0.0, catanhf(0));
 }
 
-TEST(COMPLEX_TEST, catanhl) {
+TEST(complex_h, catanhl) {
   ASSERT_EQ(0.0, catanhl(0));
 }
 
-TEST(COMPLEX_TEST, ccos) {
+TEST(complex_h, ccos) {
   ASSERT_EQ(1.0, ccos(0));
 }
 
-TEST(COMPLEX_TEST, ccosf) {
+TEST(complex_h, ccosf) {
   ASSERT_EQ(1.0, ccosf(0));
 }
 
-TEST(COMPLEX_TEST, ccosl) {
+TEST(complex_h, ccosl) {
   ASSERT_EQ(1.0, ccosl(0));
 }
 
-TEST(COMPLEX_TEST, ccosh) {
+TEST(complex_h, ccosh) {
   ASSERT_EQ(1.0, ccosh(0));
 }
 
-TEST(COMPLEX_TEST, ccoshf) {
+TEST(complex_h, ccoshf) {
   ASSERT_EQ(1.0, ccoshf(0));
 }
 
-TEST(COMPLEX_TEST, ccoshl) {
+TEST(complex_h, ccoshl) {
   ASSERT_EQ(1.0, ccoshl(0));
 }
 
-TEST(COMPLEX_TEST, cexp) {
+TEST(complex_h, cexp) {
   ASSERT_EQ(1.0, cexp(0));
 }
 
-TEST(COMPLEX_TEST, cexpf) {
+TEST(complex_h, cexpf) {
   ASSERT_EQ(1.0, cexpf(0));
 }
 
-TEST(COMPLEX_TEST, cexpl) {
+TEST(complex_h, cexpl) {
   ASSERT_EQ(1.0, cexpl(0));
 }
 
-TEST(COMPLEX_TEST, cimag) {
+TEST(complex_h, cimag) {
   ASSERT_EQ(0.0, cimag(0));
 }
 
-TEST(COMPLEX_TEST, cimagf) {
+TEST(complex_h, cimagf) {
   ASSERT_EQ(0.0f, cimagf(0));
 }
 
-TEST(COMPLEX_TEST, cimagl) {
+TEST(complex_h, cimagl) {
   ASSERT_EQ(0.0, cimagl(0));
 }
 
-TEST(COMPLEX_TEST, clog) {
+TEST(complex_h, clog) {
   ASSERT_EQ(0.0, clog(1.0));
 }
 
-TEST(COMPLEX_TEST, clogf) {
+TEST(complex_h, clogf) {
   ASSERT_EQ(0.0f, clogf(1.0f));
 }
 
-TEST(COMPLEX_TEST, clogl) {
+TEST(complex_h, clogl) {
   ASSERT_EQ(0.0L, clogl(1.0L));
 }
 
-TEST(COMPLEX_TEST, conj) {
+TEST(complex_h, conj) {
   ASSERT_EQ(0.0, conj(0));
 }
 
-TEST(COMPLEX_TEST, conjf) {
+TEST(complex_h, conjf) {
   ASSERT_EQ(0.0f, conjf(0));
 }
 
-TEST(COMPLEX_TEST, conjl) {
+TEST(complex_h, conjl) {
   ASSERT_EQ(0.0, conjl(0));
 }
 
-TEST(COMPLEX_TEST, cpow) {
+TEST(complex_h, cpow) {
   ASSERT_EQ(8.0, cpow(2.0, 3.0));
 }
 
-TEST(COMPLEX_TEST, cpowf) {
+TEST(complex_h, cpowf) {
   ASSERT_EQ(8.0f, cpowf(2.0f, 3.0f));
 }
 
-TEST(COMPLEX_TEST, cpowl) {
+TEST(complex_h, cpowl) {
   ASSERT_EQ(8.0L, cpowl(2.0L, 3.0L));
 }
 
-TEST(COMPLEX_TEST, cproj) {
+TEST(complex_h, cproj) {
   ASSERT_EQ(0.0, cproj(0));
 }
 
-TEST(COMPLEX_TEST, cprojf) {
+TEST(complex_h, cprojf) {
   ASSERT_EQ(0.0f, cprojf(0));
 }
 
-TEST(COMPLEX_TEST, cprojl) {
+TEST(complex_h, cprojl) {
   ASSERT_EQ(0.0, cprojl(0));
 }
 
-TEST(COMPLEX_TEST, creal) {
+TEST(complex_h, creal) {
   ASSERT_EQ(2.0, creal(2.0 + 3.0I));
 }
 
-TEST(COMPLEX_TEST, crealf) {
+TEST(complex_h, crealf) {
   ASSERT_EQ(2.0f, crealf(2.0f + 3.0fI));
 }
 
-TEST(COMPLEX_TEST, creall) {
+TEST(complex_h, creall) {
   ASSERT_EQ(2.0, creall(2.0L + 3.0LI));
 }
 
-TEST(COMPLEX_TEST, csin) {
+TEST(complex_h, csin) {
   ASSERT_EQ(0.0, csin(0));
 }
 
-TEST(COMPLEX_TEST, csinf) {
+TEST(complex_h, csinf) {
   ASSERT_EQ(0.0, csinf(0));
 }
 
-TEST(COMPLEX_TEST, csinl) {
+TEST(complex_h, csinl) {
   ASSERT_EQ(0.0, csinl(0));
 }
 
-TEST(COMPLEX_TEST, csinh) {
+TEST(complex_h, csinh) {
   ASSERT_EQ(0.0, csinh(0));
 }
 
-TEST(COMPLEX_TEST, csinhf) {
+TEST(complex_h, csinhf) {
   ASSERT_EQ(0.0, csinhf(0));
 }
 
-TEST(COMPLEX_TEST, csinhl) {
+TEST(complex_h, csinhl) {
   ASSERT_EQ(0.0, csinhl(0));
 }
 
-TEST(COMPLEX_TEST, csqrt) {
+TEST(complex_h, csqrt) {
   ASSERT_EQ(0.0, csqrt(0));
 }
 
-TEST(COMPLEX_TEST, csqrtf) {
+TEST(complex_h, csqrtf) {
   ASSERT_EQ(0.0f, csqrtf(0));
 }
 
-TEST(COMPLEX_TEST, csqrtl) {
+TEST(complex_h, csqrtl) {
   ASSERT_EQ(0.0, csqrtl(0));
 }
 
-TEST(COMPLEX_TEST, ctan) {
+TEST(complex_h, ctan) {
   ASSERT_EQ(0.0, ctan(0));
 }
 
-TEST(COMPLEX_TEST, ctanf) {
+TEST(complex_h, ctanf) {
   ASSERT_EQ(0.0, ctanf(0));
 }
 
-TEST(COMPLEX_TEST, ctanl) {
+TEST(complex_h, ctanl) {
   ASSERT_EQ(0.0, ctanl(0));
 }
 
-TEST(COMPLEX_TEST, ctanh) {
+TEST(complex_h, ctanh) {
   ASSERT_EQ(0.0, ctanh(0));
 
   double complex z;
@@ -335,7 +326,7 @@
   ASSERT_TRUE(isnan(cimag(z)));
 }
 
-TEST(COMPLEX_TEST, ctanhf) {
+TEST(complex_h, ctanhf) {
   ASSERT_EQ(0.0f, ctanhf(0.0f));
 
   float complex z;
@@ -356,7 +347,7 @@
   ASSERT_TRUE(isnan(cimagf(z)));
 }
 
-TEST(COMPLEX_TEST, ctanhl) {
+TEST(complex_h, ctanhl) {
   ASSERT_EQ(0.0L, ctanhl(0.0L));
 
   long double complex z;
diff --git a/tests/elftls_dl_test.cpp b/tests/elftls_dl_test.cpp
index 56736e7..e2fa3a0 100644
--- a/tests/elftls_dl_test.cpp
+++ b/tests/elftls_dl_test.cpp
@@ -154,7 +154,6 @@
 }
 
 TEST(elftls_dl, dtv_resize) {
-  SKIP_WITH_HWASAN; // TODO(b/271243811): Fix for new toolchain
 #if defined(__BIONIC__)
 #define LOAD_LIB(soname) ({                           \
     auto lib = dlopen(soname, RTLD_LOCAL | RTLD_NOW); \
@@ -167,11 +166,12 @@
   static_assert(sizeof(TlsDtv) == 3 * sizeof(void*),
                 "This test assumes that the Dtv has a 3-word header");
 
-  // Initially there are 4 modules:
+  // Initially there are 4 modules (5 w/ hwasan):
   //  - the main test executable
   //  - libc
   //  - libtest_elftls_shared_var
   //  - libtest_elftls_tprel
+  //  - w/ hwasan: libclang_rt.hwasan
 
   // The initial DTV is an empty DTV with no generation and a size of 0.
   TlsDtv* zero_dtv = dtv();
@@ -179,25 +179,25 @@
   ASSERT_EQ(nullptr, zero_dtv->next);
   ASSERT_EQ(kTlsGenerationNone, zero_dtv->generation);
 
-  // Load the fifth module.
+  // Load module 5 (6 w/ hwasan).
   auto func1 = LOAD_LIB("libtest_elftls_dynamic_filler_1.so");
   ASSERT_EQ(101, func1());
 
   // After loading one module, the DTV should be initialized to the next
   // power-of-2 size (including the header).
   TlsDtv* initial_dtv = dtv();
-  ASSERT_EQ(5u, initial_dtv->count);
+  ASSERT_EQ(running_with_hwasan() ? 13u : 5u, dtv()->count);
   ASSERT_EQ(zero_dtv, initial_dtv->next);
   ASSERT_LT(0u, initial_dtv->generation);
 
-  // Load module 6.
+  // Load module 6 (7 w/ hwasan).
   auto func2 = LOAD_LIB("libtest_elftls_dynamic_filler_2.so");
   ASSERT_EQ(102, func1());
 
 #if defined(__aarch64__)
   // The arm64 TLSDESC resolver doesn't update the DTV if it is new enough for
   // the given access.
-  ASSERT_EQ(5u, dtv()->count);
+  ASSERT_EQ(running_with_hwasan() ? 13u : 5u, dtv()->count);
 #else
   // __tls_get_addr updates the DTV anytime the generation counter changes.
   ASSERT_EQ(13u, dtv()->count);
@@ -205,11 +205,13 @@
 
   ASSERT_EQ(201, func2());
   TlsDtv* new_dtv = dtv();
-  ASSERT_NE(initial_dtv, new_dtv);
-  ASSERT_EQ(initial_dtv, new_dtv->next);
+  if (!running_with_hwasan()) {
+    ASSERT_NE(initial_dtv, new_dtv);
+    ASSERT_EQ(initial_dtv, new_dtv->next);
+  }
   ASSERT_EQ(13u, new_dtv->count);
 
-  // Load module 7.
+  // Load module 7 (8 w/ hwasan).
   auto func3 = LOAD_LIB("libtest_elftls_dynamic_filler_3.so");
   ASSERT_EQ(103, func1());
   ASSERT_EQ(202, func2());
diff --git a/tests/fortify_test.cpp b/tests/fortify_test.cpp
index 4abee67..cc3080d 100644
--- a/tests/fortify_test.cpp
+++ b/tests/fortify_test.cpp
@@ -670,6 +670,10 @@
   ASSERT_FORTIFY(readlinkat(AT_FDCWD, "/dev/null", buf, ct));
 }
 
+TEST(TEST_NAME, snprintf_nullptr_valid) {
+  ASSERT_EQ(10, snprintf(nullptr, 0, "0123456789"));
+}
+
 extern "C" char* __strncat_chk(char*, const char*, size_t, size_t);
 extern "C" char* __strcat_chk(char*, const char*, size_t);
 
diff --git a/tests/headers/posix/README.md b/tests/headers/posix/README.md
new file mode 100644
index 0000000..e7c171a
--- /dev/null
+++ b/tests/headers/posix/README.md
@@ -0,0 +1,8 @@
+# POSIX header tests
+
+These compile-time tests check that each POSIX header contains _at
+least_ what POSIX says. Every POSIX header file gets a corresponding
+`.c` file in this directory. Every constant, macro, type, struct field,
+and function in the header gets a corresponding assertion in the file.
+
+See `header_checks.h` for the implementation of the assertions.
diff --git a/tests/heap_tagging_level_test.cpp b/tests/heap_tagging_level_test.cpp
index 917be37..5d85e97 100644
--- a/tests/heap_tagging_level_test.cpp
+++ b/tests/heap_tagging_level_test.cpp
@@ -221,6 +221,8 @@
 enum class MemtagNote { NONE, ASYNC, SYNC };
 class MemtagNoteTest : public testing::TestWithParam<std::tuple<MemtagNote, bool>> {};
 
+static const char* kNoteSuffix[] = {"disabled", "async", "sync"};
+
 TEST_P(MemtagNoteTest, SEGV) {
 #if defined(__BIONIC__) && defined(__aarch64__)
   SKIP_WITH_NATIVE_BRIDGE;  // http://b/242170715
@@ -229,19 +231,13 @@
   }
   // Note that we do not check running_with_hwasan() - what matters here is whether the test binary
   // itself is built with HWASan.
-  bool withHWASAN = __has_feature(hwaddress_sanitizer);
   bool withMTE = getauxval(AT_HWCAP2) & HWCAP2_MTE;
 
-  const char* kNoteSuffix[] = {"disabled", "async", "sync"};
-  const char* kExpectedOutputHWASAN[] = {".*tag-mismatch.*", ".*tag-mismatch.*",
-                                         ".*tag-mismatch.*"};
   // Note that we do not check the exact si_code of the "async" variant, as it may be auto-upgraded
   // to asymm or even sync.
   const char* kExpectedOutputMTE[] = {"normal exit\n", "SEGV_MTE[AS]ERR\n", "SEGV_MTESERR\n"};
   const char* kExpectedOutputNonMTE[] = {"normal exit\n", "normal exit\n", "normal exit\n"};
-  const char** kExpectedOutput =
-      withHWASAN ? kExpectedOutputHWASAN : (withMTE ? kExpectedOutputMTE : kExpectedOutputNonMTE);
-  const int kExpectedExitStatus = withHWASAN ? -SIGABRT : 0;
+  const char** kExpectedOutput = withMTE ? kExpectedOutputMTE : kExpectedOutputNonMTE;
 
   MemtagNote note = std::get<0>(GetParam());
   bool isStatic = std::get<1>(GetParam());
@@ -251,7 +247,7 @@
   chmod(helper.c_str(), 0755);
   ExecTestHelper eth;
   eth.SetArgs({helper.c_str(), nullptr});
-  eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, kExpectedExitStatus,
+  eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, 0,
           kExpectedOutput[static_cast<int>(note)]);
 #else
   GTEST_SKIP() << "bionic/arm64 only";
@@ -261,4 +257,10 @@
 INSTANTIATE_TEST_SUITE_P(, MemtagNoteTest,
                          testing::Combine(testing::Values(MemtagNote::NONE, MemtagNote::ASYNC,
                                                           MemtagNote::SYNC),
-                                          testing::Bool()));
+                                          testing::Bool()),
+                         [](const ::testing::TestParamInfo<MemtagNoteTest::ParamType>& info) {
+                           MemtagNote note = std::get<0>(info.param);
+                           std::string s = kNoteSuffix[static_cast<int>(note)];
+                           if (std::get<1>(info.param)) s += "_static";
+                           return s;
+                         });
diff --git a/tests/hwasan_test.cpp b/tests/hwasan_test.cpp
index 5c21495..e32534e 100644
--- a/tests/hwasan_test.cpp
+++ b/tests/hwasan_test.cpp
@@ -1,17 +1,29 @@
 /*
  * Copyright (C) 2023 The Android Open Source Project
+ * All rights reserved.
  *
- * 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
+ * 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.
  *
- *      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.
+ * 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.
  */
 
 #include <dlfcn.h>
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index a2fbe55..51f5ac6 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -1621,6 +1621,7 @@
      diag: {
        memtag_heap: true,
      },
+     hwaddress: false,
    },
 }
 
@@ -1633,6 +1634,7 @@
      diag: {
        memtag_heap: false,
      },
+     hwaddress: false,
    },
 }
 
@@ -1642,6 +1644,7 @@
    srcs: ["heap_tagging_helper.cpp"],
    sanitize: {
      memtag_heap: false,
+     hwaddress: false,
    },
 }
 
@@ -1655,6 +1658,7 @@
      diag: {
        memtag_heap: true,
      },
+     hwaddress: false,
    },
 }
 
@@ -1668,6 +1672,7 @@
      diag: {
        memtag_heap: false,
      },
+     hwaddress: false,
    },
 }
 
@@ -1678,6 +1683,7 @@
    static_executable: true,
    sanitize: {
      memtag_heap: false,
+     hwaddress: false,
    },
 }
 
@@ -1691,6 +1697,7 @@
      diag: {
        memtag_heap: true,
      },
+     hwaddress: false,
    },
    header_libs: ["bionic_libc_platform_headers"],
    cflags: ["-fexceptions"],
@@ -1707,6 +1714,7 @@
      diag: {
        memtag_heap: true,
      },
+     hwaddress: false,
    },
    header_libs: ["bionic_libc_platform_headers"],
    cflags: ["-fexceptions"],
diff --git a/tests/libs/dlopen_testlib_simple_hwasan.cpp b/tests/libs/dlopen_testlib_simple_hwasan.cpp
index b92e05f..ddf8a31 100644
--- a/tests/libs/dlopen_testlib_simple_hwasan.cpp
+++ b/tests/libs/dlopen_testlib_simple_hwasan.cpp
@@ -1,17 +1,29 @@
 /*
  * Copyright (C) 2023 The Android Open Source Project
+ * All rights reserved.
  *
- * 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
+ * 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.
  *
- *      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.
+ * 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.
  */
 
 #include <stdint.h>
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index 22905f4..5df694c 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -708,6 +708,15 @@
 #endif
 }
 
+TEST(malloc, mallopt_log_stats) {
+#if defined(__BIONIC__)
+  SKIP_WITH_HWASAN << "hwasan does not implement mallopt";
+  ASSERT_EQ(1, mallopt(M_LOG_STATS, 0));
+#else
+  GTEST_SKIP() << "bionic-only test";
+#endif
+}
+
 // Verify that all of the mallopt values are unique.
 TEST(malloc, mallopt_unique_params) {
 #if defined(__BIONIC__)
@@ -722,6 +731,7 @@
       std::make_pair(M_TSDS_COUNT_MAX, "M_TSDS_COUNT_MAX"),
       std::make_pair(M_BIONIC_ZERO_INIT, "M_BIONIC_ZERO_INIT"),
       std::make_pair(M_BIONIC_SET_HEAP_TAGGING_LEVEL, "M_BIONIC_SET_HEAP_TAGGING_LEVEL"),
+      std::make_pair(M_LOG_STATS, "M_LOG_STATS"),
   };
 
   std::unordered_map<int, std::string> all_params;
diff --git a/tests/math_force_long_double_test.cpp b/tests/math_force_long_double_test.cpp
deleted file mode 100644
index 432182b..0000000
--- a/tests/math_force_long_double_test.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#define __BIONIC_LP32_USE_LONG_DOUBLE
-#include "math_test.cpp"
diff --git a/tests/math_test.cpp b/tests/math_test.cpp
index 60872f3..493f3af 100644
--- a/tests/math_test.cpp
+++ b/tests/math_test.cpp
@@ -48,12 +48,6 @@
 }
 }
 
-#if defined(__BIONIC_LP32_USE_LONG_DOUBLE)
-#define MATH_TEST math_h_force_long_double
-#else
-#define MATH_TEST math_h
-#endif
-
 #include "math_data_test.h"
 
 #include <gtest/gtest.h>
@@ -103,7 +97,7 @@
   return u.e;
 }
 
-TEST(MATH_TEST, fpclassify) {
+TEST(math_h, fpclassify) {
   ASSERT_EQ(FP_INFINITE, fpclassify(INFINITY));
   ASSERT_EQ(FP_INFINITE, fpclassify(HUGE_VALF));
   ASSERT_EQ(FP_INFINITE, fpclassify(-HUGE_VALF));
@@ -129,7 +123,7 @@
   ASSERT_EQ(FP_ZERO, fpclassify(0.0L));
 }
 
-TEST(MATH_TEST, isfinite) {
+TEST(math_h, isfinite) {
   ASSERT_TRUE(test_capture_isfinite(123.0f));
   ASSERT_TRUE(test_capture_isfinite(123.0));
   ASSERT_TRUE(test_capture_isfinite(123.0L));
@@ -141,7 +135,7 @@
   ASSERT_FALSE(test_capture_isfinite(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, isinf) {
+TEST(math_h, isinf) {
   ASSERT_FALSE(test_capture_isinf(123.0f));
   ASSERT_FALSE(test_capture_isinf(123.0));
   ASSERT_FALSE(test_capture_isinf(123.0L));
@@ -153,7 +147,7 @@
   ASSERT_TRUE(test_capture_isinf(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, isnan) {
+TEST(math_h, isnan) {
   ASSERT_FALSE(test_capture_isnan(123.0f));
   ASSERT_FALSE(test_capture_isnan(123.0));
   ASSERT_FALSE(test_capture_isnan(123.0L));
@@ -162,7 +156,7 @@
   ASSERT_TRUE(test_capture_isnan(nanl("")));
 }
 
-TEST(MATH_TEST, isnormal) {
+TEST(math_h, isnormal) {
   ASSERT_TRUE(isnormal(123.0f));
   ASSERT_TRUE(isnormal(123.0));
   ASSERT_TRUE(isnormal(123.0L));
@@ -172,7 +166,7 @@
 }
 
 // TODO: isgreater, isgreaterequals, isless, islessequal, islessgreater, isunordered
-TEST(MATH_TEST, signbit) {
+TEST(math_h, signbit) {
   ASSERT_EQ(0, test_capture_signbit(0.0f));
   ASSERT_EQ(0, test_capture_signbit(0.0));
   ASSERT_EQ(0, test_capture_signbit(0.0L));
@@ -192,7 +186,7 @@
 extern "C" int __fpclassifyf(float);
 extern "C" int __fpclassifyl(long double);
 
-TEST(MATH_TEST, __fpclassify) {
+TEST(math_h, __fpclassify) {
   ASSERT_EQ(FP_INFINITE, __fpclassify(HUGE_VAL));
   ASSERT_EQ(FP_INFINITE, __fpclassify(-HUGE_VAL));
   ASSERT_EQ(FP_NAN, __fpclassify(nan("")));
@@ -201,7 +195,7 @@
   ASSERT_EQ(FP_ZERO, __fpclassify(0.0));
 }
 
-TEST(MATH_TEST, __fpclassifyd) {
+TEST(math_h, __fpclassifyd) {
 #if defined(__GLIBC__) || defined(ANDROID_HOST_MUSL)
 #define __fpclassifyd __fpclassify
 #endif
@@ -213,7 +207,7 @@
   ASSERT_EQ(FP_ZERO, __fpclassifyd(0.0));
 }
 
-TEST(MATH_TEST, __fpclassifyf) {
+TEST(math_h, __fpclassifyf) {
   ASSERT_EQ(FP_INFINITE, __fpclassifyf(HUGE_VALF));
   ASSERT_EQ(FP_INFINITE, __fpclassifyf(-HUGE_VALF));
   ASSERT_EQ(FP_NAN, __fpclassifyf(nanf("")));
@@ -222,7 +216,7 @@
   ASSERT_EQ(FP_ZERO, __fpclassifyf(0.0f));
 }
 
-TEST(MATH_TEST, __fpclassifyl) {
+TEST(math_h, __fpclassifyl) {
   EXPECT_EQ(FP_INFINITE, __fpclassifyl(HUGE_VALL));
   EXPECT_EQ(FP_INFINITE, __fpclassifyl(-HUGE_VALL));
   EXPECT_EQ(FP_NAN, __fpclassifyl(nanl("")));
@@ -231,7 +225,7 @@
   EXPECT_EQ(FP_ZERO, __fpclassifyl(0.0L));
 }
 
-TEST(MATH_TEST, finitef) {
+TEST(math_h, finitef) {
   ASSERT_TRUE(finitef(123.0f));
   ASSERT_FALSE(finitef(HUGE_VALF));
   ASSERT_FALSE(finitef(-HUGE_VALF));
@@ -244,7 +238,7 @@
 extern "C" int __isfinitel(long double);
 extern "C" int isfinitel(long double);
 
-TEST(MATH_TEST, __isfinite) {
+TEST(math_h, __isfinite) {
 #if defined(__GLIBC__)
 #define __isfinite __finite
 #elif defined(ANDROID_HOST_MUSL)
@@ -255,7 +249,7 @@
   ASSERT_FALSE(__isfinite(-HUGE_VAL));
 }
 
-TEST(MATH_TEST, __isfinitef) {
+TEST(math_h, __isfinitef) {
 #if defined(__GLIBC__)
 #define __isfinitef __finitef
 #elif defined(ANDROID_HOST_MUSL)
@@ -266,7 +260,7 @@
   ASSERT_FALSE(__isfinitef(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, isfinitef) {
+TEST(math_h, isfinitef) {
 #if defined(__GLIBC__)
 #define isfinitef __finitef
 #elif defined(ANDROID_HOST_MUSL)
@@ -277,7 +271,7 @@
   ASSERT_FALSE(isfinitef(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, __isfinitel) {
+TEST(math_h, __isfinitel) {
 #if defined(__GLIBC__)
 #define __isfinitel __finitel
 #elif defined(ANDROID_HOST_MUSL)
@@ -288,7 +282,7 @@
   ASSERT_FALSE(__isfinitel(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, isfinitel) {
+TEST(math_h, isfinitel) {
 #if defined(__GLIBC__)
 #define isfinitel __finitel
 #elif defined(ANDROID_HOST_MUSL)
@@ -299,13 +293,13 @@
   ASSERT_FALSE(isfinitel(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, finite) {
+TEST(math_h, finite) {
   ASSERT_TRUE(finite(123.0));
   ASSERT_FALSE(finite(HUGE_VAL));
   ASSERT_FALSE(finite(-HUGE_VAL));
 }
 
-TEST(MATH_TEST, isinf_function) {
+TEST(math_h, isinf_function) {
   // The isinf macro deals with all three types; the isinf function is for doubles.
   ASSERT_FALSE((isinf)(123.0));
   ASSERT_TRUE((isinf)(HUGE_VAL));
@@ -319,7 +313,7 @@
 extern "C" int __isinfl(long double);
 extern "C" int isinfl(long double);
 
-TEST(MATH_TEST, __isinf) {
+TEST(math_h, __isinf) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isinf isinf
 #endif
@@ -328,7 +322,7 @@
   ASSERT_TRUE(__isinf(-HUGE_VAL));
 }
 
-TEST(MATH_TEST, __isinff) {
+TEST(math_h, __isinff) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isinff isinf
 #endif
@@ -337,7 +331,7 @@
   ASSERT_TRUE(__isinff(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, isinff) {
+TEST(math_h, isinff) {
 #if defined(ANDROID_HOST_MUSL)
 #define isinff isinf
 #endif
@@ -346,7 +340,7 @@
   ASSERT_TRUE(isinff(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, __isinfl) {
+TEST(math_h, __isinfl) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isinfl isinf
 #endif
@@ -355,7 +349,7 @@
   ASSERT_TRUE(__isinfl(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, isinfl) {
+TEST(math_h, isinfl) {
 #if defined(ANDROID_HOST_MUSL)
 #define isinfl isinf
 #endif
@@ -364,7 +358,7 @@
   ASSERT_TRUE(isinfl(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, isnan_function) {
+TEST(math_h, isnan_function) {
   // The isnan macro deals with all three types; the isnan function is for doubles.
   ASSERT_FALSE((isnan)(123.0));
   ASSERT_TRUE((isnan)(nan("")));
@@ -377,7 +371,7 @@
 extern "C" int __isnanl(long double);
 extern "C" int isnanl(long double);
 
-TEST(MATH_TEST, __isnan) {
+TEST(math_h, __isnan) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isnan isnan
 #endif
@@ -385,7 +379,7 @@
   ASSERT_TRUE(__isnan(nan("")));
 }
 
-TEST(MATH_TEST, __isnanf) {
+TEST(math_h, __isnanf) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isnanf isnan
 #endif
@@ -393,7 +387,7 @@
   ASSERT_TRUE(__isnanf(nanf("")));
 }
 
-TEST(MATH_TEST, isnanf) {
+TEST(math_h, isnanf) {
 #if defined(ANDROID_HOST_MUSL)
 #define isnanf isnan
 #endif
@@ -401,7 +395,7 @@
   ASSERT_TRUE(isnanf(nanf("")));
 }
 
-TEST(MATH_TEST, __isnanl) {
+TEST(math_h, __isnanl) {
 #if defined(ANDROID_HOST_MUSL)
 #define __isnanl isnan
 #endif
@@ -409,7 +403,7 @@
   ASSERT_TRUE(__isnanl(nanl("")));
 }
 
-TEST(MATH_TEST, isnanl) {
+TEST(math_h, isnanl) {
 #if defined(ANDROID_HOST_MUSL)
 #define isnanl isnan
 #endif
@@ -424,7 +418,7 @@
 extern "C" int __isnormall(long double);
 extern "C" int isnormall(long double);
 
-TEST(MATH_TEST, __isnormal) {
+TEST(math_h, __isnormal) {
 #if defined(__BIONIC__)
   ASSERT_TRUE(__isnormal(123.0));
   ASSERT_FALSE(__isnormal(double_subnormal()));
@@ -433,7 +427,7 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, __isnormalf) {
+TEST(math_h, __isnormalf) {
 #if defined(__BIONIC__)
   ASSERT_TRUE(__isnormalf(123.0f));
   ASSERT_FALSE(__isnormalf(float_subnormal()));
@@ -442,7 +436,7 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, isnormalf) {
+TEST(math_h, isnormalf) {
 #if defined(__BIONIC__)
   ASSERT_TRUE(isnormalf(123.0f));
   ASSERT_FALSE(isnormalf(float_subnormal()));
@@ -451,7 +445,7 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, __isnormall) {
+TEST(math_h, __isnormall) {
 #if defined(__BIONIC__)
   ASSERT_TRUE(__isnormall(123.0L));
   ASSERT_FALSE(__isnormall(ldouble_subnormal()));
@@ -460,7 +454,7 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, isnormall) {
+TEST(math_h, isnormall) {
 #if defined(__BIONIC__)
   ASSERT_TRUE(isnormall(123.0L));
   ASSERT_FALSE(isnormall(ldouble_subnormal()));
@@ -474,370 +468,370 @@
 extern "C" int __signbitf(float);
 extern "C" int __signbitl(long double);
 
-TEST(MATH_TEST, __signbit) {
+TEST(math_h, __signbit) {
   ASSERT_EQ(0, __signbit(0.0));
   ASSERT_EQ(0, __signbit(1.0));
   ASSERT_NE(0, __signbit(-1.0));
 }
 
-TEST(MATH_TEST, __signbitf) {
+TEST(math_h, __signbitf) {
   ASSERT_EQ(0, __signbitf(0.0f));
   ASSERT_EQ(0, __signbitf(1.0f));
   ASSERT_NE(0, __signbitf(-1.0f));
 }
 
-TEST(MATH_TEST, __signbitl) {
+TEST(math_h, __signbitl) {
   ASSERT_EQ(0L, __signbitl(0.0L));
   ASSERT_EQ(0L, __signbitl(1.0L));
   ASSERT_NE(0L, __signbitl(-1.0L));
 }
 
-TEST(MATH_TEST, acos) {
+TEST(math_h, acos) {
   ASSERT_DOUBLE_EQ(M_PI/2.0, acos(0.0));
 }
 
-TEST(MATH_TEST, acosf) {
+TEST(math_h, acosf) {
   ASSERT_FLOAT_EQ(static_cast<float>(M_PI)/2.0f, acosf(0.0f));
 }
 
-TEST(MATH_TEST, acosl) {
+TEST(math_h, acosl) {
   ASSERT_DOUBLE_EQ(M_PI/2.0L, acosl(0.0L));
 }
 
-TEST(MATH_TEST, asin) {
+TEST(math_h, asin) {
   ASSERT_DOUBLE_EQ(0.0, asin(0.0));
 }
 
-TEST(MATH_TEST, asinf) {
+TEST(math_h, asinf) {
   ASSERT_FLOAT_EQ(0.0f, asinf(0.0f));
 }
 
-TEST(MATH_TEST, asinl) {
+TEST(math_h, asinl) {
   ASSERT_DOUBLE_EQ(0.0L, asinl(0.0L));
 }
 
-TEST(MATH_TEST, atan) {
+TEST(math_h, atan) {
   ASSERT_DOUBLE_EQ(0.0, atan(0.0));
 }
 
-TEST(MATH_TEST, atanf) {
+TEST(math_h, atanf) {
   ASSERT_FLOAT_EQ(0.0f, atanf(0.0f));
 }
 
-TEST(MATH_TEST, atanl) {
+TEST(math_h, atanl) {
   ASSERT_DOUBLE_EQ(0.0L, atanl(0.0L));
 }
 
-TEST(MATH_TEST, atan2) {
+TEST(math_h, atan2) {
   ASSERT_DOUBLE_EQ(0.0, atan2(0.0, 0.0));
 }
 
-TEST(MATH_TEST, atan2f) {
+TEST(math_h, atan2f) {
   ASSERT_FLOAT_EQ(0.0f, atan2f(0.0f, 0.0f));
 }
 
-TEST(MATH_TEST, atan2l) {
+TEST(math_h, atan2l) {
   ASSERT_DOUBLE_EQ(0.0L, atan2l(0.0L, 0.0L));
 }
 
-TEST(MATH_TEST, cos) {
+TEST(math_h, cos) {
   ASSERT_DOUBLE_EQ(1.0, cos(0.0));
 }
 
-TEST(MATH_TEST, cosf) {
+TEST(math_h, cosf) {
   ASSERT_FLOAT_EQ(1.0f, cosf(0.0f));
 }
 
-TEST(MATH_TEST, cosl) {
+TEST(math_h, cosl) {
   ASSERT_DOUBLE_EQ(1.0L, cosl(0.0L));
 }
 
-TEST(MATH_TEST, sin) {
+TEST(math_h, sin) {
   ASSERT_DOUBLE_EQ(0.0, sin(0.0));
 }
 
-TEST(MATH_TEST, sinf) {
+TEST(math_h, sinf) {
   ASSERT_FLOAT_EQ(0.0f, sinf(0.0f));
 }
 
-TEST(MATH_TEST, sinl) {
+TEST(math_h, sinl) {
   ASSERT_DOUBLE_EQ(0.0L, sinl(0.0L));
 }
 
-TEST(MATH_TEST, sincos) {
+TEST(math_h, sincos) {
   double s, c;
   sincos(0.0, &s, &c);
   ASSERT_DOUBLE_EQ(0.0, s);
   ASSERT_DOUBLE_EQ(1.0, c);
 }
 
-TEST(MATH_TEST, sincosf) {
+TEST(math_h, sincosf) {
   float s, c;
   sincosf(0.0f, &s, &c);
   ASSERT_FLOAT_EQ(0.0f, s);
   ASSERT_FLOAT_EQ(1.0f, c);
 }
 
-TEST(MATH_TEST, sincosl) {
+TEST(math_h, sincosl) {
   long double s, c;
   sincosl(0.0L, &s, &c);
   ASSERT_DOUBLE_EQ(0.0L, s);
   ASSERT_DOUBLE_EQ(1.0L, c);
 }
 
-TEST(MATH_TEST, tan) {
+TEST(math_h, tan) {
   ASSERT_DOUBLE_EQ(0.0, tan(0.0));
 }
 
-TEST(MATH_TEST, tanf) {
+TEST(math_h, tanf) {
   ASSERT_FLOAT_EQ(0.0f, tanf(0.0f));
 }
 
-TEST(MATH_TEST, tanl) {
+TEST(math_h, tanl) {
   ASSERT_DOUBLE_EQ(0.0L, tanl(0.0L));
 }
 
-TEST(MATH_TEST, acosh) {
+TEST(math_h, acosh) {
   ASSERT_DOUBLE_EQ(0.0, acosh(1.0));
 }
 
-TEST(MATH_TEST, acoshf) {
+TEST(math_h, acoshf) {
   ASSERT_FLOAT_EQ(0.0f, acoshf(1.0f));
 }
 
-TEST(MATH_TEST, acoshl) {
+TEST(math_h, acoshl) {
   ASSERT_DOUBLE_EQ(0.0L, acoshl(1.0L));
 }
 
-TEST(MATH_TEST, asinh) {
+TEST(math_h, asinh) {
   ASSERT_DOUBLE_EQ(0.0, asinh(0.0));
 }
 
-TEST(MATH_TEST, asinhf) {
+TEST(math_h, asinhf) {
   ASSERT_FLOAT_EQ(0.0f, asinhf(0.0f));
 }
 
-TEST(MATH_TEST, asinhl) {
+TEST(math_h, asinhl) {
   ASSERT_DOUBLE_EQ(0.0L, asinhl(0.0L));
 }
 
-TEST(MATH_TEST, atanh) {
+TEST(math_h, atanh) {
   ASSERT_DOUBLE_EQ(0.0, atanh(0.0));
 }
 
-TEST(MATH_TEST, atanhf) {
+TEST(math_h, atanhf) {
   ASSERT_FLOAT_EQ(0.0f, atanhf(0.0f));
 }
 
-TEST(MATH_TEST, atanhl) {
+TEST(math_h, atanhl) {
   ASSERT_DOUBLE_EQ(0.0L, atanhl(0.0L));
 }
 
-TEST(MATH_TEST, cosh) {
+TEST(math_h, cosh) {
   ASSERT_DOUBLE_EQ(1.0, cosh(0.0));
 }
 
-TEST(MATH_TEST, coshf) {
+TEST(math_h, coshf) {
   ASSERT_FLOAT_EQ(1.0f, coshf(0.0f));
 }
 
-TEST(MATH_TEST, coshl) {
+TEST(math_h, coshl) {
   ASSERT_DOUBLE_EQ(1.0L, coshl(0.0L));
 }
 
-TEST(MATH_TEST, sinh) {
+TEST(math_h, sinh) {
   ASSERT_DOUBLE_EQ(0.0, sinh(0.0));
 }
 
-TEST(MATH_TEST, sinhf) {
+TEST(math_h, sinhf) {
   ASSERT_FLOAT_EQ(0.0f, sinhf(0.0f));
 }
 
-TEST(MATH_TEST, sinhl) {
+TEST(math_h, sinhl) {
   ASSERT_DOUBLE_EQ(0.0L, sinhl(0.0L));
 }
 
-TEST(MATH_TEST, tanh) {
+TEST(math_h, tanh) {
   ASSERT_DOUBLE_EQ(0.0, tanh(0.0));
 }
 
-TEST(MATH_TEST, tanhf) {
+TEST(math_h, tanhf) {
   ASSERT_FLOAT_EQ(0.0f, tanhf(0.0f));
 }
 
-TEST(MATH_TEST, tanhl) {
+TEST(math_h, tanhl) {
   ASSERT_DOUBLE_EQ(0.0L, tanhl(0.0L));
 }
 
-TEST(MATH_TEST, log) {
+TEST(math_h, log) {
   ASSERT_DOUBLE_EQ(1.0, log(M_E));
 }
 
-TEST(MATH_TEST, logf) {
+TEST(math_h, logf) {
   ASSERT_FLOAT_EQ(1.0f, logf(static_cast<float>(M_E)));
 }
 
-TEST(MATH_TEST, logl) {
+TEST(math_h, logl) {
   ASSERT_DOUBLE_EQ(1.0L, logl(M_E));
 }
 
-TEST(MATH_TEST, log2) {
+TEST(math_h, log2) {
   ASSERT_DOUBLE_EQ(12.0, log2(4096.0));
 }
 
-TEST(MATH_TEST, log2f) {
+TEST(math_h, log2f) {
   ASSERT_FLOAT_EQ(12.0f, log2f(4096.0f));
 }
 
-TEST(MATH_TEST, log2l) {
+TEST(math_h, log2l) {
   ASSERT_DOUBLE_EQ(12.0L, log2l(4096.0L));
 }
 
-TEST(MATH_TEST, log10) {
+TEST(math_h, log10) {
   ASSERT_DOUBLE_EQ(3.0, log10(1000.0));
 }
 
-TEST(MATH_TEST, log10f) {
+TEST(math_h, log10f) {
   ASSERT_FLOAT_EQ(3.0f, log10f(1000.0f));
 }
 
-TEST(MATH_TEST, log10l) {
+TEST(math_h, log10l) {
   ASSERT_DOUBLE_EQ(3.0L, log10l(1000.0L));
 }
 
-TEST(MATH_TEST, cbrt) {
+TEST(math_h, cbrt) {
   ASSERT_DOUBLE_EQ(3.0, cbrt(27.0));
 }
 
-TEST(MATH_TEST, cbrtf) {
+TEST(math_h, cbrtf) {
   ASSERT_FLOAT_EQ(3.0f, cbrtf(27.0f));
 }
 
-TEST(MATH_TEST, cbrtl) {
+TEST(math_h, cbrtl) {
   ASSERT_DOUBLE_EQ(3.0L, cbrtl(27.0L));
 }
 
-TEST(MATH_TEST, sqrt) {
+TEST(math_h, sqrt) {
   ASSERT_DOUBLE_EQ(2.0, sqrt(4.0));
 }
 
-TEST(MATH_TEST, sqrtf) {
+TEST(math_h, sqrtf) {
   ASSERT_FLOAT_EQ(2.0f, sqrtf(4.0f));
 }
 
-TEST(MATH_TEST, sqrtl) {
+TEST(math_h, sqrtl) {
   ASSERT_DOUBLE_EQ(2.0L, sqrtl(4.0L));
 }
 
-TEST(MATH_TEST, exp) {
+TEST(math_h, exp) {
   ASSERT_DOUBLE_EQ(1.0, exp(0.0));
   ASSERT_DOUBLE_EQ(M_E, exp(1.0));
 }
 
-TEST(MATH_TEST, expf) {
+TEST(math_h, expf) {
   ASSERT_FLOAT_EQ(1.0f, expf(0.0f));
   ASSERT_FLOAT_EQ(static_cast<float>(M_E), expf(1.0f));
 }
 
-TEST(MATH_TEST, expl) {
+TEST(math_h, expl) {
   ASSERT_DOUBLE_EQ(1.0L, expl(0.0L));
   ASSERT_DOUBLE_EQ(M_E, expl(1.0L));
 }
 
-TEST(MATH_TEST, exp2) {
+TEST(math_h, exp2) {
   ASSERT_DOUBLE_EQ(8.0, exp2(3.0));
 }
 
-TEST(MATH_TEST, exp2f) {
+TEST(math_h, exp2f) {
   ASSERT_FLOAT_EQ(8.0f, exp2f(3.0f));
 }
 
-TEST(MATH_TEST, exp2l) {
+TEST(math_h, exp2l) {
   ASSERT_DOUBLE_EQ(8.0L, exp2l(3.0L));
 }
 
-TEST(MATH_TEST, expm1) {
+TEST(math_h, expm1) {
   ASSERT_DOUBLE_EQ(M_E - 1.0, expm1(1.0));
 }
 
-TEST(MATH_TEST, expm1f) {
+TEST(math_h, expm1f) {
   ASSERT_FLOAT_EQ(static_cast<float>(M_E) - 1.0f, expm1f(1.0f));
 }
 
-TEST(MATH_TEST, expm1l) {
+TEST(math_h, expm1l) {
   ASSERT_DOUBLE_EQ(M_E - 1.0L, expm1l(1.0L));
 }
 
-TEST(MATH_TEST, pow) {
+TEST(math_h, pow) {
   ASSERT_TRUE(isnan(pow(nan(""), 3.0)));
   ASSERT_DOUBLE_EQ(1.0, (pow(1.0, nan(""))));
   ASSERT_TRUE(isnan(pow(2.0, nan(""))));
   ASSERT_DOUBLE_EQ(8.0, pow(2.0, 3.0));
 }
 
-TEST(MATH_TEST, powf) {
+TEST(math_h, powf) {
   ASSERT_TRUE(isnanf(powf(nanf(""), 3.0f)));
   ASSERT_FLOAT_EQ(1.0f, (powf(1.0f, nanf(""))));
   ASSERT_TRUE(isnanf(powf(2.0f, nanf(""))));
   ASSERT_FLOAT_EQ(8.0f, powf(2.0f, 3.0f));
 }
 
-TEST(MATH_TEST, powl) {
+TEST(math_h, powl) {
   ASSERT_TRUE(__isnanl(powl(nanl(""), 3.0L)));
   ASSERT_DOUBLE_EQ(1.0L, (powl(1.0L, nanl(""))));
   ASSERT_TRUE(__isnanl(powl(2.0L, nanl(""))));
   ASSERT_DOUBLE_EQ(8.0L, powl(2.0L, 3.0L));
 }
 
-TEST(MATH_TEST, ceil) {
+TEST(math_h, ceil) {
   ASSERT_DOUBLE_EQ(1.0, ceil(0.9));
 }
 
-TEST(MATH_TEST, ceilf) {
+TEST(math_h, ceilf) {
   ASSERT_FLOAT_EQ(1.0f, ceilf(0.9f));
 }
 
-TEST(MATH_TEST, ceill) {
+TEST(math_h, ceill) {
   ASSERT_DOUBLE_EQ(1.0L, ceill(0.9L));
 }
 
-TEST(MATH_TEST, floor) {
+TEST(math_h, floor) {
   ASSERT_DOUBLE_EQ(1.0, floor(1.1));
 }
 
-TEST(MATH_TEST, floorf) {
+TEST(math_h, floorf) {
   ASSERT_FLOAT_EQ(1.0f, floorf(1.1f));
 }
 
-TEST(MATH_TEST, floorl) {
+TEST(math_h, floorl) {
   ASSERT_DOUBLE_EQ(1.0L, floorl(1.1L));
 }
 
-TEST(MATH_TEST, fabs) {
+TEST(math_h, fabs) {
   ASSERT_DOUBLE_EQ(1.0, fabs(-1.0));
 }
 
-TEST(MATH_TEST, fabsf) {
+TEST(math_h, fabsf) {
   ASSERT_FLOAT_EQ(1.0f, fabsf(-1.0f));
 }
 
-TEST(MATH_TEST, fabsl) {
+TEST(math_h, fabsl) {
   ASSERT_DOUBLE_EQ(1.0L, fabsl(-1.0L));
 }
 
-TEST(MATH_TEST, ldexp) {
+TEST(math_h, ldexp) {
   ASSERT_DOUBLE_EQ(16.0, ldexp(2.0, 3.0));
 }
 
-TEST(MATH_TEST, ldexpf) {
+TEST(math_h, ldexpf) {
   ASSERT_FLOAT_EQ(16.0f, ldexpf(2.0f, 3.0f));
 }
 
-TEST(MATH_TEST, ldexpl) {
+TEST(math_h, ldexpl) {
   ASSERT_DOUBLE_EQ(16.0L, ldexpl(2.0L, 3.0));
 }
 
-TEST(MATH_TEST, fmod) {
+TEST(math_h, fmod) {
   ASSERT_DOUBLE_EQ(2.0, fmod(12.0, 10.0));
 
   // If x is an infinity, NaN is returned.
@@ -852,7 +846,7 @@
   ASSERT_TRUE(isnan(fmod(3.0, 0.0)));
 }
 
-TEST(MATH_TEST, fmodf) {
+TEST(math_h, fmodf) {
   ASSERT_FLOAT_EQ(2.0f, fmodf(12.0f, 10.0f));
 
   // If x is an infinity, NaN is returned.
@@ -867,7 +861,7 @@
   ASSERT_TRUE(isnanf(fmodf(3.0f, 0.0f)));
 }
 
-TEST(MATH_TEST, fmodl) {
+TEST(math_h, fmodl) {
   ASSERT_DOUBLE_EQ(2.0L, fmodl(12.0L, 10.0L));
 
   // If x is an infinity, NaN is returned.
@@ -882,7 +876,7 @@
   ASSERT_TRUE(isnanl(fmodl(3.0L, 0.0L)));
 }
 
-TEST(MATH_TEST, remainder) {
+TEST(math_h, remainder) {
   ASSERT_DOUBLE_EQ(2.0, remainder(12.0, 10.0));
 
   // If x or y is a NaN, NaN is returned.
@@ -897,7 +891,7 @@
   ASSERT_TRUE(isnan(remainder(12.0, 0.0)));
 }
 
-TEST(MATH_TEST, remainderf) {
+TEST(math_h, remainderf) {
   ASSERT_FLOAT_EQ(2.0f, remainderf(12.0f, 10.0f));
 
   // If x or y is a NaN, NaN is returned.
@@ -912,7 +906,7 @@
   ASSERT_TRUE(isnanf(remainderf(12.0f, 0.0f)));
 }
 
-TEST(MATH_TEST, remainderl) {
+TEST(math_h, remainderl) {
   ASSERT_DOUBLE_EQ(2.0L, remainderl(12.0L, 10.0L));
 
   // If x or y is a NaN, NaN is returned.
@@ -927,63 +921,63 @@
   ASSERT_TRUE(isnanl(remainderl(12.0L, 0.0L)));
 }
 
-TEST(MATH_TEST, drem) {
+TEST(math_h, drem) {
   ASSERT_DOUBLE_EQ(2.0, drem(12.0, 10.0));
 }
 
-TEST(MATH_TEST, dremf) {
+TEST(math_h, dremf) {
   ASSERT_FLOAT_EQ(2.0f, dremf(12.0f, 10.0f));
 }
 
-TEST(MATH_TEST, fmax) {
+TEST(math_h, fmax) {
   ASSERT_DOUBLE_EQ(12.0, fmax(12.0, 10.0));
   ASSERT_DOUBLE_EQ(12.0, fmax(12.0, nan("")));
   ASSERT_DOUBLE_EQ(12.0, fmax(nan(""), 12.0));
 }
 
-TEST(MATH_TEST, fmaxf) {
+TEST(math_h, fmaxf) {
   ASSERT_FLOAT_EQ(12.0f, fmaxf(12.0f, 10.0f));
   ASSERT_FLOAT_EQ(12.0f, fmaxf(12.0f, nanf("")));
   ASSERT_FLOAT_EQ(12.0f, fmaxf(nanf(""), 12.0f));
 }
 
-TEST(MATH_TEST, fmaxl) {
+TEST(math_h, fmaxl) {
   ASSERT_DOUBLE_EQ(12.0L, fmaxl(12.0L, 10.0L));
   ASSERT_DOUBLE_EQ(12.0L, fmaxl(12.0L, nanl("")));
   ASSERT_DOUBLE_EQ(12.0L, fmaxl(nanl(""), 12.0L));
 }
 
-TEST(MATH_TEST, fmin) {
+TEST(math_h, fmin) {
   ASSERT_DOUBLE_EQ(10.0, fmin(12.0, 10.0));
   ASSERT_DOUBLE_EQ(12.0, fmin(12.0, nan("")));
   ASSERT_DOUBLE_EQ(12.0, fmin(nan(""), 12.0));
 }
 
-TEST(MATH_TEST, fminf) {
+TEST(math_h, fminf) {
   ASSERT_FLOAT_EQ(10.0f, fminf(12.0f, 10.0f));
   ASSERT_FLOAT_EQ(12.0f, fminf(12.0f, nanf("")));
   ASSERT_FLOAT_EQ(12.0f, fminf(nanf(""), 12.0f));
 }
 
-TEST(MATH_TEST, fminl) {
+TEST(math_h, fminl) {
   ASSERT_DOUBLE_EQ(10.0L, fminl(12.0L, 10.0L));
   ASSERT_DOUBLE_EQ(12.0L, fminl(12.0L, nanl("")));
   ASSERT_DOUBLE_EQ(12.0L, fminl(nanl(""), 12.0L));
 }
 
-TEST(MATH_TEST, fma) {
+TEST(math_h, fma) {
   ASSERT_DOUBLE_EQ(10.0, fma(2.0, 3.0, 4.0));
 }
 
-TEST(MATH_TEST, fmaf) {
+TEST(math_h, fmaf) {
   ASSERT_FLOAT_EQ(10.0f, fmaf(2.0f, 3.0f, 4.0f));
 }
 
-TEST(MATH_TEST, fmal) {
+TEST(math_h, fmal) {
   ASSERT_DOUBLE_EQ(10.0L, fmal(2.0L, 3.0L, 4.0L));
 }
 
-TEST(MATH_TEST, hypot) {
+TEST(math_h, hypot) {
   ASSERT_DOUBLE_EQ(5.0, hypot(3.0, 4.0));
 
   // If x or y is an infinity, returns positive infinity.
@@ -997,7 +991,7 @@
   ASSERT_TRUE(isnan(hypot(nan(""), 4.0)));
 }
 
-TEST(MATH_TEST, hypotf) {
+TEST(math_h, hypotf) {
   ASSERT_FLOAT_EQ(5.0f, hypotf(3.0f, 4.0f));
 
   // If x or y is an infinity, returns positive infinity.
@@ -1011,7 +1005,7 @@
   ASSERT_TRUE(isnanf(hypotf(nanf(""), 4.0f)));
 }
 
-TEST(MATH_TEST, hypotl) {
+TEST(math_h, hypotl) {
   ASSERT_DOUBLE_EQ(5.0L, hypotl(3.0L, 4.0L));
 
   // If x or y is an infinity, returns positive infinity.
@@ -1025,31 +1019,31 @@
   ASSERT_TRUE(isnanl(hypotl(nanl(""), 4.0L)));
 }
 
-TEST(MATH_TEST, erf) {
+TEST(math_h, erf) {
   ASSERT_DOUBLE_EQ(0.84270079294971489, erf(1.0));
 }
 
-TEST(MATH_TEST, erff) {
+TEST(math_h, erff) {
   ASSERT_FLOAT_EQ(0.84270078f, erff(1.0f));
 }
 
-TEST(MATH_TEST, erfl) {
+TEST(math_h, erfl) {
   ASSERT_DOUBLE_EQ(0.84270079294971489L, erfl(1.0L));
 }
 
-TEST(MATH_TEST, erfc) {
+TEST(math_h, erfc) {
   ASSERT_DOUBLE_EQ(0.15729920705028513, erfc(1.0));
 }
 
-TEST(MATH_TEST, erfcf) {
+TEST(math_h, erfcf) {
   ASSERT_FLOAT_EQ(0.15729921f, erfcf(1.0f));
 }
 
-TEST(MATH_TEST, erfcl) {
+TEST(math_h, erfcl) {
   ASSERT_DOUBLE_EQ(0.15729920705028513L, erfcl(1.0L));
 }
 
-TEST(MATH_TEST, lrint) {
+TEST(math_h, lrint) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
 
   fesetround(FE_UPWARD); // lrint/lrintf/lrintl obey the rounding mode.
@@ -1071,7 +1065,7 @@
   EXPECT_EQ(1234L, llrintl(1234.01L));
 }
 
-TEST(MATH_TEST, rint) {
+TEST(math_h, rint) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
 
   fesetround(FE_UPWARD); // rint/rintf/rintl obey the rounding mode.
@@ -1099,7 +1093,7 @@
   ASSERT_EQ(1234.0, rintl(1234.01L));
 }
 
-TEST(MATH_TEST, nearbyint) {
+TEST(math_h, nearbyint) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // nearbyint/nearbyintf/nearbyintl obey the rounding mode.
   feclearexcept(FE_ALL_EXCEPT); // nearbyint/nearbyintf/nearbyintl don't set the FE_INEXACT flag.
@@ -1126,7 +1120,7 @@
   ASSERT_EQ(1234.0, nearbyintl(1234.01L));
 }
 
-TEST(MATH_TEST, lround) {
+TEST(math_h, lround) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // lround ignores the rounding mode.
   ASSERT_EQ(1234, lround(1234.01));
@@ -1134,7 +1128,7 @@
   ASSERT_EQ(1234, lroundl(1234.01L));
 }
 
-TEST(MATH_TEST, llround) {
+TEST(math_h, llround) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // llround ignores the rounding mode.
   ASSERT_EQ(1234L, llround(1234.01));
@@ -1142,7 +1136,7 @@
   ASSERT_EQ(1234L, llroundl(1234.01L));
 }
 
-TEST(MATH_TEST, ilogb) {
+TEST(math_h, ilogb) {
   ASSERT_EQ(FP_ILOGB0, ilogb(0.0));
   ASSERT_EQ(FP_ILOGBNAN, ilogb(nan("")));
   ASSERT_EQ(INT_MAX, ilogb(HUGE_VAL));
@@ -1151,7 +1145,7 @@
   ASSERT_EQ(3, ilogb(10.0));
 }
 
-TEST(MATH_TEST, ilogbf) {
+TEST(math_h, ilogbf) {
   ASSERT_EQ(FP_ILOGB0, ilogbf(0.0f));
   ASSERT_EQ(FP_ILOGBNAN, ilogbf(nanf("")));
   ASSERT_EQ(INT_MAX, ilogbf(HUGE_VALF));
@@ -1160,7 +1154,7 @@
   ASSERT_EQ(3, ilogbf(10.0f));
 }
 
-TEST(MATH_TEST, ilogbl) {
+TEST(math_h, ilogbl) {
   ASSERT_EQ(FP_ILOGB0, ilogbl(0.0L));
   ASSERT_EQ(FP_ILOGBNAN, ilogbl(nanl("")));
   ASSERT_EQ(INT_MAX, ilogbl(HUGE_VALL));
@@ -1169,7 +1163,7 @@
   ASSERT_EQ(3L, ilogbl(10.0L));
 }
 
-TEST(MATH_TEST, logb) {
+TEST(math_h, logb) {
   ASSERT_EQ(-HUGE_VAL, logb(0.0));
   ASSERT_TRUE(isnan(logb(nan(""))));
   ASSERT_TRUE(isinf(logb(HUGE_VAL)));
@@ -1178,7 +1172,7 @@
   ASSERT_EQ(3.0, logb(10.0));
 }
 
-TEST(MATH_TEST, logbf) {
+TEST(math_h, logbf) {
   ASSERT_EQ(-HUGE_VALF, logbf(0.0f));
   ASSERT_TRUE(isnanf(logbf(nanf(""))));
   ASSERT_TRUE(isinff(logbf(HUGE_VALF)));
@@ -1187,7 +1181,7 @@
   ASSERT_EQ(3.0f, logbf(10.0f));
 }
 
-TEST(MATH_TEST, logbl) {
+TEST(math_h, logbl) {
   ASSERT_EQ(-HUGE_VAL, logbl(0.0L));
   ASSERT_TRUE(isnan(logbl(nanl(""))));
   ASSERT_TRUE(isinf(logbl(HUGE_VALL)));
@@ -1196,7 +1190,7 @@
   ASSERT_EQ(3.0L, logbl(10.0L));
 }
 
-TEST(MATH_TEST, log1p) {
+TEST(math_h, log1p) {
   ASSERT_EQ(-HUGE_VAL, log1p(-1.0));
   ASSERT_TRUE(isnan(log1p(nan(""))));
   ASSERT_TRUE(isinf(log1p(HUGE_VAL)));
@@ -1204,7 +1198,7 @@
   ASSERT_DOUBLE_EQ(1.0, log1p(M_E - 1.0));
 }
 
-TEST(MATH_TEST, log1pf) {
+TEST(math_h, log1pf) {
   ASSERT_EQ(-HUGE_VALF, log1pf(-1.0f));
   ASSERT_TRUE(isnanf(log1pf(nanf(""))));
   ASSERT_TRUE(isinff(log1pf(HUGE_VALF)));
@@ -1212,7 +1206,7 @@
   ASSERT_FLOAT_EQ(1.0f, log1pf(static_cast<float>(M_E) - 1.0f));
 }
 
-TEST(MATH_TEST, log1pl) {
+TEST(math_h, log1pl) {
   ASSERT_EQ(-HUGE_VALL, log1pl(-1.0L));
   ASSERT_TRUE(isnanl(log1pl(nanl(""))));
   ASSERT_TRUE(isinfl(log1pl(HUGE_VALL)));
@@ -1220,25 +1214,25 @@
   ASSERT_DOUBLE_EQ(1.0L, log1pl(M_E - 1.0L));
 }
 
-TEST(MATH_TEST, fdim) {
+TEST(math_h, fdim) {
   ASSERT_DOUBLE_EQ(0.0, fdim(1.0, 1.0));
   ASSERT_DOUBLE_EQ(1.0, fdim(2.0, 1.0));
   ASSERT_DOUBLE_EQ(0.0, fdim(1.0, 2.0));
 }
 
-TEST(MATH_TEST, fdimf) {
+TEST(math_h, fdimf) {
   ASSERT_FLOAT_EQ(0.0f, fdimf(1.0f, 1.0f));
   ASSERT_FLOAT_EQ(1.0f, fdimf(2.0f, 1.0f));
   ASSERT_FLOAT_EQ(0.0f, fdimf(1.0f, 2.0f));
 }
 
-TEST(MATH_TEST, fdiml) {
+TEST(math_h, fdiml) {
   ASSERT_DOUBLE_EQ(0.0L, fdiml(1.0L, 1.0L));
   ASSERT_DOUBLE_EQ(1.0L, fdiml(2.0L, 1.0L));
   ASSERT_DOUBLE_EQ(0.0L, fdiml(1.0L, 2.0L));
 }
 
-TEST(MATH_TEST, round) {
+TEST(math_h, round) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_TOWARDZERO); // round ignores the rounding mode and always rounds away from zero.
   ASSERT_DOUBLE_EQ(1.0, round(0.5));
@@ -1250,7 +1244,7 @@
   ASSERT_DOUBLE_EQ(-HUGE_VAL, round(-HUGE_VAL));
 }
 
-TEST(MATH_TEST, roundf) {
+TEST(math_h, roundf) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_TOWARDZERO); // roundf ignores the rounding mode and always rounds away from zero.
   ASSERT_FLOAT_EQ(1.0f, roundf(0.5f));
@@ -1262,7 +1256,7 @@
   ASSERT_FLOAT_EQ(-HUGE_VALF, roundf(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, roundl) {
+TEST(math_h, roundl) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_TOWARDZERO); // roundl ignores the rounding mode and always rounds away from zero.
   ASSERT_DOUBLE_EQ(1.0L, roundl(0.5L));
@@ -1274,7 +1268,7 @@
   ASSERT_DOUBLE_EQ(-HUGE_VALL, roundl(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, trunc) {
+TEST(math_h, trunc) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // trunc ignores the rounding mode and always rounds toward zero.
   ASSERT_DOUBLE_EQ(1.0, trunc(1.5));
@@ -1286,7 +1280,7 @@
   ASSERT_DOUBLE_EQ(-HUGE_VAL, trunc(-HUGE_VAL));
 }
 
-TEST(MATH_TEST, truncf) {
+TEST(math_h, truncf) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // truncf ignores the rounding mode and always rounds toward zero.
   ASSERT_FLOAT_EQ(1.0f, truncf(1.5f));
@@ -1298,7 +1292,7 @@
   ASSERT_FLOAT_EQ(-HUGE_VALF, truncf(-HUGE_VALF));
 }
 
-TEST(MATH_TEST, truncl) {
+TEST(math_h, truncl) {
   auto guard = android::base::make_scope_guard([]() { fesetenv(FE_DFL_ENV); });
   fesetround(FE_UPWARD); // truncl ignores the rounding mode and always rounds toward zero.
   ASSERT_DOUBLE_EQ(1.0L, truncl(1.5L));
@@ -1310,19 +1304,19 @@
   ASSERT_DOUBLE_EQ(-HUGE_VALL, truncl(-HUGE_VALL));
 }
 
-TEST(MATH_TEST, nextafter) {
+TEST(math_h, nextafter) {
   ASSERT_DOUBLE_EQ(0.0, nextafter(0.0, 0.0));
   ASSERT_DOUBLE_EQ(4.9406564584124654e-324, nextafter(0.0, 1.0));
   ASSERT_DOUBLE_EQ(-4.9406564584124654e-324, nextafter(0.0, -1.0));
 }
 
-TEST(MATH_TEST, nextafterf) {
+TEST(math_h, nextafterf) {
   ASSERT_FLOAT_EQ(0.0f, nextafterf(0.0f, 0.0f));
   ASSERT_FLOAT_EQ(1.4012985e-45f, nextafterf(0.0f, 1.0f));
   ASSERT_FLOAT_EQ(-1.4012985e-45f, nextafterf(0.0f, -1.0f));
 }
 
-TEST(MATH_TEST, nextafterl) {
+TEST(math_h, nextafterl) {
   ASSERT_DOUBLE_EQ(0.0L, nextafterl(0.0L, 0.0L));
   // Use a runtime value to accomodate the case when
   // sizeof(double) == sizeof(long double)
@@ -1331,19 +1325,19 @@
   ASSERT_DOUBLE_EQ(-smallest_positive, nextafterl(0.0L, -1.0L));
 }
 
-TEST(MATH_TEST, nexttoward) {
+TEST(math_h, nexttoward) {
   ASSERT_DOUBLE_EQ(0.0, nexttoward(0.0, 0.0L));
   ASSERT_DOUBLE_EQ(4.9406564584124654e-324, nexttoward(0.0, 1.0L));
   ASSERT_DOUBLE_EQ(-4.9406564584124654e-324, nexttoward(0.0, -1.0L));
 }
 
-TEST(MATH_TEST, nexttowardf) {
+TEST(math_h, nexttowardf) {
   ASSERT_FLOAT_EQ(0.0f, nexttowardf(0.0f, 0.0L));
   ASSERT_FLOAT_EQ(1.4012985e-45f, nexttowardf(0.0f, 1.0L));
   ASSERT_FLOAT_EQ(-1.4012985e-45f, nexttowardf(0.0f, -1.0L));
 }
 
-TEST(MATH_TEST, nexttowardl) {
+TEST(math_h, nexttowardl) {
   ASSERT_DOUBLE_EQ(0.0L, nexttowardl(0.0L, 0.0L));
   // Use a runtime value to accomodate the case when
   // sizeof(double) == sizeof(long double)
@@ -1352,40 +1346,40 @@
   ASSERT_DOUBLE_EQ(-smallest_positive, nexttowardl(0.0L, -1.0L));
 }
 
-TEST(MATH_TEST, copysign) {
+TEST(math_h, copysign) {
   ASSERT_DOUBLE_EQ(0.0, copysign(0.0, 1.0));
   ASSERT_DOUBLE_EQ(-0.0, copysign(0.0, -1.0));
   ASSERT_DOUBLE_EQ(2.0, copysign(2.0, 1.0));
   ASSERT_DOUBLE_EQ(-2.0, copysign(2.0, -1.0));
 }
 
-TEST(MATH_TEST, copysignf) {
+TEST(math_h, copysignf) {
   ASSERT_FLOAT_EQ(0.0f, copysignf(0.0f, 1.0f));
   ASSERT_FLOAT_EQ(-0.0f, copysignf(0.0f, -1.0f));
   ASSERT_FLOAT_EQ(2.0f, copysignf(2.0f, 1.0f));
   ASSERT_FLOAT_EQ(-2.0f, copysignf(2.0f, -1.0f));
 }
 
-TEST(MATH_TEST, copysignl) {
+TEST(math_h, copysignl) {
   ASSERT_DOUBLE_EQ(0.0L, copysignl(0.0L, 1.0L));
   ASSERT_DOUBLE_EQ(-0.0L, copysignl(0.0L, -1.0L));
   ASSERT_DOUBLE_EQ(2.0L, copysignl(2.0L, 1.0L));
   ASSERT_DOUBLE_EQ(-2.0L, copysignl(2.0L, -1.0L));
 }
 
-TEST(MATH_TEST, significand) {
+TEST(math_h, significand) {
   ASSERT_DOUBLE_EQ(0.0, significand(0.0));
   ASSERT_DOUBLE_EQ(1.2, significand(1.2));
   ASSERT_DOUBLE_EQ(1.53125, significand(12.25));
 }
 
-TEST(MATH_TEST, significandf) {
+TEST(math_h, significandf) {
   ASSERT_FLOAT_EQ(0.0f, significandf(0.0f));
   ASSERT_FLOAT_EQ(1.2f, significandf(1.2f));
   ASSERT_FLOAT_EQ(1.53125f, significandf(12.25f));
 }
 
-TEST(MATH_TEST, significandl) {
+TEST(math_h, significandl) {
 #if !defined(ANDROID_HOST_MUSL)
   ASSERT_DOUBLE_EQ(0.0L, significandl(0.0L));
   ASSERT_DOUBLE_EQ(1.2L, significandl(1.2L));
@@ -1395,40 +1389,39 @@
 #endif
 }
 
-
-TEST(MATH_TEST, scalb) {
+TEST(math_h, scalb) {
   ASSERT_DOUBLE_EQ(12.0, scalb(3.0, 2.0));
 }
 
-TEST(MATH_TEST, scalbf) {
+TEST(math_h, scalbf) {
   ASSERT_FLOAT_EQ(12.0f, scalbf(3.0f, 2.0f));
 }
 
-TEST(MATH_TEST, scalbln) {
+TEST(math_h, scalbln) {
   ASSERT_DOUBLE_EQ(12.0, scalbln(3.0, 2L));
 }
 
-TEST(MATH_TEST, scalblnf) {
+TEST(math_h, scalblnf) {
   ASSERT_FLOAT_EQ(12.0f, scalblnf(3.0f, 2L));
 }
 
-TEST(MATH_TEST, scalblnl) {
+TEST(math_h, scalblnl) {
   ASSERT_DOUBLE_EQ(12.0L, scalblnl(3.0L, 2L));
 }
 
-TEST(MATH_TEST, scalbn) {
+TEST(math_h, scalbn) {
   ASSERT_DOUBLE_EQ(12.0, scalbn(3.0, 2));
 }
 
-TEST(MATH_TEST, scalbnf) {
+TEST(math_h, scalbnf) {
   ASSERT_FLOAT_EQ(12.0f, scalbnf(3.0f, 2));
 }
 
-TEST(MATH_TEST, scalbnl) {
+TEST(math_h, scalbnl) {
   ASSERT_DOUBLE_EQ(12.0L, scalbnl(3.0L, 2));
 }
 
-TEST(MATH_TEST, gamma) {
+TEST(math_h, gamma) {
 #if !defined(ANDROID_HOST_MUSL)
   ASSERT_DOUBLE_EQ(log(24.0), gamma(5.0));
 #else
@@ -1436,7 +1429,7 @@
 #endif
 }
 
-TEST(MATH_TEST, gammaf) {
+TEST(math_h, gammaf) {
 #if !defined(ANDROID_HOST_MUSL)
   ASSERT_FLOAT_EQ(logf(24.0f), gammaf(5.0f));
 #else
@@ -1444,7 +1437,7 @@
 #endif
 }
 
-TEST(MATH_TEST, gamma_r) {
+TEST(math_h, gamma_r) {
 #if defined(__BIONIC__)
   int sign;
   ASSERT_DOUBLE_EQ(log(24.0), gamma_r(5.0, &sign));
@@ -1454,7 +1447,7 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, gammaf_r) {
+TEST(math_h, gammaf_r) {
 #if defined(__BIONIC__)
   int sign;
   ASSERT_FLOAT_EQ(logf(24.0f), gammaf_r(5.0f, &sign));
@@ -1464,25 +1457,25 @@
 #endif // __BIONIC__
 }
 
-TEST(MATH_TEST, lgamma) {
+TEST(math_h, lgamma) {
   ASSERT_DOUBLE_EQ(log(24.0), lgamma(5.0));
 }
 
-TEST(MATH_TEST, lgammaf) {
+TEST(math_h, lgammaf) {
   ASSERT_FLOAT_EQ(logf(24.0f), lgammaf(5.0f));
 }
 
-TEST(MATH_TEST, lgammal) {
+TEST(math_h, lgammal) {
   ASSERT_DOUBLE_EQ(logl(24.0L), lgammal(5.0L));
 }
 
-TEST(MATH_TEST, lgamma_r) {
+TEST(math_h, lgamma_r) {
   int sign;
   ASSERT_DOUBLE_EQ(log(24.0), lgamma_r(5.0, &sign));
   ASSERT_EQ(1, sign);
 }
 
-TEST(MATH_TEST, lgamma_r_17471883) {
+TEST(math_h, lgamma_r_17471883) {
   int sign;
 
   sign = 0;
@@ -1493,13 +1486,13 @@
   ASSERT_EQ(-1, sign);
 }
 
-TEST(MATH_TEST, lgammaf_r) {
+TEST(math_h, lgammaf_r) {
   int sign;
   ASSERT_FLOAT_EQ(logf(24.0f), lgammaf_r(5.0f, &sign));
   ASSERT_EQ(1, sign);
 }
 
-TEST(MATH_TEST, lgammaf_r_17471883) {
+TEST(math_h, lgammaf_r_17471883) {
   int sign;
 
   sign = 0;
@@ -1510,13 +1503,13 @@
   ASSERT_EQ(-1, sign);
 }
 
-TEST(MATH_TEST, lgammal_r) {
+TEST(math_h, lgammal_r) {
   int sign;
   ASSERT_DOUBLE_EQ(log(24.0L), lgamma_r(5.0L, &sign));
   ASSERT_EQ(1, sign);
 }
 
-TEST(MATH_TEST, lgammal_r_17471883) {
+TEST(math_h, lgammal_r_17471883) {
   int sign;
 
   sign = 0;
@@ -1527,142 +1520,142 @@
   ASSERT_EQ(-1, sign);
 }
 
-TEST(MATH_TEST, tgamma_NaN) {
+TEST(math_h, tgamma_NaN) {
   ASSERT_TRUE(isnan(tgamma(nan(""))));
   ASSERT_TRUE(isnanf(tgammaf(nanf(""))));
   ASSERT_TRUE(isnanl(tgammal(nanl(""))));
 }
 
-TEST(MATH_TEST, tgamma_inf) {
+TEST(math_h, tgamma_inf) {
   ASSERT_TRUE(isinf(tgamma(HUGE_VAL)));
   ASSERT_TRUE(isinff(tgammaf(HUGE_VALF)));
   ASSERT_TRUE(isinfl(tgammal(HUGE_VALL)));
 }
 
-TEST(MATH_TEST, tgamma_negative) {
+TEST(math_h, tgamma_negative) {
   ASSERT_TRUE(isnan(tgamma(-1.0)));
   ASSERT_TRUE(isnanf(tgammaf(-1.0f)));
   ASSERT_TRUE(isnanl(tgammal(-1.0L)));
 }
 
-TEST(MATH_TEST, tgamma) {
+TEST(math_h, tgamma) {
   ASSERT_DOUBLE_EQ(24.0, tgamma(5.0));
   ASSERT_DOUBLE_EQ(120.0, tgamma(6.0));
   ASSERT_TRUE(isinf(tgamma(172.0)));
 }
 
-TEST(MATH_TEST, tgammaf) {
+TEST(math_h, tgammaf) {
   ASSERT_FLOAT_EQ(24.0f, tgammaf(5.0f));
   ASSERT_FLOAT_EQ(120.0f, tgammaf(6.0f));
   ASSERT_TRUE(isinff(tgammaf(172.0f)));
 }
 
-TEST(MATH_TEST, tgammal) {
+TEST(math_h, tgammal) {
   ASSERT_DOUBLE_EQ(24.0L, tgammal(5.0L));
   ASSERT_DOUBLE_EQ(120.0L, tgammal(6.0L));
   ASSERT_TRUE(isinf(tgammal(172.0L)));
 }
 
-TEST(MATH_TEST, j0) {
+TEST(math_h, j0) {
   ASSERT_DOUBLE_EQ(1.0, j0(0.0));
   ASSERT_DOUBLE_EQ(0.76519768655796661, j0(1.0));
 }
 
-TEST(MATH_TEST, j0f) {
+TEST(math_h, j0f) {
   ASSERT_FLOAT_EQ(1.0f, j0f(0.0f));
   ASSERT_FLOAT_EQ(0.76519769f, j0f(1.0f));
 }
 
-TEST(MATH_TEST, j1) {
+TEST(math_h, j1) {
   ASSERT_DOUBLE_EQ(0.0, j1(0.0));
   ASSERT_DOUBLE_EQ(0.44005058574493355, j1(1.0));
 }
 
-TEST(MATH_TEST, j1f) {
+TEST(math_h, j1f) {
   ASSERT_FLOAT_EQ(0.0f, j1f(0.0f));
   ASSERT_FLOAT_EQ(0.44005057f, j1f(1.0f));
 }
 
-TEST(MATH_TEST, jn) {
+TEST(math_h, jn) {
   ASSERT_DOUBLE_EQ(0.0, jn(4, 0.0));
   ASSERT_DOUBLE_EQ(0.0024766389641099553, jn(4, 1.0));
 }
 
-TEST(MATH_TEST, jnf) {
+TEST(math_h, jnf) {
   ASSERT_FLOAT_EQ(0.0f, jnf(4, 0.0f));
   ASSERT_FLOAT_EQ(0.0024766389f, jnf(4, 1.0f));
 }
 
-TEST(MATH_TEST, y0) {
+TEST(math_h, y0) {
   ASSERT_DOUBLE_EQ(-HUGE_VAL, y0(0.0));
   ASSERT_DOUBLE_EQ(0.08825696421567697, y0(1.0));
 }
 
-TEST(MATH_TEST, y0f) {
+TEST(math_h, y0f) {
   ASSERT_FLOAT_EQ(-HUGE_VALF, y0f(0.0f));
   ASSERT_FLOAT_EQ(0.088256963f, y0f(1.0f));
 }
 
-TEST(MATH_TEST, y1) {
+TEST(math_h, y1) {
   ASSERT_DOUBLE_EQ(-HUGE_VAL, y1(0.0));
   ASSERT_DOUBLE_EQ(-0.78121282130028868, y1(1.0));
 }
 
-TEST(MATH_TEST, y1f) {
+TEST(math_h, y1f) {
   ASSERT_FLOAT_EQ(-HUGE_VALF, y1f(0.0f));
   ASSERT_FLOAT_EQ(-0.78121281f, y1f(1.0f));
 }
 
-TEST(MATH_TEST, yn) {
+TEST(math_h, yn) {
   ASSERT_DOUBLE_EQ(-HUGE_VAL, yn(4, 0.0));
   ASSERT_DOUBLE_EQ(-33.278423028972114, yn(4, 1.0));
 }
 
-TEST(MATH_TEST, ynf) {
+TEST(math_h, ynf) {
   ASSERT_FLOAT_EQ(-HUGE_VALF, ynf(4, 0.0f));
   ASSERT_FLOAT_EQ(-33.278423f, ynf(4, 1.0f));
 }
 
-TEST(MATH_TEST, frexp) {
+TEST(math_h, frexp) {
   int exp;
   double dr = frexp(1024.0, &exp);
   ASSERT_DOUBLE_EQ(1024.0, scalbn(dr, exp));
 }
 
-TEST(MATH_TEST, frexpf) {
+TEST(math_h, frexpf) {
   int exp;
   float fr = frexpf(1024.0f, &exp);
   ASSERT_FLOAT_EQ(1024.0f, scalbnf(fr, exp));
 }
 
-TEST(MATH_TEST, frexpl) {
+TEST(math_h, frexpl) {
   int exp;
   long double ldr = frexpl(1024.0L, &exp);
   ASSERT_DOUBLE_EQ(1024.0L, scalbnl(ldr, exp));
 }
 
-TEST(MATH_TEST, modf) {
+TEST(math_h, modf) {
   double di;
   double df = modf(123.75, &di);
   ASSERT_DOUBLE_EQ(123.0, di);
   ASSERT_DOUBLE_EQ(0.75, df);
 }
 
-TEST(MATH_TEST, modff) {
+TEST(math_h, modff) {
   float fi;
   float ff = modff(123.75f, &fi);
   ASSERT_FLOAT_EQ(123.0f, fi);
   ASSERT_FLOAT_EQ(0.75f, ff);
 }
 
-TEST(MATH_TEST, modfl) {
+TEST(math_h, modfl) {
   long double ldi;
   long double ldf = modfl(123.75L, &ldi);
   ASSERT_DOUBLE_EQ(123.0L, ldi);
   ASSERT_DOUBLE_EQ(0.75L, ldf);
 }
 
-TEST(MATH_TEST, remquo) {
+TEST(math_h, remquo) {
   int q;
   double d = remquo(13.0, 4.0, &q);
   ASSERT_EQ(3, q);
@@ -1680,7 +1673,7 @@
   ASSERT_TRUE(isnan(remquo(12.0, 0.0, &q)));
 }
 
-TEST(MATH_TEST, remquof) {
+TEST(math_h, remquof) {
   int q;
   float f = remquof(13.0f, 4.0f, &q);
   ASSERT_EQ(3, q);
@@ -1698,7 +1691,7 @@
   ASSERT_TRUE(isnanf(remquof(12.0f, 0.0f, &q)));
 }
 
-TEST(MATH_TEST, remquol) {
+TEST(math_h, remquol) {
   int q;
   long double ld = remquol(13.0L, 4.0L, &q);
   ASSERT_DOUBLE_EQ(3L, q);
@@ -1717,13 +1710,13 @@
 }
 
 // https://code.google.com/p/android/issues/detail?id=6697
-TEST(MATH_TEST, frexpf_public_bug_6697) {
+TEST(math_h, frexpf_public_bug_6697) {
   int exp;
   float fr = frexpf(14.1f, &exp);
   ASSERT_FLOAT_EQ(14.1f, scalbnf(fr, exp));
 }
 
-TEST(MATH_TEST, exp2_STRICT_ALIGN_OpenBSD_bug) {
+TEST(math_h, exp2_STRICT_ALIGN_OpenBSD_bug) {
   // OpenBSD/x86's libm had a bug here, but it was already fixed in FreeBSD:
   // http://svnweb.FreeBSD.org/base/head/lib/msun/src/math_private.h?revision=240827&view=markup
   ASSERT_DOUBLE_EQ(5.0, exp2(log2(5)));
@@ -1731,7 +1724,7 @@
   ASSERT_DOUBLE_EQ(5.0L, exp2l(log2l(5)));
 }
 
-TEST(MATH_TEST, nextafterl_OpenBSD_bug) {
+TEST(math_h, nextafterl_OpenBSD_bug) {
   // OpenBSD/x86's libm had a bug here.
   ASSERT_TRUE(nextafter(1.0, 0.0) - 1.0 < 0.0);
   ASSERT_TRUE(nextafterf(1.0f, 0.0f) - 1.0f < 0.0f);
@@ -1739,511 +1732,511 @@
 }
 
 #include "math_data/acos_intel_data.h"
-TEST(MATH_TEST, acos_intel) {
+TEST(math_h, acos_intel) {
   DoMathDataTest<1>(g_acos_intel_data, acos);
 }
 
 #include "math_data/acosf_intel_data.h"
-TEST(MATH_TEST, acosf_intel) {
+TEST(math_h, acosf_intel) {
   DoMathDataTest<1>(g_acosf_intel_data, acosf);
 }
 
 #include "math_data/acosh_intel_data.h"
-TEST(MATH_TEST, acosh_intel) {
+TEST(math_h, acosh_intel) {
   DoMathDataTest<2>(g_acosh_intel_data, acosh);
 }
 
 #include "math_data/acoshf_intel_data.h"
-TEST(MATH_TEST, acoshf_intel) {
+TEST(math_h, acoshf_intel) {
   DoMathDataTest<2>(g_acoshf_intel_data, acoshf);
 }
 
 #include "math_data/asin_intel_data.h"
-TEST(MATH_TEST, asin_intel) {
+TEST(math_h, asin_intel) {
   DoMathDataTest<1>(g_asin_intel_data, asin);
 }
 
 #include "math_data/asinf_intel_data.h"
-TEST(MATH_TEST, asinf_intel) {
+TEST(math_h, asinf_intel) {
   DoMathDataTest<1>(g_asinf_intel_data, asinf);
 }
 
 #include "math_data/asinh_intel_data.h"
-TEST(MATH_TEST, asinh_intel) {
+TEST(math_h, asinh_intel) {
   DoMathDataTest<2>(g_asinh_intel_data, asinh);
 }
 
 #include "math_data/asinhf_intel_data.h"
-TEST(MATH_TEST, asinhf_intel) {
+TEST(math_h, asinhf_intel) {
   DoMathDataTest<2>(g_asinhf_intel_data, asinhf);
 }
 
 #include "math_data/atan2_intel_data.h"
-TEST(MATH_TEST, atan2_intel) {
+TEST(math_h, atan2_intel) {
   DoMathDataTest<2>(g_atan2_intel_data, atan2);
 }
 
 #include "math_data/atan2f_intel_data.h"
-TEST(MATH_TEST, atan2f_intel) {
+TEST(math_h, atan2f_intel) {
   DoMathDataTest<2>(g_atan2f_intel_data, atan2f);
 }
 
 #include "math_data/atan_intel_data.h"
-TEST(MATH_TEST, atan_intel) {
+TEST(math_h, atan_intel) {
   DoMathDataTest<1>(g_atan_intel_data, atan);
 }
 
 #include "math_data/atanf_intel_data.h"
-TEST(MATH_TEST, atanf_intel) {
+TEST(math_h, atanf_intel) {
   DoMathDataTest<1>(g_atanf_intel_data, atanf);
 }
 
 #include "math_data/atanh_intel_data.h"
-TEST(MATH_TEST, atanh_intel) {
+TEST(math_h, atanh_intel) {
   DoMathDataTest<2>(g_atanh_intel_data, atanh);
 }
 
 #include "math_data/atanhf_intel_data.h"
-TEST(MATH_TEST, atanhf_intel) {
+TEST(math_h, atanhf_intel) {
   DoMathDataTest<2>(g_atanhf_intel_data, atanhf);
 }
 
 #include "math_data/cbrt_intel_data.h"
-TEST(MATH_TEST, cbrt_intel) {
+TEST(math_h, cbrt_intel) {
   DoMathDataTest<1>(g_cbrt_intel_data, cbrt);
 }
 
 #include "math_data/cbrtf_intel_data.h"
-TEST(MATH_TEST, cbrtf_intel) {
+TEST(math_h, cbrtf_intel) {
   DoMathDataTest<1>(g_cbrtf_intel_data, cbrtf);
 }
 
 #include "math_data/ceil_intel_data.h"
-TEST(MATH_TEST, ceil_intel) {
+TEST(math_h, ceil_intel) {
   DoMathDataTest<1>(g_ceil_intel_data, ceil);
 }
 
 #include "math_data/ceilf_intel_data.h"
-TEST(MATH_TEST, ceilf_intel) {
+TEST(math_h, ceilf_intel) {
   DoMathDataTest<1>(g_ceilf_intel_data, ceilf);
 }
 
 #include "math_data/copysign_intel_data.h"
-TEST(MATH_TEST, copysign_intel) {
+TEST(math_h, copysign_intel) {
   DoMathDataTest<1>(g_copysign_intel_data, copysign);
 }
 
 #include "math_data/copysignf_intel_data.h"
-TEST(MATH_TEST, copysignf_intel) {
+TEST(math_h, copysignf_intel) {
   DoMathDataTest<1>(g_copysignf_intel_data, copysignf);
 }
 
 #include "math_data/cos_intel_data.h"
-TEST(MATH_TEST, cos_intel) {
+TEST(math_h, cos_intel) {
   DoMathDataTest<1>(g_cos_intel_data, cos);
 }
 
 #include "math_data/cosf_intel_data.h"
-TEST(MATH_TEST, cosf_intel) {
+TEST(math_h, cosf_intel) {
   DoMathDataTest<1>(g_cosf_intel_data, cosf);
 }
 
 #include "math_data/cosh_intel_data.h"
-TEST(MATH_TEST, cosh_intel) {
+TEST(math_h, cosh_intel) {
   DoMathDataTest<2>(g_cosh_intel_data, cosh);
 }
 
 #include "math_data/coshf_intel_data.h"
-TEST(MATH_TEST, coshf_intel) {
+TEST(math_h, coshf_intel) {
   DoMathDataTest<2>(g_coshf_intel_data, coshf);
 }
 
 #include "math_data/exp_intel_data.h"
-TEST(MATH_TEST, exp_intel) {
+TEST(math_h, exp_intel) {
   DoMathDataTest<1>(g_exp_intel_data, exp);
 }
 
 #include "math_data/expf_intel_data.h"
-TEST(MATH_TEST, expf_intel) {
+TEST(math_h, expf_intel) {
   DoMathDataTest<1>(g_expf_intel_data, expf);
 }
 
 #include "math_data/exp2_intel_data.h"
-TEST(MATH_TEST, exp2_intel) {
+TEST(math_h, exp2_intel) {
   DoMathDataTest<1>(g_exp2_intel_data, exp2);
 }
 
 #include "math_data/exp2f_intel_data.h"
-TEST(MATH_TEST, exp2f_intel) {
+TEST(math_h, exp2f_intel) {
   DoMathDataTest<1>(g_exp2f_intel_data, exp2f);
 }
 
 #include "math_data/expm1_intel_data.h"
-TEST(MATH_TEST, expm1_intel) {
+TEST(math_h, expm1_intel) {
   DoMathDataTest<1>(g_expm1_intel_data, expm1);
 }
 
 #include "math_data/expm1f_intel_data.h"
-TEST(MATH_TEST, expm1f_intel) {
+TEST(math_h, expm1f_intel) {
   DoMathDataTest<1>(g_expm1f_intel_data, expm1f);
 }
 
 #include "math_data/fabs_intel_data.h"
-TEST(MATH_TEST, fabs_intel) {
+TEST(math_h, fabs_intel) {
   DoMathDataTest<1>(g_fabs_intel_data, fabs);
 }
 
 #include "math_data/fabsf_intel_data.h"
-TEST(MATH_TEST, fabsf_intel) {
+TEST(math_h, fabsf_intel) {
   DoMathDataTest<1>(g_fabsf_intel_data, fabsf);
 }
 
 #include "math_data/fdim_intel_data.h"
-TEST(MATH_TEST, fdim_intel) {
+TEST(math_h, fdim_intel) {
   DoMathDataTest<1>(g_fdim_intel_data, fdim);
 }
 
 #include "math_data/fdimf_intel_data.h"
-TEST(MATH_TEST, fdimf_intel) {
+TEST(math_h, fdimf_intel) {
   DoMathDataTest<1>(g_fdimf_intel_data, fdimf);
 }
 
 #include "math_data/floor_intel_data.h"
-TEST(MATH_TEST, floor_intel) {
+TEST(math_h, floor_intel) {
   DoMathDataTest<1>(g_floor_intel_data, floor);
 }
 
 #include "math_data/floorf_intel_data.h"
-TEST(MATH_TEST, floorf_intel) {
+TEST(math_h, floorf_intel) {
   DoMathDataTest<1>(g_floorf_intel_data, floorf);
 }
 
 #include "math_data/fma_intel_data.h"
-TEST(MATH_TEST, fma_intel) {
+TEST(math_h, fma_intel) {
   DoMathDataTest<1>(g_fma_intel_data, fma);
 }
 
 #include "math_data/fmaf_intel_data.h"
-TEST(MATH_TEST, fmaf_intel) {
+TEST(math_h, fmaf_intel) {
   DoMathDataTest<1>(g_fmaf_intel_data, fmaf);
 }
 
 #include "math_data/fmax_intel_data.h"
-TEST(MATH_TEST, fmax_intel) {
+TEST(math_h, fmax_intel) {
   DoMathDataTest<1>(g_fmax_intel_data, fmax);
 }
 
 #include "math_data/fmaxf_intel_data.h"
-TEST(MATH_TEST, fmaxf_intel) {
+TEST(math_h, fmaxf_intel) {
   DoMathDataTest<1>(g_fmaxf_intel_data, fmaxf);
 }
 
 #include "math_data/fmin_intel_data.h"
-TEST(MATH_TEST, fmin_intel) {
+TEST(math_h, fmin_intel) {
   DoMathDataTest<1>(g_fmin_intel_data, fmin);
 }
 
 #include "math_data/fminf_intel_data.h"
-TEST(MATH_TEST, fminf_intel) {
+TEST(math_h, fminf_intel) {
   DoMathDataTest<1>(g_fminf_intel_data, fminf);
 }
 
 #include "math_data/fmod_intel_data.h"
-TEST(MATH_TEST, fmod_intel) {
+TEST(math_h, fmod_intel) {
   DoMathDataTest<1>(g_fmod_intel_data, fmod);
 }
 
 #include "math_data/fmodf_intel_data.h"
-TEST(MATH_TEST, fmodf_intel) {
+TEST(math_h, fmodf_intel) {
   DoMathDataTest<1>(g_fmodf_intel_data, fmodf);
 }
 
 #include "math_data/frexp_intel_data.h"
-TEST(MATH_TEST, frexp_intel) {
+TEST(math_h, frexp_intel) {
   DoMathDataTest<1>(g_frexp_intel_data, frexp);
 }
 
 #include "math_data/frexpf_intel_data.h"
-TEST(MATH_TEST, frexpf_intel) {
+TEST(math_h, frexpf_intel) {
   DoMathDataTest<1>(g_frexpf_intel_data, frexpf);
 }
 
 #include "math_data/hypot_intel_data.h"
-TEST(MATH_TEST, hypot_intel) {
+TEST(math_h, hypot_intel) {
   DoMathDataTest<1>(g_hypot_intel_data, hypot);
 }
 
 #include "math_data/hypotf_intel_data.h"
-TEST(MATH_TEST, hypotf_intel) {
+TEST(math_h, hypotf_intel) {
   DoMathDataTest<1>(g_hypotf_intel_data, hypotf);
 }
 
 #include "math_data/ilogb_intel_data.h"
-TEST(MATH_TEST, ilogb_intel) {
+TEST(math_h, ilogb_intel) {
   DoMathDataTest<1>(g_ilogb_intel_data, ilogb);
 }
 
 #include "math_data/ilogbf_intel_data.h"
-TEST(MATH_TEST, ilogbf_intel) {
+TEST(math_h, ilogbf_intel) {
   DoMathDataTest<1>(g_ilogbf_intel_data, ilogbf);
 }
 
 #include "math_data/ldexp_intel_data.h"
-TEST(MATH_TEST, ldexp_intel) {
+TEST(math_h, ldexp_intel) {
   DoMathDataTest<1>(g_ldexp_intel_data, ldexp);
 }
 
 #include "math_data/ldexpf_intel_data.h"
-TEST(MATH_TEST, ldexpf_intel) {
+TEST(math_h, ldexpf_intel) {
   DoMathDataTest<1>(g_ldexpf_intel_data, ldexpf);
 }
 
 #include "math_data/llrint_intel_data.h"
-TEST(MATH_TEST, llrint_intel) {
+TEST(math_h, llrint_intel) {
   DoMathDataTest<1>(g_llrint_intel_data, llrint);
 }
 
 #include "math_data/llrintf_intel_data.h"
-TEST(MATH_TEST, llrintf_intel) {
+TEST(math_h, llrintf_intel) {
   DoMathDataTest<1>(g_llrintf_intel_data, llrintf);
 }
 
 #include "math_data/log_intel_data.h"
-TEST(MATH_TEST, log_intel) {
+TEST(math_h, log_intel) {
   DoMathDataTest<1>(g_log_intel_data, log);
 }
 
 #include "math_data/logf_intel_data.h"
-TEST(MATH_TEST, logf_intel) {
+TEST(math_h, logf_intel) {
   DoMathDataTest<1>(g_logf_intel_data, logf);
 }
 
 #include "math_data/log10_intel_data.h"
-TEST(MATH_TEST, log10_intel) {
+TEST(math_h, log10_intel) {
   DoMathDataTest<1>(g_log10_intel_data, log10);
 }
 
 #include "math_data/log10f_intel_data.h"
-TEST(MATH_TEST, log10f_intel) {
+TEST(math_h, log10f_intel) {
   DoMathDataTest<1>(g_log10f_intel_data, log10f);
 }
 
 #include "math_data/log1p_intel_data.h"
-TEST(MATH_TEST, log1p_intel) {
+TEST(math_h, log1p_intel) {
   DoMathDataTest<1>(g_log1p_intel_data, log1p);
 }
 
 #include "math_data/log1pf_intel_data.h"
-TEST(MATH_TEST, log1pf_intel) {
+TEST(math_h, log1pf_intel) {
   DoMathDataTest<1>(g_log1pf_intel_data, log1pf);
 }
 
 #include "math_data/log2_intel_data.h"
-TEST(MATH_TEST, log2_intel) {
+TEST(math_h, log2_intel) {
   DoMathDataTest<1>(g_log2_intel_data, log2);
 }
 
 #include "math_data/log2f_intel_data.h"
-TEST(MATH_TEST, log2f_intel) {
+TEST(math_h, log2f_intel) {
   DoMathDataTest<1>(g_log2f_intel_data, log2f);
 }
 
 #include "math_data/logb_intel_data.h"
-TEST(MATH_TEST, logb_intel) {
+TEST(math_h, logb_intel) {
   DoMathDataTest<1>(g_logb_intel_data, logb);
 }
 
 #include "math_data/logbf_intel_data.h"
-TEST(MATH_TEST, logbf_intel) {
+TEST(math_h, logbf_intel) {
   DoMathDataTest<1>(g_logbf_intel_data, logbf);
 }
 
 #include "math_data/lrint_intel_data.h"
-TEST(MATH_TEST, lrint_intel) {
+TEST(math_h, lrint_intel) {
   DoMathDataTest<1>(g_lrint_intel_data, lrint);
 }
 
 #include "math_data/lrintf_intel_data.h"
-TEST(MATH_TEST, lrintf_intel) {
+TEST(math_h, lrintf_intel) {
   DoMathDataTest<1>(g_lrintf_intel_data, lrintf);
 }
 
 #include "math_data/modf_intel_data.h"
-TEST(MATH_TEST, modf_intel) {
+TEST(math_h, modf_intel) {
   DoMathDataTest<1>(g_modf_intel_data, modf);
 }
 
 #include "math_data/modff_intel_data.h"
-TEST(MATH_TEST, modff_intel) {
+TEST(math_h, modff_intel) {
   DoMathDataTest<1>(g_modff_intel_data, modff);
 }
 
 #include "math_data/nearbyint_intel_data.h"
-TEST(MATH_TEST, nearbyint_intel) {
+TEST(math_h, nearbyint_intel) {
   DoMathDataTest<1>(g_nearbyint_intel_data, nearbyint);
 }
 
 #include "math_data/nearbyintf_intel_data.h"
-TEST(MATH_TEST, nearbyintf_intel) {
+TEST(math_h, nearbyintf_intel) {
   DoMathDataTest<1>(g_nearbyintf_intel_data, nearbyintf);
 }
 
 #include "math_data/nextafter_intel_data.h"
-TEST(MATH_TEST, nextafter_intel) {
+TEST(math_h, nextafter_intel) {
   DoMathDataTest<1>(g_nextafter_intel_data, nextafter);
 }
 
 #include "math_data/nextafterf_intel_data.h"
-TEST(MATH_TEST, nextafterf_intel) {
+TEST(math_h, nextafterf_intel) {
   DoMathDataTest<1>(g_nextafterf_intel_data, nextafterf);
 }
 
 #include "math_data/pow_intel_data.h"
-TEST(MATH_TEST, pow_intel) {
+TEST(math_h, pow_intel) {
   DoMathDataTest<1>(g_pow_intel_data, pow);
 }
 
 #include "math_data/powf_intel_data.h"
-TEST(MATH_TEST, powf_intel) {
+TEST(math_h, powf_intel) {
   DoMathDataTest<1>(g_powf_intel_data, powf);
 }
 
 #include "math_data/remainder_intel_data.h"
-TEST(MATH_TEST, remainder_intel) {
+TEST(math_h, remainder_intel) {
   DoMathDataTest<1>(g_remainder_intel_data, remainder);
 }
 
 #include "math_data/remainderf_intel_data.h"
-TEST(MATH_TEST, remainderf_intel) {
+TEST(math_h, remainderf_intel) {
   DoMathDataTest<1>(g_remainderf_intel_data, remainderf);
 }
 
 #include "math_data/remquo_intel_data.h"
-TEST(MATH_TEST, remquo_intel) {
+TEST(math_h, remquo_intel) {
   DoMathDataTest<1>(g_remquo_intel_data, remquo);
 }
 
 #include "math_data/remquof_intel_data.h"
-TEST(MATH_TEST, remquof_intel) {
+TEST(math_h, remquof_intel) {
   DoMathDataTest<1>(g_remquof_intel_data, remquof);
 }
 
 #include "math_data/rint_intel_data.h"
-TEST(MATH_TEST, rint_intel) {
+TEST(math_h, rint_intel) {
   DoMathDataTest<1>(g_rint_intel_data, rint);
 }
 
 #include "math_data/rintf_intel_data.h"
-TEST(MATH_TEST, rintf_intel) {
+TEST(math_h, rintf_intel) {
   DoMathDataTest<1>(g_rintf_intel_data, rintf);
 }
 
 #include "math_data/round_intel_data.h"
-TEST(MATH_TEST, round_intel) {
+TEST(math_h, round_intel) {
   DoMathDataTest<1>(g_round_intel_data, round);
 }
 
 #include "math_data/roundf_intel_data.h"
-TEST(MATH_TEST, roundf_intel) {
+TEST(math_h, roundf_intel) {
   DoMathDataTest<1>(g_roundf_intel_data, roundf);
 }
 
 #include "math_data/scalb_intel_data.h"
-TEST(MATH_TEST, scalb_intel) {
+TEST(math_h, scalb_intel) {
   DoMathDataTest<1>(g_scalb_intel_data, scalb);
 }
 
 #include "math_data/scalbf_intel_data.h"
-TEST(MATH_TEST, scalbf_intel) {
+TEST(math_h, scalbf_intel) {
   DoMathDataTest<1>(g_scalbf_intel_data, scalbf);
 }
 
 #include "math_data/scalbn_intel_data.h"
-TEST(MATH_TEST, scalbn_intel) {
+TEST(math_h, scalbn_intel) {
   DoMathDataTest<1>(g_scalbn_intel_data, scalbn);
 }
 
 #include "math_data/scalbnf_intel_data.h"
-TEST(MATH_TEST, scalbnf_intel) {
+TEST(math_h, scalbnf_intel) {
   DoMathDataTest<1>(g_scalbnf_intel_data, scalbnf);
 }
 
 #include "math_data/significand_intel_data.h"
-TEST(MATH_TEST, significand_intel) {
+TEST(math_h, significand_intel) {
   DoMathDataTest<1>(g_significand_intel_data, significand);
 }
 
 #include "math_data/significandf_intel_data.h"
-TEST(MATH_TEST, significandf_intel) {
+TEST(math_h, significandf_intel) {
   DoMathDataTest<1>(g_significandf_intel_data, significandf);
 }
 
 #include "math_data/sin_intel_data.h"
-TEST(MATH_TEST, sin_intel) {
+TEST(math_h, sin_intel) {
   DoMathDataTest<1>(g_sin_intel_data, sin);
 }
 
 #include "math_data/sinf_intel_data.h"
-TEST(MATH_TEST, sinf_intel) {
+TEST(math_h, sinf_intel) {
   DoMathDataTest<1>(g_sinf_intel_data, sinf);
 }
 
 #include "math_data/sinh_intel_data.h"
-TEST(MATH_TEST, sinh_intel) {
+TEST(math_h, sinh_intel) {
   DoMathDataTest<2>(g_sinh_intel_data, sinh);
 }
 
 #include "math_data/sinhf_intel_data.h"
-TEST(MATH_TEST, sinhf_intel) {
+TEST(math_h, sinhf_intel) {
   DoMathDataTest<2>(g_sinhf_intel_data, sinhf);
 }
 
 #include "math_data/sincos_intel_data.h"
-TEST(MATH_TEST, sincos_intel) {
+TEST(math_h, sincos_intel) {
   DoMathDataTest<1>(g_sincos_intel_data, sincos);
 }
 
 #include "math_data/sincosf_intel_data.h"
-TEST(MATH_TEST, sincosf_intel) {
+TEST(math_h, sincosf_intel) {
   DoMathDataTest<1>(g_sincosf_intel_data, sincosf);
 }
 
 #include "math_data/sqrt_intel_data.h"
-TEST(MATH_TEST, sqrt_intel) {
+TEST(math_h, sqrt_intel) {
   DoMathDataTest<1>(g_sqrt_intel_data, sqrt);
 }
 
 #include "math_data/sqrtf_intel_data.h"
-TEST(MATH_TEST, sqrtf_intel) {
+TEST(math_h, sqrtf_intel) {
   DoMathDataTest<1>(g_sqrtf_intel_data, sqrtf);
 }
 
 #include "math_data/tan_intel_data.h"
-TEST(MATH_TEST, tan_intel) {
+TEST(math_h, tan_intel) {
   DoMathDataTest<1>(g_tan_intel_data, tan);
 }
 
 #include "math_data/tanf_intel_data.h"
-TEST(MATH_TEST, tanf_intel) {
+TEST(math_h, tanf_intel) {
   DoMathDataTest<1>(g_tanf_intel_data, tanf);
 }
 
 #include "math_data/tanh_intel_data.h"
-TEST(MATH_TEST, tanh_intel) {
+TEST(math_h, tanh_intel) {
   DoMathDataTest<2>(g_tanh_intel_data, tanh);
 }
 
 #include "math_data/tanhf_intel_data.h"
-TEST(MATH_TEST, tanhf_intel) {
+TEST(math_h, tanhf_intel) {
   DoMathDataTest<2>(g_tanhf_intel_data, tanhf);
 }
 
 #include "math_data/trunc_intel_data.h"
-TEST(MATH_TEST, trunc_intel) {
+TEST(math_h, trunc_intel) {
   DoMathDataTest<1>(g_trunc_intel_data, trunc);
 }
 
 #include "math_data/truncf_intel_data.h"
-TEST(MATH_TEST, truncf_intel) {
+TEST(math_h, truncf_intel) {
   DoMathDataTest<1>(g_truncf_intel_data, truncf);
 }
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 0e267c5..b3a296d 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -99,6 +99,27 @@
   ASSERT_EQ(nullptr, fgets(line, sizeof(line), fp)) << "junk at end of file: " << line;
 }
 
+#define EXPECT_SNPRINTF_N(expected, n, fmt, ...)                        \
+  {                                                                     \
+    char buf[BUFSIZ];                                                   \
+    int w = snprintf(buf, sizeof(buf), fmt __VA_OPT__(, ) __VA_ARGS__); \
+    EXPECT_EQ(n, w);                                                    \
+    EXPECT_STREQ(expected, buf);                                        \
+  }
+
+#define EXPECT_SNPRINTF(expected, fmt, ...) \
+  EXPECT_SNPRINTF_N(expected, static_cast<int>(strlen(expected)), fmt __VA_OPT__(, ) __VA_ARGS__)
+
+#define EXPECT_SWPRINTF_N(expected, n, fmt, ...)                        \
+  {                                                                     \
+    wchar_t buf[BUFSIZ];                                                \
+    int w = swprintf(buf, sizeof(buf), fmt __VA_OPT__(, ) __VA_ARGS__); \
+    EXPECT_EQ(n, w);                                                    \
+    EXPECT_EQ(std::wstring(expected), std::wstring(buf, w));            \
+  }
+#define EXPECT_SWPRINTF(expected, fmt, ...) \
+  EXPECT_SWPRINTF_N(expected, static_cast<int>(wcslen(expected)), fmt __VA_OPT__(, ) __VA_ARGS__)
+
 TEST(STDIO_TEST, flockfile_18208568_stderr) {
   // Check that we have a _recursive_ mutex for flockfile.
   flockfile(stderr);
@@ -309,21 +330,23 @@
   // error: format '%zd' expects argument of type 'signed size_t',
   //     but argument 4 has type 'ssize_t {aka long int}' [-Werror=format]
   ssize_t v = 1;
-  char buf[32];
-  snprintf(buf, sizeof(buf), "%zd", v);
+  EXPECT_SNPRINTF("1", "%zd", v);
+  EXPECT_SWPRINTF(L"1", L"%zd", v);
 }
 
 // https://code.google.com/p/android/issues/detail?id=64886
 TEST(STDIO_TEST, snprintf_a) {
-  char buf[BUFSIZ];
-  EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235));
-  EXPECT_STREQ("<0x1.3831e147ae148p+13>", buf);
+  EXPECT_SNPRINTF("<0x1.3831e147ae148p+13>", "<%a>", 9990.235);
+}
+
+// https://code.google.com/p/android/issues/detail?id=64886
+TEST(STDIO_TEST, swprintf_a) {
+  EXPECT_SWPRINTF(L"<0x1.3831e147ae148p+13>", L"<%a>", 9990.235);
 }
 
 // http://b/152588929
 TEST(STDIO_TEST, snprintf_La) {
 #if defined(__LP64__)
-  char buf[BUFSIZ];
   union {
     uint64_t a[2];
     long double v;
@@ -331,59 +354,98 @@
 
   u.a[0] = UINT64_C(0x9b9b9b9b9b9b9b9b);
   u.a[1] = UINT64_C(0xdfdfdfdfdfdfdfdf);
-  EXPECT_EQ(41, snprintf(buf, sizeof(buf), "<%La>", u.v));
-  EXPECT_STREQ("<-0x1.dfdfdfdfdfdf9b9b9b9b9b9b9b9bp+8160>", buf);
+  EXPECT_SNPRINTF("<-0x1.dfdfdfdfdfdf9b9b9b9b9b9b9b9bp+8160>", "<%La>", u.v);
 
   u.a[0] = UINT64_C(0xffffffffffffffff);
   u.a[1] = UINT64_C(0x7ffeffffffffffff);
-  EXPECT_EQ(41, snprintf(buf, sizeof(buf), "<%La>", u.v));
-  EXPECT_STREQ("<0x1.ffffffffffffffffffffffffffffp+16383>", buf);
+  EXPECT_SNPRINTF("<0x1.ffffffffffffffffffffffffffffp+16383>", "<%La>", u.v);
 
   u.a[0] = UINT64_C(0x0000000000000000);
   u.a[1] = UINT64_C(0x0000000000000000);
-  EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%La>", u.v));
-  EXPECT_STREQ("<0x0p+0>", buf);
+  EXPECT_SNPRINTF("<0x0p+0>", "<%La>", u.v);
+#else
+  GTEST_SKIP() << "no ld128";
+#endif
+}
+
+// http://b/152588929
+TEST(STDIO_TEST, swprintf_La) {
+#if defined(__LP64__)
+  union {
+    uint64_t a[2];
+    long double v;
+  } u;
+
+  u.a[0] = UINT64_C(0x9b9b9b9b9b9b9b9b);
+  u.a[1] = UINT64_C(0xdfdfdfdfdfdfdfdf);
+  EXPECT_SWPRINTF(L"<-0x1.dfdfdfdfdfdf9b9b9b9b9b9b9b9bp+8160>", L"<%La>", u.v);
+
+  u.a[0] = UINT64_C(0xffffffffffffffff);
+  u.a[1] = UINT64_C(0x7ffeffffffffffff);
+  EXPECT_SWPRINTF(L"<0x1.ffffffffffffffffffffffffffffp+16383>", L"<%La>", u.v);
+
+  u.a[0] = UINT64_C(0x0000000000000000);
+  u.a[1] = UINT64_C(0x0000000000000000);
+  EXPECT_SWPRINTF(L"<0x0p+0>", L"<%La>", u.v);
 #else
   GTEST_SKIP() << "no ld128";
 #endif
 }
 
 TEST(STDIO_TEST, snprintf_lc) {
-  char buf[BUFSIZ];
   wint_t wc = L'a';
-  EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc));
-  EXPECT_STREQ("<a>", buf);
+  EXPECT_SNPRINTF("<a>", "<%lc>", wc);
 }
 
-TEST(STDIO_TEST, snprintf_C) { // Synonym for %lc.
-  char buf[BUFSIZ];
+TEST(STDIO_TEST, swprintf_lc) {
+  wint_t wc = L'a';
+  EXPECT_SWPRINTF(L"<a>", L"<%lc>", wc);
+}
+
+TEST(STDIO_TEST, snprintf_C) {  // Synonym for %lc.
   wchar_t wc = L'a';
-  EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%C>", wc));
-  EXPECT_STREQ("<a>", buf);
+  EXPECT_SNPRINTF("<a>", "<%C>", wc);
+}
+
+TEST(STDIO_TEST, swprintf_C) {  // Synonym for %lc.
+  wchar_t wc = L'a';
+  EXPECT_SWPRINTF(L"<a>", L"<%C>", wc);
+}
+
+TEST(STDIO_TEST, snprintf_ls_null) {
+  EXPECT_SNPRINTF("<(null)>", "<%ls>", static_cast<wchar_t*>(nullptr));
+}
+
+TEST(STDIO_TEST, swprintf_ls_null) {
+  EXPECT_SWPRINTF(L"<(null)>", L"<%ls>", static_cast<wchar_t*>(nullptr));
 }
 
 TEST(STDIO_TEST, snprintf_ls) {
-  char buf[BUFSIZ];
-  wchar_t* ws = nullptr;
-  EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%ls>", ws));
-  EXPECT_STREQ("<(null)>", buf);
+  static const wchar_t chars[] = L"Hello\u0666 World";
+  EXPECT_SNPRINTF("<Hello\xd9\xa6 World>", "<%ls>", chars);
+}
 
-  wchar_t chars[] = { L'h', L'i', 0 };
-  ws = chars;
-  EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%ls>", ws));
-  EXPECT_STREQ("<hi>", buf);
+TEST(STDIO_TEST, swprintf_ls) {
+  static const wchar_t chars[] = L"Hello\u0666 World";
+  EXPECT_SWPRINTF(L"<Hello\u0666 World>", L"<%ls>", chars);
+}
+
+TEST(STDIO_TEST, snprintf_S_nullptr) {  // Synonym for %ls.
+  EXPECT_SNPRINTF("<(null)>", "<%S>", static_cast<wchar_t*>(nullptr));
+}
+
+TEST(STDIO_TEST, swprintf_S_nullptr) {  // Synonym for %ls.
+  EXPECT_SWPRINTF(L"<(null)>", L"<%S>", static_cast<wchar_t*>(nullptr));
 }
 
 TEST(STDIO_TEST, snprintf_S) { // Synonym for %ls.
-  char buf[BUFSIZ];
-  wchar_t* ws = nullptr;
-  EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%S>", ws));
-  EXPECT_STREQ("<(null)>", buf);
+  static const wchar_t chars[] = L"Hello\u0666 World";
+  EXPECT_SNPRINTF("<Hello\xd9\xa6 World>", "<%S>", chars);
+}
 
-  wchar_t chars[] = { L'h', L'i', 0 };
-  ws = chars;
-  EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%S>", ws));
-  EXPECT_STREQ("<hi>", buf);
+TEST(STDIO_TEST, swprintf_S) {  // Synonym for %ls.
+  static const wchar_t chars[] = L"Hello\u0666 World";
+  EXPECT_SWPRINTF(L"<Hello\u0666 World>", L"<%S>", chars);
 }
 
 TEST_F(STDIO_DEATHTEST, snprintf_n) {
@@ -400,106 +462,111 @@
 #endif
 }
 
+TEST_F(STDIO_DEATHTEST, swprintf_n) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+  // http://b/14492135 and http://b/31832608.
+  wchar_t buf[32];
+  int i = 1234;
+  EXPECT_DEATH(swprintf(buf, sizeof(buf), L"a %n b", &i), "%n not allowed on Android");
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "glibc does allow %n";
+#endif
+}
+
 TEST(STDIO_TEST, snprintf_measure) {
-  char buf[16];
+  char buf[1] = {'x'};
   ASSERT_EQ(11, snprintf(buf, 0, "Hello %s", "world"));
+  ASSERT_EQ('x', buf[0]);
+}
+
+// Unlike snprintf(), you *can't* use swprintf() to measure.
+TEST(STDIO_TEST, swprintf_measure) {
+  wchar_t buf[1] = {L'x'};
+  ASSERT_EQ(-1, swprintf(buf, 0, L"Hello %S", L"world"));
+  ASSERT_EQ(L'x', buf[0]);
 }
 
 TEST(STDIO_TEST, snprintf_smoke) {
-  char buf[BUFSIZ];
+  EXPECT_SNPRINTF("a", "a");
+  EXPECT_SNPRINTF("%", "%%");
+  EXPECT_SNPRINTF("01234", "01234");
+  EXPECT_SNPRINTF("a01234b", "a%sb", "01234");
 
-  snprintf(buf, sizeof(buf), "a");
-  EXPECT_STREQ("a", buf);
+  EXPECT_SNPRINTF("a(null)b", "a%sb", static_cast<char*>(nullptr));
+  EXPECT_SNPRINTF("aabbcc", "aa%scc", "bb");
+  EXPECT_SNPRINTF("abc", "a%cc", 'b');
+  EXPECT_SNPRINTF("a1234b", "a%db", 1234);
+  EXPECT_SNPRINTF("a-8123b", "a%db", -8123);
+  EXPECT_SNPRINTF("a16b", "a%hdb", static_cast<short>(0x7fff0010));
+  EXPECT_SNPRINTF("a16b", "a%hhdb", static_cast<char>(0x7fffff10));
+  EXPECT_SNPRINTF("a68719476736b", "a%lldb", 0x1000000000LL);
+  EXPECT_SNPRINTF("a70000b", "a%ldb", 70000L);
+  EXPECT_SNPRINTF("a0xb0001234b", "a%pb", reinterpret_cast<void*>(0xb0001234));
+  EXPECT_SNPRINTF("a12abz", "a%xz", 0x12ab);
+  EXPECT_SNPRINTF("a12ABz", "a%Xz", 0x12ab);
+  EXPECT_SNPRINTF("a00123456z", "a%08xz", 0x123456);
+  EXPECT_SNPRINTF("a 1234z", "a%5dz", 1234);
+  EXPECT_SNPRINTF("a01234z", "a%05dz", 1234);
+  EXPECT_SNPRINTF("a    1234z", "a%8dz", 1234);
+  EXPECT_SNPRINTF("a1234    z", "a%-8dz", 1234);
+  EXPECT_SNPRINTF("Aabcdef     Z", "A%-11sZ", "abcdef");
+  EXPECT_SNPRINTF("Ahello:1234Z", "A%s:%dZ", "hello", 1234);
+  EXPECT_SNPRINTF("a005:5:05z", "a%03d:%d:%02dz", 5, 5, 5);
 
-  snprintf(buf, sizeof(buf), "%%");
-  EXPECT_STREQ("%", buf);
-
-  snprintf(buf, sizeof(buf), "01234");
-  EXPECT_STREQ("01234", buf);
-
-  snprintf(buf, sizeof(buf), "a%sb", "01234");
-  EXPECT_STREQ("a01234b", buf);
-
-  char* s = nullptr;
-  snprintf(buf, sizeof(buf), "a%sb", s);
-  EXPECT_STREQ("a(null)b", buf);
-
-  snprintf(buf, sizeof(buf), "aa%scc", "bb");
-  EXPECT_STREQ("aabbcc", buf);
-
-  snprintf(buf, sizeof(buf), "a%cc", 'b');
-  EXPECT_STREQ("abc", buf);
-
-  snprintf(buf, sizeof(buf), "a%db", 1234);
-  EXPECT_STREQ("a1234b", buf);
-
-  snprintf(buf, sizeof(buf), "a%db", -8123);
-  EXPECT_STREQ("a-8123b", buf);
-
-  snprintf(buf, sizeof(buf), "a%hdb", static_cast<short>(0x7fff0010));
-  EXPECT_STREQ("a16b", buf);
-
-  snprintf(buf, sizeof(buf), "a%hhdb", static_cast<char>(0x7fffff10));
-  EXPECT_STREQ("a16b", buf);
-
-  snprintf(buf, sizeof(buf), "a%lldb", 0x1000000000LL);
-  EXPECT_STREQ("a68719476736b", buf);
-
-  snprintf(buf, sizeof(buf), "a%ldb", 70000L);
-  EXPECT_STREQ("a70000b", buf);
-
-  snprintf(buf, sizeof(buf), "a%pb", reinterpret_cast<void*>(0xb0001234));
-  EXPECT_STREQ("a0xb0001234b", buf);
-
-  snprintf(buf, sizeof(buf), "a%xz", 0x12ab);
-  EXPECT_STREQ("a12abz", buf);
-
-  snprintf(buf, sizeof(buf), "a%Xz", 0x12ab);
-  EXPECT_STREQ("a12ABz", buf);
-
-  snprintf(buf, sizeof(buf), "a%08xz", 0x123456);
-  EXPECT_STREQ("a00123456z", buf);
-
-  snprintf(buf, sizeof(buf), "a%5dz", 1234);
-  EXPECT_STREQ("a 1234z", buf);
-
-  snprintf(buf, sizeof(buf), "a%05dz", 1234);
-  EXPECT_STREQ("a01234z", buf);
-
-  snprintf(buf, sizeof(buf), "a%8dz", 1234);
-  EXPECT_STREQ("a    1234z", buf);
-
-  snprintf(buf, sizeof(buf), "a%-8dz", 1234);
-  EXPECT_STREQ("a1234    z", buf);
-
-  snprintf(buf, sizeof(buf), "A%-11sZ", "abcdef");
-  EXPECT_STREQ("Aabcdef     Z", buf);
-
-  snprintf(buf, sizeof(buf), "A%s:%dZ", "hello", 1234);
-  EXPECT_STREQ("Ahello:1234Z", buf);
-
-  snprintf(buf, sizeof(buf), "a%03d:%d:%02dz", 5, 5, 5);
-  EXPECT_STREQ("a005:5:05z", buf);
-
-  void* p = nullptr;
-  snprintf(buf, sizeof(buf), "a%d,%pz", 5, p);
 #if defined(__BIONIC__)
-  EXPECT_STREQ("a5,0x0z", buf);
+  EXPECT_SNPRINTF("a5,0x0z", "a%d,%pz", 5, static_cast<void*>(nullptr));
 #else // __BIONIC__
-  EXPECT_STREQ("a5,(nil)z", buf);
+  EXPECT_SNPRINTF("a5,(nil)z", "a%d,%pz", 5, static_cast<void*>(nullptr));
 #endif // __BIONIC__
 
-  snprintf(buf, sizeof(buf), "a%lld,%d,%d,%dz", 0x1000000000LL, 6, 7, 8);
-  EXPECT_STREQ("a68719476736,6,7,8z", buf);
+  EXPECT_SNPRINTF("a68719476736,6,7,8z", "a%lld,%d,%d,%dz", 0x1000000000LL, 6, 7, 8);
 
-  snprintf(buf, sizeof(buf), "a_%f_b", 1.23f);
-  EXPECT_STREQ("a_1.230000_b", buf);
+  EXPECT_SNPRINTF("a_1.230000_b", "a_%f_b", 1.23f);
+  EXPECT_SNPRINTF("a_3.14_b", "a_%g_b", 3.14);
+  EXPECT_SNPRINTF("print_me_twice print_me_twice", "%1$s %1$s", "print_me_twice");
+}
 
-  snprintf(buf, sizeof(buf), "a_%g_b", 3.14);
-  EXPECT_STREQ("a_3.14_b", buf);
+TEST(STDIO_TEST, swprintf_smoke) {
+  EXPECT_SWPRINTF(L"a", L"a");
+  EXPECT_SWPRINTF(L"%", L"%%");
+  EXPECT_SWPRINTF(L"01234", L"01234");
+  EXPECT_SWPRINTF(L"a01234b", L"a%sb", "01234");
 
-  snprintf(buf, sizeof(buf), "%1$s %1$s", "print_me_twice");
-  EXPECT_STREQ("print_me_twice print_me_twice", buf);
+  EXPECT_SWPRINTF(L"a(null)b", L"a%sb", static_cast<char*>(nullptr));
+  EXPECT_SWPRINTF(L"aabbcc", L"aa%scc", "bb");
+  EXPECT_SWPRINTF(L"abc", L"a%cc", 'b');
+  EXPECT_SWPRINTF(L"a1234b", L"a%db", 1234);
+  EXPECT_SWPRINTF(L"a-8123b", L"a%db", -8123);
+  EXPECT_SWPRINTF(L"a16b", L"a%hdb", static_cast<short>(0x7fff0010));
+  EXPECT_SWPRINTF(L"a16b", L"a%hhdb", static_cast<char>(0x7fffff10));
+  EXPECT_SWPRINTF(L"a68719476736b", L"a%lldb", 0x1000000000LL);
+  EXPECT_SWPRINTF(L"a70000b", L"a%ldb", 70000L);
+  EXPECT_SWPRINTF(L"a0xb0001234b", L"a%pb", reinterpret_cast<void*>(0xb0001234));
+  EXPECT_SWPRINTF(L"a12abz", L"a%xz", 0x12ab);
+  EXPECT_SWPRINTF(L"a12ABz", L"a%Xz", 0x12ab);
+  EXPECT_SWPRINTF(L"a00123456z", L"a%08xz", 0x123456);
+  EXPECT_SWPRINTF(L"a 1234z", L"a%5dz", 1234);
+  EXPECT_SWPRINTF(L"a01234z", L"a%05dz", 1234);
+  EXPECT_SWPRINTF(L"a    1234z", L"a%8dz", 1234);
+  EXPECT_SWPRINTF(L"a1234    z", L"a%-8dz", 1234);
+  EXPECT_SWPRINTF(L"Aabcdef     Z", L"A%-11sZ", "abcdef");
+  EXPECT_SWPRINTF(L"Ahello:1234Z", L"A%s:%dZ", "hello", 1234);
+  EXPECT_SWPRINTF(L"a005:5:05z", L"a%03d:%d:%02dz", 5, 5, 5);
+
+#if defined(__BIONIC__)
+  EXPECT_SWPRINTF(L"a5,0x0z", L"a%d,%pz", 5, static_cast<void*>(nullptr));
+#else   // __BIONIC__
+  EXPECT_SWPRINTF(L"a5,(nil)z", L"a%d,%pz", 5, static_cast<void*>(nullptr));
+#endif  // __BIONIC__
+
+  EXPECT_SWPRINTF(L"a68719476736,6,7,8z", L"a%lld,%d,%d,%dz", 0x1000000000LL, 6, 7, 8);
+
+  EXPECT_SWPRINTF(L"a_1.230000_b", L"a_%f_b", 1.23f);
+  EXPECT_SWPRINTF(L"a_3.14_b", L"a_%g_b", 3.14);
+  EXPECT_SWPRINTF(L"print_me_twice print_me_twice", L"%1$s %1$s", "print_me_twice");
 }
 
 template <typename T>
@@ -634,227 +701,164 @@
               L"[-NAN]", L"[NAN]", L"[+NAN]");
 }
 
-TEST(STDIO_TEST, swprintf) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  ASSERT_EQ(2, swprintf(buf, nchars, L"ab")) << strerror(errno);
-  ASSERT_EQ(std::wstring(L"ab"), buf);
-  ASSERT_EQ(5, swprintf(buf, nchars, L"%s", "abcde"));
-  ASSERT_EQ(std::wstring(L"abcde"), buf);
-
-  // Unlike swprintf(), swprintf() returns -1 in case of truncation
-  // and doesn't necessarily zero-terminate the output!
-  ASSERT_EQ(-1, swprintf(buf, 4, L"%s", "abcde"));
-
-  const char kString[] = "Hello, World";
-  ASSERT_EQ(12, swprintf(buf, nchars, L"%s", kString));
-  ASSERT_EQ(std::wstring(L"Hello, World"), buf);
-  ASSERT_EQ(12, swprintf(buf, 13, L"%s", kString));
-  ASSERT_EQ(std::wstring(L"Hello, World"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_a) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  ASSERT_EQ(20, swprintf(buf, nchars, L"%a", 3.1415926535));
-  ASSERT_EQ(std::wstring(L"0x1.921fb54411744p+1"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_lc) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  wint_t wc = L'a';
-  EXPECT_EQ(3, swprintf(buf, nchars, L"<%lc>", wc));
-  EXPECT_EQ(std::wstring(L"<a>"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_C) { // Synonym for %lc.
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  wint_t wc = L'a';
-  EXPECT_EQ(3, swprintf(buf, nchars, L"<%C>", wc));
-  EXPECT_EQ(std::wstring(L"<a>"), buf);
+TEST(STDIO_TEST, snprintf_jd_INTMAX_MAX) {
+  EXPECT_SNPRINTF("9223372036854775807", "%jd", INTMAX_MAX);
 }
 
 TEST(STDIO_TEST, swprintf_jd_INTMAX_MAX) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  swprintf(buf, nchars, L"%jd", INTMAX_MAX);
-  EXPECT_EQ(std::wstring(L"9223372036854775807"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_jd_INTMAX_MIN) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  swprintf(buf, nchars, L"%jd", INTMAX_MIN);
-  EXPECT_EQ(std::wstring(L"-9223372036854775808"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_ju_UINTMAX_MAX) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  swprintf(buf, nchars, L"%ju", UINTMAX_MAX);
-  EXPECT_EQ(std::wstring(L"18446744073709551615"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_1$ju_UINTMAX_MAX) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  swprintf(buf, nchars, L"%1$ju", UINTMAX_MAX);
-  EXPECT_EQ(std::wstring(L"18446744073709551615"), buf);
-}
-
-TEST(STDIO_TEST, swprintf_ls) {
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  static const wchar_t kWideString[] = L"Hello\uff41 World";
-  ASSERT_EQ(12, swprintf(buf, nchars, L"%ls", kWideString));
-  ASSERT_EQ(std::wstring(kWideString), buf);
-  ASSERT_EQ(12, swprintf(buf, 13, L"%ls", kWideString));
-  ASSERT_EQ(std::wstring(kWideString), buf);
-}
-
-TEST(STDIO_TEST, swprintf_S) { // Synonym for %ls.
-  constexpr size_t nchars = 32;
-  wchar_t buf[nchars];
-
-  static const wchar_t kWideString[] = L"Hello\uff41 World";
-  ASSERT_EQ(12, swprintf(buf, nchars, L"%S", kWideString));
-  ASSERT_EQ(std::wstring(kWideString), buf);
-  ASSERT_EQ(12, swprintf(buf, 13, L"%S", kWideString));
-  ASSERT_EQ(std::wstring(kWideString), buf);
-}
-
-TEST(STDIO_TEST, snprintf_d_INT_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%d", INT_MAX);
-  EXPECT_STREQ("2147483647", buf);
-}
-
-TEST(STDIO_TEST, snprintf_d_INT_MIN) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%d", INT_MIN);
-  EXPECT_STREQ("-2147483648", buf);
-}
-
-TEST(STDIO_TEST, snprintf_jd_INTMAX_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%jd", INTMAX_MAX);
-  EXPECT_STREQ("9223372036854775807", buf);
+  EXPECT_SWPRINTF(L"9223372036854775807", L"%jd", INTMAX_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_jd_INTMAX_MIN) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%jd", INTMAX_MIN);
-  EXPECT_STREQ("-9223372036854775808", buf);
+  EXPECT_SNPRINTF("-9223372036854775808", "%jd", INTMAX_MIN);
+}
+
+TEST(STDIO_TEST, swprintf_jd_INTMAX_MIN) {
+  EXPECT_SWPRINTF(L"-9223372036854775808", L"%jd", INTMAX_MIN);
 }
 
 TEST(STDIO_TEST, snprintf_ju_UINTMAX_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%ju", UINTMAX_MAX);
-  EXPECT_STREQ("18446744073709551615", buf);
+  EXPECT_SNPRINTF("18446744073709551615", "%ju", UINTMAX_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_ju_UINTMAX_MAX) {
+  EXPECT_SWPRINTF(L"18446744073709551615", L"%ju", UINTMAX_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_1$ju_UINTMAX_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%1$ju", UINTMAX_MAX);
-  EXPECT_STREQ("18446744073709551615", buf);
+  EXPECT_SNPRINTF("18446744073709551615", "%1$ju", UINTMAX_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_1$ju_UINTMAX_MAX) {
+  EXPECT_SWPRINTF(L"18446744073709551615", L"%1$ju", UINTMAX_MAX);
+}
+
+TEST(STDIO_TEST, snprintf_d_INT_MAX) {
+  EXPECT_SNPRINTF("2147483647", "%d", INT_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_d_INT_MAX) {
+  EXPECT_SWPRINTF(L"2147483647", L"%d", INT_MAX);
+}
+
+TEST(STDIO_TEST, snprintf_d_INT_MIN) {
+  EXPECT_SNPRINTF("-2147483648", "%d", INT_MIN);
+}
+
+TEST(STDIO_TEST, swprintf_d_INT_MIN) {
+  EXPECT_SWPRINTF(L"-2147483648", L"%d", INT_MIN);
 }
 
 TEST(STDIO_TEST, snprintf_ld_LONG_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%ld", LONG_MAX);
 #if defined(__LP64__)
-  EXPECT_STREQ("9223372036854775807", buf);
+  EXPECT_SNPRINTF("9223372036854775807", "%ld", LONG_MAX);
 #else
-  EXPECT_STREQ("2147483647", buf);
+  EXPECT_SNPRINTF("2147483647", "%ld", LONG_MAX);
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_ld_LONG_MAX) {
+#if defined(__LP64__)
+  EXPECT_SWPRINTF(L"9223372036854775807", L"%ld", LONG_MAX);
+#else
+  EXPECT_SWPRINTF(L"2147483647", L"%ld", LONG_MAX);
 #endif
 }
 
 TEST(STDIO_TEST, snprintf_ld_LONG_MIN) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%ld", LONG_MIN);
 #if defined(__LP64__)
-  EXPECT_STREQ("-9223372036854775808", buf);
+  EXPECT_SNPRINTF("-9223372036854775808", "%ld", LONG_MIN);
 #else
-  EXPECT_STREQ("-2147483648", buf);
+  EXPECT_SNPRINTF("-2147483648", "%ld", LONG_MIN);
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_ld_LONG_MIN) {
+#if defined(__LP64__)
+  EXPECT_SWPRINTF(L"-9223372036854775808", L"%ld", LONG_MIN);
+#else
+  EXPECT_SWPRINTF(L"-2147483648", L"%ld", LONG_MIN);
 #endif
 }
 
 TEST(STDIO_TEST, snprintf_lld_LLONG_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%lld", LLONG_MAX);
-  EXPECT_STREQ("9223372036854775807", buf);
+  EXPECT_SNPRINTF("9223372036854775807", "%lld", LLONG_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_lld_LLONG_MAX) {
+  EXPECT_SWPRINTF(L"9223372036854775807", L"%lld", LLONG_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_lld_LLONG_MIN) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%lld", LLONG_MIN);
-  EXPECT_STREQ("-9223372036854775808", buf);
+  EXPECT_SNPRINTF("-9223372036854775808", "%lld", LLONG_MIN);
+}
+
+TEST(STDIO_TEST, swprintf_lld_LLONG_MIN) {
+  EXPECT_SWPRINTF(L"-9223372036854775808", L"%lld", LLONG_MIN);
 }
 
 TEST(STDIO_TEST, snprintf_o_UINT_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%o", UINT_MAX);
-  EXPECT_STREQ("37777777777", buf);
+  EXPECT_SNPRINTF("37777777777", "%o", UINT_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_o_UINT_MAX) {
+  EXPECT_SWPRINTF(L"37777777777", L"%o", UINT_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_u_UINT_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%u", UINT_MAX);
-  EXPECT_STREQ("4294967295", buf);
+  EXPECT_SNPRINTF("4294967295", "%u", UINT_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_u_UINT_MAX) {
+  EXPECT_SWPRINTF(L"4294967295", L"%u", UINT_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_x_UINT_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%x", UINT_MAX);
-  EXPECT_STREQ("ffffffff", buf);
+  EXPECT_SNPRINTF("ffffffff", "%x", UINT_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_x_UINT_MAX) {
+  EXPECT_SWPRINTF(L"ffffffff", L"%x", UINT_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_X_UINT_MAX) {
-  char buf[BUFSIZ];
-  snprintf(buf, sizeof(buf), "%X", UINT_MAX);
-  EXPECT_STREQ("FFFFFFFF", buf);
+  EXPECT_SNPRINTF("FFFFFFFF", "%X", UINT_MAX);
+}
+
+TEST(STDIO_TEST, swprintf_X_UINT_MAX) {
+  EXPECT_SWPRINTF(L"FFFFFFFF", L"%X", UINT_MAX);
 }
 
 TEST(STDIO_TEST, snprintf_e) {
-  char buf[BUFSIZ];
+  EXPECT_SNPRINTF("1.500000e+00", "%e", 1.5);
+  EXPECT_SNPRINTF("1.500000e+00", "%Le", 1.5L);
+}
 
-  snprintf(buf, sizeof(buf), "%e", 1.5);
-  EXPECT_STREQ("1.500000e+00", buf);
-
-  snprintf(buf, sizeof(buf), "%Le", 1.5L);
-  EXPECT_STREQ("1.500000e+00", buf);
+TEST(STDIO_TEST, swprintf_e) {
+  EXPECT_SWPRINTF(L"1.500000e+00", L"%e", 1.5);
+  EXPECT_SWPRINTF(L"1.500000e+00", L"%Le", 1.5L);
 }
 
 TEST(STDIO_TEST, snprintf_negative_zero_5084292) {
-  char buf[BUFSIZ];
+  EXPECT_SNPRINTF("-0.000000e+00", "%e", -0.0);
+  EXPECT_SNPRINTF("-0.000000E+00", "%E", -0.0);
+  EXPECT_SNPRINTF("-0.000000", "%f", -0.0);
+  EXPECT_SNPRINTF("-0.000000", "%F", -0.0);
+  EXPECT_SNPRINTF("-0", "%g", -0.0);
+  EXPECT_SNPRINTF("-0", "%G", -0.0);
+  EXPECT_SNPRINTF("-0x0p+0", "%a", -0.0);
+  EXPECT_SNPRINTF("-0X0P+0", "%A", -0.0);
+}
 
-  snprintf(buf, sizeof(buf), "%e", -0.0);
-  EXPECT_STREQ("-0.000000e+00", buf);
-  snprintf(buf, sizeof(buf), "%E", -0.0);
-  EXPECT_STREQ("-0.000000E+00", buf);
-  snprintf(buf, sizeof(buf), "%f", -0.0);
-  EXPECT_STREQ("-0.000000", buf);
-  snprintf(buf, sizeof(buf), "%F", -0.0);
-  EXPECT_STREQ("-0.000000", buf);
-  snprintf(buf, sizeof(buf), "%g", -0.0);
-  EXPECT_STREQ("-0", buf);
-  snprintf(buf, sizeof(buf), "%G", -0.0);
-  EXPECT_STREQ("-0", buf);
-  snprintf(buf, sizeof(buf), "%a", -0.0);
-  EXPECT_STREQ("-0x0p+0", buf);
-  snprintf(buf, sizeof(buf), "%A", -0.0);
-  EXPECT_STREQ("-0X0P+0", buf);
+TEST(STDIO_TEST, swprintf_negative_zero_5084292) {
+  EXPECT_SWPRINTF(L"-0.000000e+00", L"%e", -0.0);
+  EXPECT_SWPRINTF(L"-0.000000E+00", L"%E", -0.0);
+  EXPECT_SWPRINTF(L"-0.000000", L"%f", -0.0);
+  EXPECT_SWPRINTF(L"-0.000000", L"%F", -0.0);
+  EXPECT_SWPRINTF(L"-0", L"%g", -0.0);
+  EXPECT_SWPRINTF(L"-0", L"%G", -0.0);
+  EXPECT_SWPRINTF(L"-0x0p+0", L"%a", -0.0);
+  EXPECT_SWPRINTF(L"-0X0P+0", L"%A", -0.0);
 }
 
 TEST(STDIO_TEST, snprintf_utf8_15439554) {
@@ -915,18 +919,36 @@
   ASSERT_EQ(ENOMEM, errno);
 }
 
+TEST(STDIO_TEST, swprintf_asterisk_overflow) {
+  wchar_t buf[128];
+  ASSERT_EQ(5, swprintf(buf, sizeof(buf), L"%.*s%c", 4, "hello world", '!'));
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.*s%c", INT_MAX / 2, "hello world", '!'));
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.*s%c", INT_MAX - 1, "hello world", '!'));
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.*s%c", INT_MAX, "hello world", '!'));
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.*s%c", -1, "hello world", '!'));
+
+  // INT_MAX-1, INT_MAX, INT_MAX+1.
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.2147483646s%c", "hello world", '!'));
+  ASSERT_EQ(12, swprintf(buf, sizeof(buf), L"%.2147483647s%c", "hello world", '!'));
+  ASSERT_EQ(-1, swprintf(buf, sizeof(buf), L"%.2147483648s%c", "hello world", '!'));
+  ASSERT_EQ(ENOMEM, errno);
+}
+
 // Inspired by https://github.com/landley/toybox/issues/163.
 TEST(STDIO_TEST, printf_NULL) {
-  char buf[128];
   char* null = nullptr;
-  EXPECT_EQ(4, snprintf(buf, sizeof(buf), "<%*.*s>", 2, 2, null));
-  EXPECT_STREQ("<(n>", buf);
-  EXPECT_EQ(8, snprintf(buf, sizeof(buf), "<%*.*s>", 2, 8, null));
-  EXPECT_STREQ("<(null)>", buf);
-  EXPECT_EQ(10, snprintf(buf, sizeof(buf), "<%*.*s>", 8, 2, null));
-  EXPECT_STREQ("<      (n>", buf);
-  EXPECT_EQ(10, snprintf(buf, sizeof(buf), "<%*.*s>", 8, 8, null));
-  EXPECT_STREQ("<  (null)>", buf);
+  EXPECT_SNPRINTF("<(n>", "<%*.*s>", 2, 2, null);
+  EXPECT_SNPRINTF("<(null)>", "<%*.*s>", 2, 8, null);
+  EXPECT_SNPRINTF("<      (n>", "<%*.*s>", 8, 2, null);
+  EXPECT_SNPRINTF("<  (null)>", "<%*.*s>", 8, 8, null);
+}
+
+TEST(STDIO_TEST, wprintf_NULL) {
+  char* null = nullptr;
+  EXPECT_SWPRINTF(L"<(n>", L"<%*.*s>", 2, 2, null);
+  EXPECT_SWPRINTF(L"<(null)>", L"<%*.*s>", 2, 8, null);
+  EXPECT_SWPRINTF(L"<      (n>", L"<%*.*s>", 8, 2, null);
+  EXPECT_SWPRINTF(L"<  (null)>", L"<%*.*s>", 8, 8, null);
 }
 
 TEST(STDIO_TEST, fprintf) {
@@ -2469,7 +2491,7 @@
 }
 
 TEST_F(STDIO_DEATHTEST, snprintf_30445072_unknown_buffer_size) {
-  std::string buf = "world";
+  std::string buf = "hello";  // So the compiler doesn't know the buffer size.
   ASSERT_EXIT(snprintf(&buf[0], atol("-1"), "hello"),
               testing::KilledBySignal(SIGABRT),
               "FORTIFY: vsnprintf: size .* > SSIZE_MAX");
@@ -2482,48 +2504,36 @@
 }
 
 TEST(STDIO_TEST, printf_m) {
-  char buf[BUFSIZ];
   errno = 0;
-  snprintf(buf, sizeof(buf), "<%m>");
-  ASSERT_STREQ("<Success>", buf);
+  EXPECT_SNPRINTF("<Success>", "<%m>");
   errno = -1;
-  snprintf(buf, sizeof(buf), "<%m>");
-  ASSERT_STREQ("<Unknown error -1>", buf);
+  EXPECT_SNPRINTF("<Unknown error -1>", "<%m>");
   errno = EINVAL;
-  snprintf(buf, sizeof(buf), "<%m>");
-  ASSERT_STREQ("<Invalid argument>", buf);
-}
-
-TEST(STDIO_TEST, printf_m_does_not_clobber_strerror) {
-  char buf[BUFSIZ];
-  const char* m = strerror(-1);
-  ASSERT_STREQ("Unknown error -1", m);
-  errno = -2;
-  snprintf(buf, sizeof(buf), "<%m>");
-  ASSERT_STREQ("<Unknown error -2>", buf);
-  ASSERT_STREQ("Unknown error -1", m);
+  EXPECT_SNPRINTF("<Invalid argument>", "<%m>");
 }
 
 TEST(STDIO_TEST, wprintf_m) {
-  wchar_t buf[BUFSIZ];
   errno = 0;
-  swprintf(buf, sizeof(buf), L"<%m>");
-  ASSERT_EQ(std::wstring(L"<Success>"), buf);
+  EXPECT_SWPRINTF(L"<Success>", L"<%m>");
   errno = -1;
-  swprintf(buf, sizeof(buf), L"<%m>");
-  ASSERT_EQ(std::wstring(L"<Unknown error -1>"), buf);
+  EXPECT_SWPRINTF(L"<Unknown error -1>", L"<%m>");
   errno = EINVAL;
-  swprintf(buf, sizeof(buf), L"<%m>");
-  ASSERT_EQ(std::wstring(L"<Invalid argument>"), buf);
+  EXPECT_SWPRINTF(L"<Invalid argument>", L"<%m>");
 }
 
-TEST(STDIO_TEST, wprintf_m_does_not_clobber_strerror) {
-  wchar_t buf[BUFSIZ];
+TEST(STDIO_TEST, printf_m_does_not_clobber_strerror) {
   const char* m = strerror(-1);
   ASSERT_STREQ("Unknown error -1", m);
   errno = -2;
-  swprintf(buf, sizeof(buf), L"<%m>");
-  ASSERT_EQ(std::wstring(L"<Unknown error -2>"), buf);
+  EXPECT_SNPRINTF("<Unknown error -2>", "<%m>");
+  ASSERT_STREQ("Unknown error -1", m);
+}
+
+TEST(STDIO_TEST, wprintf_m_does_not_clobber_strerror) {
+  const char* m = strerror(-1);
+  ASSERT_STREQ("Unknown error -1", m);
+  errno = -2;
+  EXPECT_SWPRINTF(L"<Unknown error -2>", L"<%m>");
   ASSERT_STREQ("Unknown error -1", m);
 }
 
@@ -3000,156 +3010,86 @@
 #endif
 }
 
-TEST(STDIO_TEST, snprintf_b) {
+TEST(STDIO_TEST, snprintf_b_B) {
 #if defined(__BIONIC__)
-  char buf[BUFSIZ];
-
   uint8_t b = 5;
-  EXPECT_EQ(5, snprintf(buf, sizeof(buf), "<%" PRIb8 ">", b));
-  EXPECT_STREQ("<101>", buf);
-  EXPECT_EQ(10, snprintf(buf, sizeof(buf), "<%08" PRIb8 ">", b));
-  EXPECT_STREQ("<00000101>", buf);
+  EXPECT_SNPRINTF("<101>", "<%" PRIb8 ">", b);
+  EXPECT_SNPRINTF("<101>", "<%" PRIB8 ">", b);
+  EXPECT_SNPRINTF("<00000101>", "<%08" PRIb8 ">", b);
+  EXPECT_SNPRINTF("<00000101>", "<%08" PRIB8 ">", b);
 
   uint16_t s = 0xaaaa;
-  EXPECT_EQ(18, snprintf(buf, sizeof(buf), "<%" PRIb16 ">", s));
-  EXPECT_STREQ("<1010101010101010>", buf);
-  EXPECT_EQ(20, snprintf(buf, sizeof(buf), "<%#" PRIb16 ">", s));
-  EXPECT_STREQ("<0b1010101010101010>", buf);
+  EXPECT_SNPRINTF("<1010101010101010>", "<%" PRIb16 ">", s);
+  EXPECT_SNPRINTF("<1010101010101010>", "<%" PRIB16 ">", s);
+  EXPECT_SNPRINTF("<0b1010101010101010>", "<%#" PRIb16 ">", s);
+  EXPECT_SNPRINTF("<0B1010101010101010>", "<%#" PRIB16 ">", s);
 
-  EXPECT_EQ(34, snprintf(buf, sizeof(buf), "<%" PRIb32 ">", 0xaaaaaaaa));
-  EXPECT_STREQ("<10101010101010101010101010101010>", buf);
-  EXPECT_EQ(36, snprintf(buf, sizeof(buf), "<%#" PRIb32 ">", 0xaaaaaaaa));
-  EXPECT_STREQ("<0b10101010101010101010101010101010>", buf);
+  EXPECT_SNPRINTF("<10101010101010101010101010101010>", "<%" PRIb32 ">", 0xaaaaaaaa);
+  EXPECT_SNPRINTF("<10101010101010101010101010101010>", "<%" PRIB32 ">", 0xaaaaaaaa);
+  EXPECT_SNPRINTF("<0b10101010101010101010101010101010>", "<%#" PRIb32 ">", 0xaaaaaaaa);
+  EXPECT_SNPRINTF("<0B10101010101010101010101010101010>", "<%#" PRIB32 ">", 0xaaaaaaaa);
 
   // clang doesn't like "%lb" (https://github.com/llvm/llvm-project/issues/62247)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat"
-  EXPECT_EQ(66, snprintf(buf, sizeof(buf), "<%" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_STREQ("<1010101010101010101010101010101010101010101010101010101010101010>", buf);
-  EXPECT_EQ(68, snprintf(buf, sizeof(buf), "<%#" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_STREQ("<0b1010101010101010101010101010101010101010101010101010101010101010>", buf);
+  EXPECT_SNPRINTF("<1010101010101010101010101010101010101010101010101010101010101010>",
+                  "<%" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SNPRINTF("<1010101010101010101010101010101010101010101010101010101010101010>",
+                  "<%" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SNPRINTF("<0b1010101010101010101010101010101010101010101010101010101010101010>",
+                  "<%#" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SNPRINTF("<0B1010101010101010101010101010101010101010101010101010101010101010>",
+                  "<%#" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa);
 #pragma clang diagnostic pop
 
-  EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%#b>", 0));
-  EXPECT_STREQ("<0>", buf);
+  EXPECT_SNPRINTF("<0>", "<%#b>", 0);
+  EXPECT_SNPRINTF("<0>", "<%#B>", 0);
 #else
   GTEST_SKIP() << "no %b in glibc";
 #endif
 }
 
-TEST(STDIO_TEST, snprintf_B) {
+TEST(STDIO_TEST, swprintf_b_B) {
 #if defined(__BIONIC__)
-  char buf[BUFSIZ];
-
   uint8_t b = 5;
-  EXPECT_EQ(5, snprintf(buf, sizeof(buf), "<%" PRIB8 ">", b));
-  EXPECT_STREQ("<101>", buf);
-  EXPECT_EQ(10, snprintf(buf, sizeof(buf), "<%08" PRIB8 ">", b));
-  EXPECT_STREQ("<00000101>", buf);
+  EXPECT_SWPRINTF(L"<101>", L"<%" PRIb8 ">", b);
+  EXPECT_SWPRINTF(L"<101>", L"<%" PRIB8 ">", b);
+  EXPECT_SWPRINTF(L"<0b101>", L"<%#" PRIb8 ">", b);
+  EXPECT_SWPRINTF(L"<0B101>", L"<%#" PRIB8 ">", b);
+  EXPECT_SWPRINTF(L"<00000101>", L"<%08" PRIb8 ">", b);
+  EXPECT_SWPRINTF(L"<00000101>", L"<%08" PRIB8 ">", b);
 
   uint16_t s = 0xaaaa;
-  EXPECT_EQ(18, snprintf(buf, sizeof(buf), "<%" PRIB16 ">", s));
-  EXPECT_STREQ("<1010101010101010>", buf);
-  EXPECT_EQ(20, snprintf(buf, sizeof(buf), "<%#" PRIB16 ">", s));
-  EXPECT_STREQ("<0B1010101010101010>", buf);
+  EXPECT_SWPRINTF(L"<1010101010101010>", L"<%" PRIb16 ">", s);
+  EXPECT_SWPRINTF(L"<1010101010101010>", L"<%" PRIB16 ">", s);
+  EXPECT_SWPRINTF(L"<0b1010101010101010>", L"<%#" PRIb16 ">", s);
+  EXPECT_SWPRINTF(L"<0B1010101010101010>", L"<%#" PRIB16 ">", s);
 
-  EXPECT_EQ(34, snprintf(buf, sizeof(buf), "<%" PRIB32 ">", 0xaaaaaaaa));
-  EXPECT_STREQ("<10101010101010101010101010101010>", buf);
-  EXPECT_EQ(36, snprintf(buf, sizeof(buf), "<%#" PRIB32 ">", 0xaaaaaaaa));
-  EXPECT_STREQ("<0B10101010101010101010101010101010>", buf);
+  EXPECT_SWPRINTF(L"<10101010101010101010101010101010>", L"<%" PRIb32 ">", 0xaaaaaaaa);
+  EXPECT_SWPRINTF(L"<10101010101010101010101010101010>", L"<%" PRIB32 ">", 0xaaaaaaaa);
+  EXPECT_SWPRINTF(L"<0b10101010101010101010101010101010>", L"<%#" PRIb32 ">", 0xaaaaaaaa);
+  EXPECT_SWPRINTF(L"<0B10101010101010101010101010101010>", L"<%#" PRIB32 ">", 0xaaaaaaaa);
 
-  // clang doesn't like "%lB" (https://github.com/llvm/llvm-project/issues/62247)
+  // clang doesn't like "%lb" (https://github.com/llvm/llvm-project/issues/62247)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat"
-  EXPECT_EQ(66, snprintf(buf, sizeof(buf), "<%" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_STREQ("<1010101010101010101010101010101010101010101010101010101010101010>", buf);
-  EXPECT_EQ(68, snprintf(buf, sizeof(buf), "<%#" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_STREQ("<0B1010101010101010101010101010101010101010101010101010101010101010>", buf);
+  EXPECT_SWPRINTF(L"<1010101010101010101010101010101010101010101010101010101010101010>",
+                  L"<%" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SWPRINTF(L"<1010101010101010101010101010101010101010101010101010101010101010>",
+                  L"<%" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SWPRINTF(L"<0b1010101010101010101010101010101010101010101010101010101010101010>",
+                  L"<%#" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa);
+  EXPECT_SWPRINTF(L"<0B1010101010101010101010101010101010101010101010101010101010101010>",
+                  L"<%#" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa);
 #pragma clang diagnostic pop
 
-  EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%#b>", 0));
-  EXPECT_STREQ("<0>", buf);
-#else
-  GTEST_SKIP() << "no %B in glibc";
-#endif
-}
-
-TEST(STDIO_TEST, swprintf_b) {
-#if defined(__BIONIC__)
-  wchar_t buf[BUFSIZ];
-
-  uint8_t b = 5;
-  EXPECT_EQ(5, swprintf(buf, sizeof(buf), L"<%" PRIb8 ">", b));
-  EXPECT_EQ(std::wstring(L"<101>"), buf);
-  EXPECT_EQ(10, swprintf(buf, sizeof(buf), L"<%08" PRIb8 ">", b));
-  EXPECT_EQ(std::wstring(L"<00000101>"), buf);
-
-  uint16_t s = 0xaaaa;
-  EXPECT_EQ(18, swprintf(buf, sizeof(buf), L"<%" PRIb16 ">", s));
-  EXPECT_EQ(std::wstring(L"<1010101010101010>"), buf);
-  EXPECT_EQ(20, swprintf(buf, sizeof(buf), L"<%#" PRIb16 ">", s));
-  EXPECT_EQ(std::wstring(L"<0b1010101010101010>"), buf);
-
-  EXPECT_EQ(34, swprintf(buf, sizeof(buf), L"<%" PRIb32 ">", 0xaaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<10101010101010101010101010101010>"), buf);
-  EXPECT_EQ(36, swprintf(buf, sizeof(buf), L"<%#" PRIb32 ">", 0xaaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<0b10101010101010101010101010101010>"), buf);
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat"  // clang doesn't like "%lb"
-  EXPECT_EQ(66, swprintf(buf, sizeof(buf), L"<%" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<1010101010101010101010101010101010101010101010101010101010101010>"),
-            buf);
-  EXPECT_EQ(68, swprintf(buf, sizeof(buf), L"<%#" PRIb64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<0b1010101010101010101010101010101010101010101010101010101010101010>"),
-            buf);
-#pragma clang diagnostic pop
-
-  EXPECT_EQ(3, swprintf(buf, sizeof(buf), L"<%#b>", 0));
-  EXPECT_EQ(std::wstring(L"<0>"), buf);
+  EXPECT_SWPRINTF(L"<0>", L"<%#b>", 0);
+  EXPECT_SWPRINTF(L"<0>", L"<%#B>", 0);
 #else
   GTEST_SKIP() << "no %b in glibc";
 #endif
 }
 
-TEST(STDIO_TEST, swprintf_B) {
-#if defined(__BIONIC__)
-  wchar_t buf[BUFSIZ];
-
-  uint8_t b = 5;
-  EXPECT_EQ(5, swprintf(buf, sizeof(buf), L"<%" PRIB8 ">", b));
-  EXPECT_EQ(std::wstring(L"<101>"), buf);
-  EXPECT_EQ(10, swprintf(buf, sizeof(buf), L"<%08" PRIB8 ">", b));
-  EXPECT_EQ(std::wstring(L"<00000101>"), buf);
-
-  uint16_t s = 0xaaaa;
-  EXPECT_EQ(18, swprintf(buf, sizeof(buf), L"<%" PRIB16 ">", s));
-  EXPECT_EQ(std::wstring(L"<1010101010101010>"), buf);
-  EXPECT_EQ(20, swprintf(buf, sizeof(buf), L"<%#" PRIB16 ">", s));
-  EXPECT_EQ(std::wstring(L"<0B1010101010101010>"), buf);
-
-  EXPECT_EQ(34, swprintf(buf, sizeof(buf), L"<%" PRIB32 ">", 0xaaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<10101010101010101010101010101010>"), buf);
-  EXPECT_EQ(36, swprintf(buf, sizeof(buf), L"<%#" PRIB32 ">", 0xaaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<0B10101010101010101010101010101010>"), buf);
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat"  // clang doesn't like "%lb"
-  EXPECT_EQ(66, swprintf(buf, sizeof(buf), L"<%" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<1010101010101010101010101010101010101010101010101010101010101010>"),
-            buf);
-  EXPECT_EQ(68, swprintf(buf, sizeof(buf), L"<%#" PRIB64 ">", 0xaaaaaaaa'aaaaaaaa));
-  EXPECT_EQ(std::wstring(L"<0B1010101010101010101010101010101010101010101010101010101010101010>"),
-            buf);
-#pragma clang diagnostic pop
-
-  EXPECT_EQ(3, swprintf(buf, sizeof(buf), L"<%#B>", 0));
-  EXPECT_EQ(std::wstring(L"<0>"), buf);
-#else
-  GTEST_SKIP() << "no %B in glibc";
-#endif
-}
-
 TEST(STDIO_TEST, scanf_i_decimal) {
   int i;
   EXPECT_EQ(1, sscanf("<123789>", "<%i>", &i));
@@ -3281,30 +3221,47 @@
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat-invalid-specifier"
 #pragma clang diagnostic ignored "-Wconstant-conversion"
-  char buf[BUFSIZ];
   int8_t a = 0b101;
-  snprintf(buf, sizeof(buf), "<%w8b>", a);
-  EXPECT_STREQ("<101>", buf);
+  EXPECT_SNPRINTF("<101>", "<%w8b>", a);
   int8_t b1 = 0xFF;
-  snprintf(buf, sizeof(buf), "<%w8d>", b1);
-  EXPECT_STREQ("<-1>", buf);
+  EXPECT_SNPRINTF("<-1>", "<%w8d>", b1);
   int8_t b2 = 0x1FF;
-  snprintf(buf, sizeof(buf), "<%w8d>", b2);
-  EXPECT_STREQ("<-1>", buf);
+  EXPECT_SNPRINTF("<-1>", "<%w8d>", b2);
   int16_t c = 0xFFFF;
-  snprintf(buf, sizeof(buf), "<%w16i>", c);
-  EXPECT_STREQ("<-1>", buf);
+  EXPECT_SNPRINTF("<-1>", "<%w16i>", c);
   int32_t d = 021;
-  snprintf(buf, sizeof(buf), "<%w32o>", d);
-  EXPECT_STREQ("<21>", buf);
+  EXPECT_SNPRINTF("<21>", "<%w32o>", d);
   uint32_t e = -1;
-  snprintf(buf, sizeof(buf), "<%w32u>", e);
-  EXPECT_STREQ("<4294967295>", buf);
+  EXPECT_SNPRINTF("<4294967295>", "<%w32u>", e);
   int64_t f = 0x3b;
-  snprintf(buf, sizeof(buf), "<%w64x>", f);
-  EXPECT_STREQ("<3b>", buf);
-  snprintf(buf, sizeof(buf), "<%w64X>", f);
-  EXPECT_STREQ("<3B>", buf);
+  EXPECT_SNPRINTF("<3b>", "<%w64x>", f);
+  EXPECT_SNPRINTF("<3B>", "<%w64X>", f);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_w_base) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+  int8_t a = 0b101;
+  EXPECT_SWPRINTF(L"<101>", L"<%w8b>", a);
+  int8_t b1 = 0xFF;
+  EXPECT_SWPRINTF(L"<-1>", L"<%w8d>", b1);
+  int8_t b2 = 0x1FF;
+  EXPECT_SWPRINTF(L"<-1>", L"<%w8d>", b2);
+  int16_t c = 0xFFFF;
+  EXPECT_SWPRINTF(L"<-1>", L"<%w16i>", c);
+  int32_t d = 021;
+  EXPECT_SWPRINTF(L"<21>", L"<%w32o>", d);
+  uint32_t e = -1;
+  EXPECT_SWPRINTF(L"<4294967295>", L"<%w32u>", e);
+  int64_t f = 0x3b;
+  EXPECT_SWPRINTF(L"<3b>", L"<%w64x>", f);
+  EXPECT_SWPRINTF(L"<3B>", L"<%w64X>", f);
 #pragma clang diagnostic pop
 #else
   GTEST_SKIP() << "no %w in glibc";
@@ -3316,18 +3273,37 @@
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat-invalid-specifier"
 #pragma clang diagnostic ignored "-Wformat-extra-args"
-  char buf[BUFSIZ];
   int32_t a = 0xaaaaaaaa;
   int64_t b = 0x11111111'22222222;
   int64_t c = 0x33333333'44444444;
   int64_t d = 0xaaaaaaaa'aaaaaaaa;
-  snprintf(buf, sizeof(buf), "<%2$w32b --- %1$w64x>", c, a);
-  EXPECT_STREQ("<10101010101010101010101010101010 --- 3333333344444444>", buf);
-  snprintf(buf, sizeof(buf), "<%3$w64b --- %1$w64x --- %2$w64x>", b, c, d);
-  EXPECT_STREQ(
+  EXPECT_SNPRINTF("<10101010101010101010101010101010 --- 3333333344444444>",
+                  "<%2$w32b --- %1$w64x>", c, a);
+  EXPECT_SNPRINTF(
       "<1010101010101010101010101010101010101010101010101010101010101010 --- 1111111122222222 --- "
       "3333333344444444>",
-      buf);
+      "<%3$w64b --- %1$w64x --- %2$w64x>", b, c, d);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_w_arguments_reordering) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+#pragma clang diagnostic ignored "-Wformat-extra-args"
+  int32_t a = 0xaaaaaaaa;
+  int64_t b = 0x11111111'22222222;
+  int64_t c = 0x33333333'44444444;
+  int64_t d = 0xaaaaaaaa'aaaaaaaa;
+  EXPECT_SWPRINTF(L"<10101010101010101010101010101010 --- 3333333344444444>",
+                  L"<%2$w32b --- %1$w64x>", c, a);
+  EXPECT_SWPRINTF(
+      L"<1010101010101010101010101010101010101010101010101010101010101010 --- 1111111122222222 --- "
+      L"3333333344444444>",
+      L"<%3$w64b --- %1$w64x --- %2$w64x>", b, c, d);
 #pragma clang diagnostic pop
 #else
   GTEST_SKIP() << "no %w in glibc";
@@ -3347,63 +3323,6 @@
 #endif
 }
 
-TEST(STDIO_TEST, swprintf_w_base) {
-#if defined(__BIONIC__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
-#pragma clang diagnostic ignored "-Wconstant-conversion"
-  wchar_t buf[BUFSIZ];
-  int8_t a = 0b101;
-  swprintf(buf, sizeof(buf), L"<%w8b>", a);
-  EXPECT_EQ(std::wstring(L"<101>"), buf);
-  int8_t b1 = 0xFF;
-  swprintf(buf, sizeof(buf), L"<%w8d>", b1);
-  EXPECT_EQ(std::wstring(L"<-1>"), buf);
-  int8_t b2 = 0x1FF;
-  swprintf(buf, sizeof(buf), L"<%w8d>", b2);
-  EXPECT_EQ(std::wstring(L"<-1>"), buf);
-  int16_t c = 0xFFFF;
-  swprintf(buf, sizeof(buf), L"<%w16i>", c);
-  EXPECT_EQ(std::wstring(L"<-1>"), buf);
-  int32_t d = 021;
-  swprintf(buf, sizeof(buf), L"<%w32o>", d);
-  EXPECT_EQ(std::wstring(L"<21>"), buf);
-  uint32_t e = -1;
-  swprintf(buf, sizeof(buf), L"<%w32u>", e);
-  EXPECT_EQ(std::wstring(L"<4294967295>"), buf);
-  int64_t f = 0x3b;
-  swprintf(buf, sizeof(buf), L"<%w64x>", f);
-  EXPECT_EQ(std::wstring(L"<3b>"), buf);
-  swprintf(buf, sizeof(buf), L"<%w64X>", f);
-  EXPECT_EQ(std::wstring(L"<3B>"), buf);
-#pragma clang diagnostic pop
-#else
-  GTEST_SKIP() << "no %w in glibc";
-#endif
-}
-
-TEST(STDIO_TEST, swprintf_w_arguments_reordering) {
-#if defined(__BIONIC__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
-#pragma clang diagnostic ignored "-Wformat-extra-args"
-  wchar_t buf[BUFSIZ];
-  int32_t a = 0xaaaaaaaa;
-  int64_t b = 0x11111111'22222222;
-  int64_t c = 0x33333333'44444444;
-  int64_t d = 0xaaaaaaaa'aaaaaaaa;
-  swprintf(buf, sizeof(buf), L"<%2$w32b --- %1$w64x>", c, a);
-  EXPECT_EQ(std::wstring(L"<10101010101010101010101010101010 --- 3333333344444444>"), buf);
-  swprintf(buf, sizeof(buf), L"<%3$w64b --- %1$w64x --- %2$w64x>", b, c, d);
-  EXPECT_EQ(std::wstring(L"<1010101010101010101010101010101010101010101010101010101010101010 --- "
-                         L"1111111122222222 --- 3333333344444444>"),
-            buf);
-#pragma clang diagnostic pop
-#else
-  GTEST_SKIP() << "no %w in glibc";
-#endif
-}
-
 TEST(STDIO_TEST, swprintf_invalid_w_width) {
 #if defined(__BIONIC__)
 #pragma clang diagnostic push
@@ -3415,4 +3334,362 @@
 #else
   GTEST_SKIP() << "no %w in glibc";
 #endif
-}
\ No newline at end of file
+}
+
+TEST(STDIO_TEST, snprintf_wf_base) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int_fast8_t a = 0b101;
+  EXPECT_SNPRINTF("<101>", "<%wf8b>", a);
+  int_fast8_t b = 0x12341234'12341234;
+  EXPECT_SNPRINTF("<34>", "<%wf8x>", b);
+  uint_fast16_t c = 0x11111111'22222222;
+#if defined(__LP64__)
+  EXPECT_SNPRINTF("<1111111122222222>", "<%wf16x>", c);
+#else
+  EXPECT_SNPRINTF("<22222222>", "<%wf16x>", c);
+#endif
+  int_fast32_t d = 0x33333333'44444444;
+#if defined(__LP64__)
+  EXPECT_SNPRINTF("<3333333344444444>", "<%wf32x>", d);
+#else
+  EXPECT_SNPRINTF("<44444444>", "<%wf32x>", d);
+#endif
+  int_fast64_t e = 0xaaaaaaaa'aaaaaaaa;
+  EXPECT_SNPRINTF("<aaaaaaaaaaaaaaaa>", "<%wf64x>", e);
+  EXPECT_SNPRINTF("<AAAAAAAAAAAAAAAA>", "<%wf64X>", e);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %wf in glibc";
+#endif
+}
+TEST(STDIO_TEST, swprintf_wf_base) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int_fast8_t a = 0b101;
+  EXPECT_SWPRINTF(L"<101>", L"<%wf8b>", a);
+  int_fast8_t b = 0x12341234'12341234;
+  EXPECT_SWPRINTF(L"<34>", L"<%wf8x>", b);
+  uint_fast16_t c = 0x11111111'22222222;
+#if defined(__LP64__)
+  EXPECT_SWPRINTF(L"<1111111122222222>", L"<%wf16x>", c);
+#else
+  EXPECT_SWPRINTF(L"<22222222>", L"<%wf16x>", c);
+#endif
+  int_fast32_t d = 0x33333333'44444444;
+#if defined(__LP64__)
+  EXPECT_SWPRINTF(L"<3333333344444444>", L"<%wf32x>", d);
+#else
+  EXPECT_SWPRINTF(L"<44444444>", L"<%wf32x>", d);
+#endif
+  int_fast64_t e = 0xaaaaaaaa'aaaaaaaa;
+  EXPECT_SWPRINTF(L"<aaaaaaaaaaaaaaaa>", L"<%wf64x>", e);
+  EXPECT_SWPRINTF(L"<AAAAAAAAAAAAAAAA>", L"<%wf64X>", e);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %wf in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, snprintf_wf_arguments_reordering) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-extra-args"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int_fast16_t a = 0x11111111'22222222;
+  int_fast32_t b = 0x33333333'44444444;
+  int_fast32_t c = 0xaaaaaaaa'aaaaaaaa;
+#if defined(__LP64__)
+  EXPECT_SNPRINTF(
+      "<3333333344444444 --- 1010101010101010101010101010101010101010101010101010101010101010>",
+      "<%2$wf32x --- %1$wf32b>", c, b);
+
+  EXPECT_SNPRINTF(
+      "<1010101010101010101010101010101010101010101010101010101010101010 --- 1111111122222222 --- "
+      "3333333344444444>",
+      "<%3$wf32b --- %1$wf16x --- %2$wf32x>", a, b, c);
+#else
+  EXPECT_SNPRINTF("<44444444 --- 10101010101010101010101010101010>", "<%2$wf32x --- %1$wf32b>", c,
+                  b);
+  EXPECT_SNPRINTF("<10101010101010101010101010101010 --- 22222222 --- 44444444>",
+                  "<%3$wf32b --- %1$wf16x --- %2$wf32x>", a, b, c);
+#endif
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_wf_arguments_reordering) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-extra-args"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int_fast16_t a = 0x11111111'22222222;
+  int_fast32_t b = 0x33333333'44444444;
+  int_fast32_t c = 0xaaaaaaaa'aaaaaaaa;
+#if defined(__LP64__)
+  EXPECT_SWPRINTF(
+      L"<3333333344444444 --- 1010101010101010101010101010101010101010101010101010101010101010>",
+      L"<%2$wf32x --- %1$wf32b>", c, b);
+
+  EXPECT_SWPRINTF(
+      L"<1010101010101010101010101010101010101010101010101010101010101010 --- 1111111122222222 --- "
+      L"3333333344444444>",
+      L"<%3$wf32b --- %1$wf16x --- %2$wf32x>", a, b, c);
+#else
+  EXPECT_SWPRINTF(L"<44444444 --- 10101010101010101010101010101010>", L"<%2$wf32x --- %1$wf32b>", c,
+                  b);
+  EXPECT_SWPRINTF(L"<10101010101010101010101010101010 --- 22222222 --- 44444444>",
+                  L"<%3$wf32b --- %1$wf16x --- %2$wf32x>", a, b, c);
+#endif
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, snprintf_invalid_wf_width) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  char buf[BUFSIZ];
+  int_fast32_t a = 100;
+  EXPECT_DEATH(snprintf(buf, sizeof(buf), "%wf20d", &a), "%wf20 is unsupported");
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swprintf_invalid_wf_width) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  wchar_t buf[BUFSIZ];
+  int_fast32_t a = 100;
+  EXPECT_DEATH(swprintf(buf, sizeof(buf), L"%wf20d", &a), "%wf20 is unsupported");
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, sscanf_w_or_wf_base) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int8_t a;
+  EXPECT_EQ(1, sscanf("<0b101>", "<%w8b>", &a));
+  EXPECT_EQ(0b101, a);
+  int_fast8_t fast_a;
+  EXPECT_EQ(1, sscanf("<0b101>", "<%wf8b>", &fast_a));
+  EXPECT_EQ(0b101, fast_a);
+  int8_t b1;
+  EXPECT_EQ(1, sscanf("<0xFF>", "<%w8i>", &b1));
+  EXPECT_EQ(-1, b1);
+  int8_t b2;
+  EXPECT_EQ(1, sscanf("<0x1FF>", "<%w8i>", &b2));
+  EXPECT_EQ(-1, b2);
+  int_fast8_t fast_b;
+  EXPECT_EQ(1, sscanf("<0x1234123412341234>", "<%wf8x>", &fast_b));
+  EXPECT_EQ(0x34, fast_b);
+  int16_t c1;
+  EXPECT_EQ(1, sscanf("<0xFFFF>", "<%w16i>", &c1));
+  EXPECT_EQ(-1, c1);
+  uint16_t c2;
+  EXPECT_EQ(1, sscanf("<64>", "<%w16d>", &c2));
+  EXPECT_EQ(64, c2);
+  int_fast16_t fast_c;
+#if defined(__LP64__)
+  EXPECT_EQ(1, sscanf("<0x1111111122222222>", "<%wf16x>", &fast_c));
+  EXPECT_EQ(0x1111111122222222, fast_c);
+#else
+  EXPECT_EQ(1, sscanf("<0x1111111122222222>", "<%wf16x>", &fast_c));
+  EXPECT_EQ(0x22222222, fast_c);
+#endif
+  int32_t d;
+  EXPECT_EQ(1, sscanf("<021>", "<%w32o>", &d));
+  EXPECT_EQ(021, d);
+  int_fast32_t fast_d;
+#if defined(__LP64__)
+  EXPECT_EQ(1, sscanf("<0x3333333344444444>", "<%wf32x>", &fast_d));
+  EXPECT_EQ(0x3333333344444444, fast_d);
+#else
+  EXPECT_EQ(1, sscanf("<0x3333333344444444>", "<%wf32x>", &fast_d));
+  EXPECT_EQ(0x44444444, fast_d);
+#endif
+  uint32_t e;
+  EXPECT_EQ(1, sscanf("<-1>", "<%w32u>", &e));
+  EXPECT_EQ(4294967295, e);
+  int64_t f;
+  EXPECT_EQ(1, sscanf("<0x3b>", "<%w64x>", &f));
+  EXPECT_EQ(0x3b, f);
+  EXPECT_EQ(1, sscanf("<0x3b>", "<%w64X>", &f));
+  EXPECT_EQ(0x3B, f);
+  uint_fast64_t fast_f;
+  EXPECT_EQ(1, sscanf("<0xaaaaaaaa>", "<%wf64x>", &fast_f));
+  EXPECT_EQ(0xaaaaaaaa, fast_f);
+  EXPECT_EQ(1, sscanf("<0xaaaaaaaa>", "<%wf64X>", &fast_f));
+  EXPECT_EQ(0xAAAAAAAA, fast_f);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, sscanf_w_combination) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+#pragma clang diagnostic ignored "-Wformat-extra-args"
+  uint32_t a;
+  int64_t b;
+  char c;
+
+  EXPECT_EQ(3, sscanf("<0b10101010101010101010101010101010 0x3333333344444444 1>",
+                      "<%w32b %w64x %c>", &a, &b, &c));
+  EXPECT_EQ(0xaaaaaaaa, a);
+  EXPECT_EQ(0x3333333344444444, b);
+  EXPECT_EQ('1', c);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, sscanf_invalid_w_or_wf_width) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int32_t a;
+  EXPECT_DEATH(sscanf("<100>", "<%w20d>", &a), "%w20 is unsupported");
+  int_fast32_t fast_a;
+  EXPECT_DEATH(sscanf("<100>", "<%wf20d>", &fast_a), "%wf20 is unsupported");
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swscanf_w_or_wf_base) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int8_t a;
+  EXPECT_EQ(1, swscanf(L"<0b101>", L"<%w8b>", &a));
+  EXPECT_EQ(0b101, a);
+  int_fast8_t fast_a;
+  EXPECT_EQ(1, swscanf(L"<0b101>", L"<%wf8b>", &fast_a));
+  EXPECT_EQ(0b101, fast_a);
+  int8_t b1;
+  EXPECT_EQ(1, swscanf(L"<0xFF>", L"<%w8i>", &b1));
+  EXPECT_EQ(-1, b1);
+  int8_t b2;
+  EXPECT_EQ(1, swscanf(L"<0x1FF>", L"<%w8i>", &b2));
+  EXPECT_EQ(-1, b2);
+  int_fast8_t fast_b;
+  EXPECT_EQ(1, swscanf(L"<0x1234123412341234>", L"<%wf8i>", &fast_b));
+  EXPECT_EQ(0x34, fast_b);
+  int16_t c1;
+  EXPECT_EQ(1, swscanf(L"<0xFFFF>", L"<%w16i>", &c1));
+  EXPECT_EQ(-1, c1);
+  uint16_t c2;
+  EXPECT_EQ(1, swscanf(L"<64>", L"<%w16d>", &c2));
+  EXPECT_EQ(64, c2);
+  int_fast16_t fast_c;
+#if defined(__LP64__)
+  EXPECT_EQ(1, swscanf(L"<0x1111111122222222>", L"<%wf16x>", &fast_c));
+  EXPECT_EQ(0x1111111122222222, fast_c);
+#else
+  EXPECT_EQ(1, swscanf(L"<0x1111111122222222>", L"<%wf16x>", &fast_c));
+  EXPECT_EQ(0x22222222, fast_c);
+#endif
+  int32_t d;
+  EXPECT_EQ(1, swscanf(L"<021>", L"<%w32o>", &d));
+  EXPECT_EQ(021, d);
+  int_fast32_t fast_d;
+#if defined(__LP64__)
+  EXPECT_EQ(1, swscanf(L"<0x3333333344444444>", L"<%wf32x>", &fast_d));
+  EXPECT_EQ(0x3333333344444444, fast_d);
+#else
+  EXPECT_EQ(1, swscanf(L"<0x3333333344444444>", L"<%wf32x>", &fast_d));
+  EXPECT_EQ(0x44444444, fast_d);
+#endif
+  uint32_t e;
+  EXPECT_EQ(1, swscanf(L"<-1>", L"<%w32u>", &e));
+  EXPECT_EQ(4294967295, e);
+  int64_t f;
+  EXPECT_EQ(1, swscanf(L"<0x3b>", L"<%w64x>", &f));
+  EXPECT_EQ(0x3b, f);
+  EXPECT_EQ(1, swscanf(L"<0x3b>", L"<%w64X>", &f));
+  EXPECT_EQ(0x3B, f);
+  uint_fast64_t fast_f;
+  EXPECT_EQ(1, swscanf(L"<0xaaaaaaaa>", L"<%wf64x>", &fast_f));
+  EXPECT_EQ(0xaaaaaaaa, fast_f);
+  EXPECT_EQ(1, swscanf(L"<0xaaaaaaaa>", L"<%wf64X>", &fast_f));
+  EXPECT_EQ(0xAAAAAAAA, fast_f);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swscanf_w_combination) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+#pragma clang diagnostic ignored "-Wformat-extra-args"
+  uint32_t a;
+  int64_t b;
+  char c;
+
+  EXPECT_EQ(3, swscanf(L"<0b10101010101010101010101010101010 0x3333333344444444 1>",
+                       L"<%w32b %w64x %c>", &a, &b, &c));
+  EXPECT_EQ(0xaaaaaaaa, a);
+  EXPECT_EQ(0x3333333344444444, b);
+  EXPECT_EQ('1', c);
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, swscanf_invalid_w_or_wf_width) {
+#if defined(__BIONIC__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat"
+#pragma clang diagnostic ignored "-Wformat-invalid-specifier"
+  int32_t a;
+  EXPECT_DEATH(swscanf(L"<100>", L"<%w20d>", &a), "%w20 is unsupported");
+  int_fast32_t fast_a;
+  EXPECT_DEATH(swscanf(L"<100>", L"<%wf20d>", &fast_a), "%wf20 is unsupported");
+#pragma clang diagnostic pop
+#else
+  GTEST_SKIP() << "no %w in glibc";
+#endif
+}
+
+TEST(STDIO_TEST, printf_lc_0) {
+  // https://austingroupbugs.net/view.php?id=1647
+  char buf[BUFSIZ];
+  EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", L'\0'));
+  EXPECT_TRUE(!memcmp(buf, "<\0>", 3));
+}
diff --git a/tests/struct_layout_test.cpp b/tests/struct_layout_test.cpp
index 10c100a..0123ed9 100644
--- a/tests/struct_layout_test.cpp
+++ b/tests/struct_layout_test.cpp
@@ -30,7 +30,7 @@
 #define CHECK_OFFSET(name, field, offset) \
     check_offset(#name, #field, offsetof(name, field), offset);
 #ifdef __LP64__
-  CHECK_SIZE(pthread_internal_t, 784);
+  CHECK_SIZE(pthread_internal_t, 776);
   CHECK_OFFSET(pthread_internal_t, next, 0);
   CHECK_OFFSET(pthread_internal_t, prev, 8);
   CHECK_OFFSET(pthread_internal_t, tid, 16);
@@ -55,7 +55,6 @@
   CHECK_OFFSET(pthread_internal_t, dlerror_buffer, 248);
   CHECK_OFFSET(pthread_internal_t, bionic_tls, 760);
   CHECK_OFFSET(pthread_internal_t, errno_value, 768);
-  CHECK_OFFSET(pthread_internal_t, vfork_child_stack_bottom, 776);
   CHECK_SIZE(bionic_tls, 12200);
   CHECK_OFFSET(bionic_tls, key_data, 0);
   CHECK_OFFSET(bionic_tls, locale, 2080);
@@ -73,7 +72,7 @@
   CHECK_OFFSET(bionic_tls, bionic_systrace_disabled, 12193);
   CHECK_OFFSET(bionic_tls, padding, 12194);
 #else
-  CHECK_SIZE(pthread_internal_t, 672);
+  CHECK_SIZE(pthread_internal_t, 668);
   CHECK_OFFSET(pthread_internal_t, next, 0);
   CHECK_OFFSET(pthread_internal_t, prev, 4);
   CHECK_OFFSET(pthread_internal_t, tid, 8);
@@ -98,7 +97,6 @@
   CHECK_OFFSET(pthread_internal_t, dlerror_buffer, 148);
   CHECK_OFFSET(pthread_internal_t, bionic_tls, 660);
   CHECK_OFFSET(pthread_internal_t, errno_value, 664);
-  CHECK_OFFSET(pthread_internal_t, vfork_child_stack_bottom, 668);
   CHECK_SIZE(bionic_tls, 11080);
   CHECK_OFFSET(bionic_tls, key_data, 0);
   CHECK_OFFSET(bionic_tls, locale, 1040);
diff --git a/libc/bionic/timespec_get.cpp b/tests/sys_cachectl_test.cpp
similarity index 68%
copy from libc/bionic/timespec_get.cpp
copy to tests/sys_cachectl_test.cpp
index 7fc2182..d9ece4f 100644
--- a/libc/bionic/timespec_get.cpp
+++ b/tests/sys_cachectl_test.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,8 +26,19 @@
  * SUCH DAMAGE.
  */
 
-#include <time.h>
+#include <gtest/gtest.h>
 
-int timespec_get(timespec* ts, int base) {
-  return (base == TIME_UTC && clock_gettime(CLOCK_REALTIME, ts) != -1) ? base : 0;
+#if __has_include(<sys/cachectl.h>)
+#include <sys/cachectl.h>
+#endif
+
+TEST(sys_cachectl, __riscv_flush_icache) {
+#if defined(__riscv) && __has_include(<sys/cachectl.h>)
+  // As of Linux 6.4, the address range is ignored (so nullptr is fine),
+  // and the flags you actually want are 0 ("all threads"),
+  // but we test the unusual flag just to make sure it works.
+  ASSERT_EQ(0, __riscv_flush_icache(nullptr, nullptr, SYS_RISCV_FLUSH_ICACHE_LOCAL));
+#else
+  GTEST_SKIP() << "__riscv_flush_icache requires riscv64";
+#endif
 }
diff --git a/tests/sys_mman_test.cpp b/tests/sys_mman_test.cpp
index e403ea5..803852a 100644
--- a/tests/sys_mman_test.cpp
+++ b/tests/sys_mman_test.cpp
@@ -218,7 +218,10 @@
 }
 
 TEST(sys_mman, mremap) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   ASSERT_EQ(MAP_FAILED, mremap(nullptr, 0, 0, 0));
+#pragma clang diagnostic pop
 }
 
 constexpr size_t kHuge = size_t(PTRDIFF_MAX) + 1;
diff --git a/tests/sys_sem_test.cpp b/tests/sys_sem_test.cpp
index b98926b..4bac92f 100644
--- a/tests/sys_sem_test.cpp
+++ b/tests/sys_sem_test.cpp
@@ -87,15 +87,21 @@
 }
 
 TEST(sys_sem, semop_failure) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   errno = 0;
   ASSERT_EQ(-1, semop(-1, nullptr, 0));
   ASSERT_TRUE(errno == EINVAL || errno == ENOSYS);
+#pragma clang diagnostic pop
 }
 
 TEST(sys_sem, semtimedop_failure) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   errno = 0;
   ASSERT_EQ(-1, semtimedop(-1, nullptr, 0, nullptr));
   ASSERT_TRUE(errno == EINVAL || errno == ENOSYS);
+#pragma clang diagnostic pop
 }
 
 TEST(sys_sem, union_semun) {
diff --git a/tests/sys_shm_test.cpp b/tests/sys_shm_test.cpp
index fd5d424..65f9eba 100644
--- a/tests/sys_shm_test.cpp
+++ b/tests/sys_shm_test.cpp
@@ -73,9 +73,12 @@
 }
 
 TEST(sys_shm, shmdt_failure) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   errno = 0;
   ASSERT_EQ(-1, shmdt(nullptr));
   ASSERT_TRUE(errno == EINVAL || errno == ENOSYS);
+#pragma clang diagnostic pop
 }
 
 TEST(sys_shm, shmget_failure) {
diff --git a/tests/sys_socket_test.cpp b/tests/sys_socket_test.cpp
index 421a817..422b7f2 100644
--- a/tests/sys_socket_test.cpp
+++ b/tests/sys_socket_test.cpp
@@ -174,8 +174,11 @@
 }
 
 TEST(sys_socket, recvmmsg_error) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   ASSERT_EQ(-1, recvmmsg(-1, nullptr, 0, 0, nullptr));
   ASSERT_EQ(EBADF, errno);
+#pragma clang diagnostic pop
 }
 
 const char* g_SendMsgs[] = {
@@ -232,6 +235,9 @@
 }
 
 TEST(sys_socket, sendmmsg_error) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
   ASSERT_EQ(-1, sendmmsg(-1, nullptr, 0, 0));
   ASSERT_EQ(EBADF, errno);
+#pragma clang diagnostic pop
 }
diff --git a/tests/sys_timex_test.cpp b/tests/sys_timex_test.cpp
index 1340ea4..44b73c9 100644
--- a/tests/sys_timex_test.cpp
+++ b/tests/sys_timex_test.cpp
@@ -27,21 +27,9 @@
   ASSERT_NE(-1, adjtimex(&t));
 }
 
-TEST(sys_timex, adjtimex_EFAULT) {
-  errno = 0;
-  ASSERT_EQ(-1, adjtimex(nullptr));
-  ASSERT_EQ(EFAULT, errno);
-}
-
 TEST(sys_timex, clock_adjtime_smoke) {
   timex t;
   memset(&t, 0, sizeof(t));
   // adjtimex/clock_adjtime return the clock state on success, -1 on failure.
   ASSERT_NE(-1, clock_adjtime(CLOCK_REALTIME, &t));
 }
-
-TEST(sys_timex, clock_adjtime_EFAULT) {
-  errno = 0;
-  ASSERT_EQ(-1, clock_adjtime(CLOCK_REALTIME, nullptr));
-  ASSERT_EQ(EFAULT, errno);
-}
diff --git a/tests/sys_wait_test.cpp b/tests/sys_wait_test.cpp
index c006972..200fabe 100644
--- a/tests/sys_wait_test.cpp
+++ b/tests/sys_wait_test.cpp
@@ -42,3 +42,22 @@
   ASSERT_EQ(66, si.si_status);
   ASSERT_EQ(CLD_EXITED, si.si_code);
 }
+
+// https://github.com/android/ndk/issues/1878
+TEST(sys_wait, macros) {
+#if defined(__GLIBC__)
+  // glibc before 2016 requires an lvalue.
+#else
+  ASSERT_FALSE(WIFEXITED(0x7f));
+  ASSERT_TRUE(WIFSTOPPED(0x7f));
+  ASSERT_FALSE(WIFCONTINUED(0x7f));
+
+  ASSERT_TRUE(WIFEXITED(0x80));
+  ASSERT_FALSE(WIFSTOPPED(0x80));
+  ASSERT_FALSE(WIFCONTINUED(0x80));
+
+  ASSERT_FALSE(WIFEXITED(0xffff));
+  ASSERT_FALSE(WIFSTOPPED(0xffff));
+  ASSERT_TRUE(WIFCONTINUED(0xffff));
+#endif
+}
diff --git a/tests/syslog_test.cpp b/tests/syslog_test.cpp
new file mode 100644
index 0000000..3ec3337
--- /dev/null
+++ b/tests/syslog_test.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#include <syslog.h>
+
+#include <errno.h>
+#include <gtest/gtest.h>
+
+#include "utils.h"
+
+TEST(syslog, syslog_percent_m) {
+  ExecTestHelper eth;
+  eth.Run(
+      [&]() {
+        openlog("foo", LOG_PERROR, LOG_AUTH);
+        errno = EINVAL;
+        syslog(LOG_ERR, "a b c: %m");
+        closelog();
+        exit(0);
+      },
+      0, "foo: a b c: Invalid argument\n");
+}
+
+TEST(syslog, syslog_empty) {
+  ExecTestHelper eth;
+  eth.Run(
+      [&]() {
+        openlog("foo", LOG_PERROR, LOG_AUTH);
+        errno = EINVAL;
+        syslog(LOG_ERR, "");
+        closelog();
+        exit(0);
+      },
+      0, "foo: \n");
+}
+
+TEST(syslog, syslog_truncation) {
+  ExecTestHelper eth;
+  eth.Run(
+      [&]() {
+        openlog("bar", LOG_PERROR, LOG_AUTH);
+        char too_long[2048] = {};
+        memset(too_long, 'x', sizeof(too_long) - 1);
+        syslog(LOG_ERR, "%s", too_long);
+        closelog();
+        exit(0);
+      },
+      0, "bar: x{1023}\n");
+}
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index f0ad937..ec59aa7 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -28,6 +28,7 @@
 
 #include <atomic>
 #include <chrono>
+#include <thread>
 
 #include "SignalUtils.h"
 #include "utils.h"
@@ -96,7 +97,7 @@
 
 static void* gmtime_no_stack_overflow_14313703_fn(void*) {
   const char* original_tz = getenv("TZ");
-  // Ensure we'll actually have to enter tzload by using a time zone that doesn't exist.
+  // Ensure we'll actually have to enter tzload by using a timezone that doesn't exist.
   setenv("TZ", "gmtime_stack_overflow_14313703", 1);
   tzset();
   if (original_tz != nullptr) {
@@ -168,6 +169,8 @@
 }
 
 TEST(time, mktime_EOVERFLOW) {
+  setenv("TZ", "UTC", 1);
+
   struct tm t;
   memset(&t, 0, sizeof(tm));
 
@@ -181,10 +184,25 @@
   ASSERT_NE(static_cast<time_t>(-1), mktime(&t));
   ASSERT_EQ(0, errno);
 
-  // This will overflow for LP32 or LP64.
+  // This will overflow for LP32.
   t.tm_year = INT_MAX;
 
   errno = 0;
+#if !defined(__LP64__)
+  ASSERT_EQ(static_cast<time_t>(-1), mktime(&t));
+  ASSERT_EQ(EOVERFLOW, errno);
+#else
+  ASSERT_EQ(static_cast<time_t>(67768036166016000U), mktime(&t));
+  ASSERT_EQ(0, errno);
+#endif
+
+  // This will overflow for LP32 or LP64.
+  // tm_year is int, this t struct points to INT_MAX + 1 no matter what TZ is.
+  t.tm_year = INT_MAX;
+  t.tm_mon = 11;
+  t.tm_mday = 45;
+
+  errno = 0;
   ASSERT_EQ(static_cast<time_t>(-1), mktime(&t));
   ASSERT_EQ(EOVERFLOW, errno);
 }
@@ -306,7 +324,7 @@
 
 // According to C language specification the only tm struct field needed to
 // find out replacement for %z and %Z in strftime is tm_isdst. Which is
-// wrong, as time zones change their standard offset and even DST savings.
+// wrong, as timezones change their standard offset and even DST savings.
 // tzcode deviates from C language specification and requires tm struct either
 // to be output of localtime-like functions or to be modified by mktime call
 // before passing to strftime. See tz mailing discussion for more details
@@ -542,7 +560,7 @@
   EXPECT_EQ(1, tm.tm_isdst);
   EXPECT_EQ(3600, tm.tm_gmtoff);
 
-  // And as long as we're in Europe/Berlin, those are the only time zone
+  // And as long as we're in Europe/Berlin, those are the only timezone
   // abbreviations that are recognized.
   tm = {};
   ASSERT_TRUE(strptime("PDT", "%Z", &tm) == nullptr);
@@ -1100,7 +1118,7 @@
   // Actual underlying bug (the code change, not the tzdata upgrade that first exposed the bug):
   // http://b/31848040
 
-  // This isn't a great test, because very few time zones were actually affected, and there's
+  // This isn't a great test, because very few timezones were actually affected, and there's
   // no real logic to which ones were affected: it was just a coincidence of the data that came
   // after them in the tzdata file.
 
@@ -1141,10 +1159,10 @@
 TEST(time, bug_31339449) {
   // POSIX says localtime acts as if it calls tzset.
   // tzset does two things:
-  //  1. it sets the time zone ctime/localtime/mktime/strftime will use.
+  //  1. it sets the timezone ctime/localtime/mktime/strftime will use.
   //  2. it sets the global `tzname`.
   // POSIX says localtime_r need not set `tzname` (2).
-  // Q: should localtime_r set the time zone (1)?
+  // Q: should localtime_r set the timezone (1)?
   // Upstream tzcode (and glibc) answer "no", everyone else answers "yes".
 
   // Pick a time, any time...
@@ -1254,8 +1272,39 @@
 TEST(time, timespec_get) {
 #if __BIONIC__
   timespec ts = {};
-  ASSERT_EQ(0, timespec_get(&ts, 123));
   ASSERT_EQ(TIME_UTC, timespec_get(&ts, TIME_UTC));
+  ASSERT_EQ(TIME_MONOTONIC, timespec_get(&ts, TIME_MONOTONIC));
+  ASSERT_EQ(TIME_ACTIVE, timespec_get(&ts, TIME_ACTIVE));
+  ASSERT_EQ(TIME_THREAD_ACTIVE, timespec_get(&ts, TIME_THREAD_ACTIVE));
+#else
+  GTEST_SKIP() << "glibc doesn't have timespec_get until 2.21";
+#endif
+}
+
+TEST(time, timespec_get_invalid) {
+#if __BIONIC__
+  timespec ts = {};
+  ASSERT_EQ(0, timespec_get(&ts, 123));
+#else
+  GTEST_SKIP() << "glibc doesn't have timespec_get until 2.21";
+#endif
+}
+
+TEST(time, timespec_getres) {
+#if __BIONIC__
+  timespec ts = {};
+  ASSERT_EQ(TIME_UTC, timespec_getres(&ts, TIME_UTC));
+  ASSERT_EQ(1, ts.tv_nsec);
+  ASSERT_EQ(0, ts.tv_sec);
+#else
+  GTEST_SKIP() << "glibc doesn't have timespec_get until 2.21";
+#endif
+}
+
+TEST(time, timespec_getres_invalid) {
+#if __BIONIC__
+  timespec ts = {};
+  ASSERT_EQ(0, timespec_getres(&ts, 123));
 #else
   GTEST_SKIP() << "glibc doesn't have timespec_get until 2.21";
 #endif
@@ -1265,3 +1314,150 @@
   ASSERT_EQ(1.0, difftime(1, 0));
   ASSERT_EQ(-1.0, difftime(0, 1));
 }
+
+TEST(time, tzfree_null) {
+#if __BIONIC__
+  tzfree(nullptr);
+#else
+  GTEST_SKIP() << "glibc doesn't have timezone_t";
+#endif
+}
+
+TEST(time, localtime_rz) {
+#if __BIONIC__
+  setenv("TZ", "America/Los_Angeles", 1);
+  tzset();
+
+  auto AssertTmEq = [](const struct tm& rhs, int hour) {
+    ASSERT_EQ(93, rhs.tm_year);
+    ASSERT_EQ(0, rhs.tm_mon);
+    ASSERT_EQ(1, rhs.tm_mday);
+    ASSERT_EQ(hour, rhs.tm_hour);
+    ASSERT_EQ(0, rhs.tm_min);
+    ASSERT_EQ(0, rhs.tm_sec);
+  };
+
+  const time_t t = 725875200;
+
+  // Spam localtime_r() while we use localtime_rz().
+  std::atomic<bool> done = false;
+  std::thread thread{[&] {
+    while (!done) {
+      struct tm tm {};
+      ASSERT_EQ(&tm, localtime_r(&t, &tm));
+      AssertTmEq(tm, 0);
+    }
+  }};
+
+  struct tm tm;
+
+  timezone_t london{tzalloc("Europe/London")};
+  tm = {};
+  ASSERT_EQ(&tm, localtime_rz(london, &t, &tm));
+  AssertTmEq(tm, 8);
+
+  timezone_t seoul{tzalloc("Asia/Seoul")};
+  tm = {};
+  ASSERT_EQ(&tm, localtime_rz(seoul, &t, &tm));
+  AssertTmEq(tm, 17);
+
+  // Just check that mktime()'s timezone didn't change.
+  tm = {};
+  ASSERT_EQ(&tm, localtime_r(&t, &tm));
+  ASSERT_EQ(0, tm.tm_hour);
+  AssertTmEq(tm, 0);
+
+  done = true;
+  thread.join();
+
+  tzfree(london);
+  tzfree(seoul);
+#else
+  GTEST_SKIP() << "glibc doesn't have timezone_t";
+#endif
+}
+
+TEST(time, mktime_z) {
+#if __BIONIC__
+  setenv("TZ", "America/Los_Angeles", 1);
+  tzset();
+
+  // Spam mktime() while we use mktime_z().
+  std::atomic<bool> done = false;
+  std::thread thread{[&done] {
+    while (!done) {
+      struct tm tm {
+        .tm_year = 93, .tm_mday = 1
+      };
+      ASSERT_EQ(725875200, mktime(&tm));
+    }
+  }};
+
+  struct tm tm;
+
+  timezone_t london{tzalloc("Europe/London")};
+  tm = {.tm_year = 93, .tm_mday = 1};
+  ASSERT_EQ(725846400, mktime_z(london, &tm));
+
+  timezone_t seoul{tzalloc("Asia/Seoul")};
+  tm = {.tm_year = 93, .tm_mday = 1};
+  ASSERT_EQ(725814000, mktime_z(seoul, &tm));
+
+  // Just check that mktime()'s timezone didn't change.
+  tm = {.tm_year = 93, .tm_mday = 1};
+  ASSERT_EQ(725875200, mktime(&tm));
+
+  done = true;
+  thread.join();
+
+  tzfree(london);
+  tzfree(seoul);
+#else
+  GTEST_SKIP() << "glibc doesn't have timezone_t";
+#endif
+}
+
+TEST(time, tzalloc_nullptr) {
+#if __BIONIC__
+  // tzalloc(nullptr) returns the system timezone.
+  timezone_t default_tz = tzalloc(nullptr);
+  ASSERT_NE(nullptr, default_tz);
+
+  // Check that mktime_z() with the default timezone matches mktime().
+  // This assumes that the system timezone doesn't change during the test,
+  // but that should be unlikely, and we don't have much choice if we
+  // want to write a test at all.
+  // We unset $TZ before calling mktime() because mktime() honors $TZ.
+  unsetenv("TZ");
+  struct tm tm = {.tm_year = 93, .tm_mday = 1};
+  time_t t = mktime(&tm);
+  ASSERT_EQ(t, mktime_z(default_tz, &tm));
+
+  // Check that changing $TZ doesn't affect the tzalloc() default in
+  // the same way it would the mktime() default.
+  setenv("TZ", "America/Los_Angeles", 1);
+  tzset();
+  ASSERT_EQ(t, mktime_z(default_tz, &tm));
+
+  setenv("TZ", "Europe/London", 1);
+  tzset();
+  ASSERT_EQ(t, mktime_z(default_tz, &tm));
+
+  setenv("TZ", "Asia/Seoul", 1);
+  tzset();
+  ASSERT_EQ(t, mktime_z(default_tz, &tm));
+
+  tzfree(default_tz);
+#else
+  GTEST_SKIP() << "glibc doesn't have timezone_t";
+#endif
+}
+
+TEST(time, tzalloc_unique_ptr) {
+#if __BIONIC__
+  std::unique_ptr<std::remove_pointer_t<timezone_t>, decltype(&tzfree)> tz{tzalloc("Asia/Seoul"),
+                                                                           tzfree};
+#else
+  GTEST_SKIP() << "glibc doesn't have timezone_t";
+#endif
+}
diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp
index 14f80d8..47b9017 100644
--- a/tools/versioner/src/Preprocessor.cpp
+++ b/tools/versioner/src/Preprocessor.cpp
@@ -98,7 +98,8 @@
   }
 
   for (Arch arch : supported_archs) {
-    if (result.arch_availability[arch].introduced <= arch_visibility[arch]) {
+    if (result.arch_availability[arch].introduced <= arch_visibility[arch] ||
+        result.arch_availability[arch].introduced <= arch_min_api[arch]) {
       result.arch_availability[arch].introduced = 0;
     }
   }
@@ -139,9 +140,8 @@
   // Logically orred expressions that constitute the macro guard.
   std::vector<std::string> expressions;
   static const std::vector<std::pair<std::string, std::set<Arch>>> arch_sets = {
-    { "", supported_archs },
-    { "!defined(__LP64__)", { Arch::arm, Arch::x86 } },
-    { "defined(__LP64__)", { Arch::arm64, Arch::riscv64, Arch::x86_64 } },
+      {"!defined(__LP64__)", {Arch::arm, Arch::x86}},
+      {"defined(__LP64__)", {Arch::arm64, Arch::riscv64, Arch::x86_64}},
   };
   std::map<Arch, std::string> individual_archs = {
     { Arch::arm, "defined(__arm__)" },
@@ -168,6 +168,9 @@
     }
 
     if (avail.global_availability.introduced == 0) {
+      // We currently get here for the "__sF" symbol because it's marked __REMOVED_IN(23). This
+      // symbol is the only use of __REMOVED_IN, and it's already guarded manually, so there's no
+      // need to do anything.
       fprintf(stderr, "warning: attempted to generate guard with empty availability: %s\n",
               to_string(avail).c_str());
       return "";
@@ -186,25 +189,35 @@
 
     D("  Checking arch set '%s'\n", arch_expr.c_str());
 
-    int version = avail.arch_availability[*it.second.begin()].introduced;
+    int version = 0;
 
-    // The maximum min_version of the set.
-    int max_min_version = 0;
+    // Find the architectures that need to check __ANDROID_API__ and verify that they check against
+    // the same API level.
     for (Arch arch : archs) {
-      if (arch_min_api[arch] > max_min_version) {
-        max_min_version = arch_min_api[arch];
-      }
-
-      if (avail.arch_availability[arch].introduced != version) {
+      const int arch_version = avail.arch_availability[arch].introduced;
+      if (arch_version == 0) {
+        continue;
+      } else if (version == 0) {
+        version = arch_version;
+      } else if (version != arch_version) {
         D("    Skipping arch set, availability for %s doesn't match %s\n",
           to_string(*it.second.begin()).c_str(), to_string(arch).c_str());
         goto skip;
       }
     }
 
-    // If all of the archs in the set have a min_api that satifies version, elide the check.
-    if (max_min_version >= version) {
-      version = 0;
+    // Verify that a non-zero version is acceptable to reuse for other archs with a higher minimum
+    // API, like riscv64. (e.g. It's OK to reuse an (__ANDROID_API__ >= 24) check if the arch's
+    // minimum API is 35.)
+    if (version != 0) {
+      for (Arch arch : archs) {
+        const int arch_version = avail.arch_availability[arch].introduced;
+        if (arch_version == 0 && version > arch_min_api[arch]) {
+          D("    Skipping arch set, availability for %s doesn't match %s\n",
+            to_string(*it.second.begin()).c_str(), to_string(arch).c_str());
+          goto skip;
+        }
+      }
     }
 
     expressions.emplace_back(generate_guard(arch_expr, version));
@@ -222,11 +235,7 @@
   for (const auto& it : individual_archs) {
     const std::string& arch_expr = it.second;
     int introduced = avail.arch_availability[it.first].introduced;
-    if (introduced == 0) {
-      expressions.emplace_back(arch_expr);
-    } else {
-      expressions.emplace_back(generate_guard(arch_expr, introduced));
-    }
+    expressions.emplace_back(generate_guard(arch_expr, introduced));
   }
 
   if (expressions.size() == 0) {
diff --git a/tools/versioner/src/versioner.cpp b/tools/versioner/src/versioner.cpp
index c818197..5afa00b 100644
--- a/tools/versioner/src/versioner.cpp
+++ b/tools/versioner/src/versioner.cpp
@@ -284,8 +284,8 @@
 //      If a function is declared as an inline before a certain version, the inline definition
 //      should have no version tag.
 //   3. Each availability type must only be present globally or on a per-arch basis.
-//      (e.g. __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_X86(10) __DEPRECATED_IN(11) is fine,
-//      but not __INTRODUCED_IN(9) __INTRODUCED_IN_X86(10))
+//      (e.g. __INTRODUCED_IN_32(21) __INTRODUCED_IN_64(22) __DEPRECATED_IN(23) is fine,
+//      but not __INTRODUCED_IN(9) __INTRODUCED_IN_32(10))
 static bool checkSymbol(const Symbol& symbol) {
   std::string cwd = getWorkingDir() + "/";
 
diff --git a/tools/versioner/tests/preprocessor/expected/foo.h b/tools/versioner/tests/preprocessor/expected/foo.h
index 769c37e..4f74927 100644
--- a/tools/versioner/tests/preprocessor/expected/foo.h
+++ b/tools/versioner/tests/preprocessor/expected/foo.h
@@ -54,21 +54,30 @@
 
 // __INTRODUCED_IN_64(21) should be ignored.
 
-#if (!defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__LP64__))
-int multiple_introduced_1() __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_X86(13) __INTRODUCED_IN_64(21);
-#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__LP64__)) */
+#if (!defined(__LP64__) && __ANDROID_API__ >= 24) || (defined(__LP64__))
+int multiple_introduced_1() __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(21);
+#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 24) || (defined(__LP64__)) */
+
+
+// This needs different guards for 32 vs 64.
+
+#if (!defined(__LP64__) && __ANDROID_API__ >= 24) || (defined(__LP64__) && __ANDROID_API__ >= 26)
+int multiple_introduced_2() __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(26);
+#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 24) || (defined(__LP64__) && __ANDROID_API__ >= 26) */
+
+
+// This produces both an LP64 and a not-LP64 check, but it doesn't need to check for all 64-bit
+// targets separately.
+
+#if (!defined(__LP64__) && __ANDROID_API__ >= 23) || (defined(__LP64__) && __ANDROID_API__ >= 23)
+int multiple_introduced_3() __INTRODUCED_IN_32(23) __INTRODUCED_IN_64(23);
+#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 23) || (defined(__LP64__) && __ANDROID_API__ >= 23) */
 
 
 
-#if (!defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__LP64__) && __ANDROID_API__ >= 22)
-int multiple_introduced_2() __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_X86(13) __INTRODUCED_IN_64(22);
-#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 13) || (defined(__LP64__) && __ANDROID_API__ >= 22) */
-
-
-
-#if (!defined(__LP64__) && __ANDROID_API__ >= 12) || (defined(__LP64__))
-int group_lp32() __INTRODUCED_IN_ARM(12) __INTRODUCED_IN_X86(12);
-#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 12) || (defined(__LP64__)) */
+#if (!defined(__LP64__)) || (defined(__LP64__) && __ANDROID_API__ >= 28)
+int added_to_lp64_late() __INTRODUCED_IN_64(28);
+#endif /* (!defined(__LP64__)) || (defined(__LP64__) && __ANDROID_API__ >= 28) */
 
 
 #if defined(__cplusplus)
diff --git a/tools/versioner/tests/preprocessor/headers/foo.h b/tools/versioner/tests/preprocessor/headers/foo.h
index 782b44a..b01d8a9 100644
--- a/tools/versioner/tests/preprocessor/headers/foo.h
+++ b/tools/versioner/tests/preprocessor/headers/foo.h
@@ -37,11 +37,16 @@
 #endif
 
 // __INTRODUCED_IN_64(21) should be ignored.
-int multiple_introduced_1() __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_X86(13) __INTRODUCED_IN_64(21);
+int multiple_introduced_1() __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(21);
 
-int multiple_introduced_2() __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_X86(13) __INTRODUCED_IN_64(22);
+// This needs different guards for 32 vs 64.
+int multiple_introduced_2() __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(26);
 
-int group_lp32() __INTRODUCED_IN_ARM(12) __INTRODUCED_IN_X86(12);
+// This produces both an LP64 and a not-LP64 check, but it doesn't need to check for all 64-bit
+// targets separately.
+int multiple_introduced_3() __INTRODUCED_IN_32(23) __INTRODUCED_IN_64(23);
+
+int added_to_lp64_late() __INTRODUCED_IN_64(28);
 
 #if defined(__cplusplus)
 }
diff --git a/tools/versioner/tests/preprocessor/run.sh b/tools/versioner/tests/preprocessor/run.sh
index 50d9b5c..b039656 100644
--- a/tools/versioner/tests/preprocessor/run.sh
+++ b/tools/versioner/tests/preprocessor/run.sh
@@ -4,7 +4,7 @@
   SRC=$1
   DST=$2
   rm -rf $2
-  versioner -a 9 -a 12 -a 13 -a 14 -a 15 $1 -i -o $2
+  versioner -a 9 -a 12 -a 13 -a 14 -a 15 -a 21 -a 23 $1 -i -o $2
   diff -q -w -B $2 expected
 }